/* Audify — design tokens, primitives and shared chrome */

:root {
  /* Cherry ramp: 300 is "light cherry", 600 is "cherry" */
  --cherry-50: #fff6f7;
  --cherry-100: #ffe8ed;
  --cherry-200: #ffd0da;
  --cherry-300: #ffb7c5;
  --cherry-400: #ff7d97;
  --cherry-500: #ee3a5e;
  --cherry-600: #d2042d;
  --cherry-700: #a90626;
  --cherry-800: #7d0a21;
  --cherry-900: #4a0a17;

  /* Surfaces and ink */
  --paper: #fffafb;
  --surface: #ffffff;
  --ink: #1a070c;
  --ink-2: #24090f;
  --ink-3: #32101a;

  --text: #1f0a10;
  --text-2: #5f4249;
  --text-3: #84656d;
  --line: rgba(125, 10, 33, 0.12);
  --line-strong: rgba(125, 10, 33, 0.2);

  --on-dark: #fff3f5;
  --on-dark-2: #d9b6be;
  --on-dark-3: #a07f88;
  --line-dark: rgba(255, 183, 197, 0.14);
  --line-dark-strong: rgba(255, 183, 197, 0.26);

  --ok: #2fbf8a;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --shadow-sm: 0 1px 2px rgba(74, 10, 23, 0.06), 0 4px 14px rgba(74, 10, 23, 0.05);
  --shadow-md: 0 2px 4px rgba(74, 10, 23, 0.05), 0 14px 34px -8px rgba(125, 10, 33, 0.16);
  --shadow-lg: 0 2px 6px rgba(74, 10, 23, 0.06), 0 30px 70px -16px rgba(125, 10, 33, 0.32);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code, pre { font-family: var(--font-mono); }

::selection { background: var(--cherry-600); color: #fff; }
:focus-visible { outline: 2px solid var(--cherry-600); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.nowrap { white-space: nowrap; }

.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Type ---------- */

.display {
  font-size: clamp(2.9rem, 5.4vw + 0.6rem, 5.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.1rem, 3.2vw + 0.7rem, 3.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.display em, .h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.02em;
  color: var(--cherry-600);
}
.section--dark .h2 em { color: var(--cherry-300); }

.lede { font-size: clamp(1.08rem, 0.5vw + 1rem, 1.28rem); line-height: 1.55; color: var(--text-2); max-width: 34em; }
.sub { font-size: 1.12rem; color: var(--text-2); max-width: 38em; text-wrap: pretty; }
.section--dark .sub { color: var(--on-dark-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cherry-600);
}
.eyebrow span {
  display: inline-grid; place-items: center;
  height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--cherry-100); color: var(--cherry-700);
  letter-spacing: 0.06em;
}
.section--dark .eyebrow { color: var(--cherry-300); }
.section--dark .eyebrow span { background: rgba(255, 183, 197, 0.12); color: var(--cherry-300); }

/* ---------- Buttons ---------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 550; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.btn .icon { transition: transform 0.4s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 0.94rem; }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #e2143d 0%, var(--cherry-600) 45%, #b70427 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(74, 10, 23, 0.3), 0 1px 2px rgba(125, 10, 33, 0.4), 0 10px 26px -6px rgba(210, 4, 45, 0.55);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.34) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(74, 10, 23, 0.3), 0 2px 4px rgba(125, 10, 33, 0.4), 0 18px 36px -8px rgba(210, 4, 45, 0.65); }
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: #fff; border-color: var(--cherry-400); color: var(--cherry-700); transform: translateY(-2px); }

.btn--onDark { color: var(--on-dark); border: 1px solid var(--line-dark-strong); background: rgba(255, 183, 197, 0.06); }
.btn--onDark:hover { background: rgba(255, 183, 197, 0.14); border-color: var(--cherry-300); transform: translateY(-2px); }

/* ---------- Tags and chips ---------- */

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255, 183, 197, 0.1); color: var(--cherry-300); border: 1px solid var(--line-dark);
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 191, 138, 0.6); animation: ping 2s infinite; }
.tag--light { background: var(--cherry-100); color: var(--cherry-700); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.01em;
  color: var(--text-2); background: var(--cherry-50); border: 1px solid var(--line);
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 138, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(47, 191, 138, 0); }
}

/* ---------- Nav ---------- */

.nav { position: fixed; inset: 14px 0 auto; z-index: 100; pointer-events: none; }
.nav__inner {
  pointer-events: auto;
  width: min(100% - 28px, 1160px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 62px; padding: 0 10px 0 18px; border-radius: 999px;
  background: rgba(255, 250, 251, 0.72);
  border: 1px solid rgba(125, 10, 33, 0.1);
  backdrop-filter: blur(18px) saturate(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 30px -12px rgba(125, 10, 33, 0.18);
  transition: box-shadow 0.4s, background-color 0.4s, height 0.4s var(--ease);
}
.nav.is-scrolled .nav__inner { height: 56px; background: rgba(255, 250, 251, 0.88); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 40px -14px rgba(125, 10, 33, 0.32); }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 4px 8px rgba(210, 4, 45, 0.35)); }
.brand__mark rect { transform-box: fill-box; transform-origin: center; }
.brand:hover .brand__mark g rect { animation: eq 0.9s var(--ease) infinite alternate; }
.brand:hover .brand__mark g rect:nth-child(2) { animation-delay: -0.3s; }
.brand:hover .brand__mark g rect:nth-child(3) { animation-delay: -0.6s; }
.brand:hover .brand__mark g rect:nth-child(4) { animation-delay: -0.15s; }
.brand__word { font-size: 1.36rem; font-weight: 650; letter-spacing: -0.05em; }
@keyframes eq { from { transform: scaleY(0.45); } to { transform: scaleY(1.05); } }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.93rem; font-weight: 500; color: var(--text-2);
  transition: color 0.25s, background-color 0.25s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--cherry-700); background: var(--cherry-100); }

.nav__cta { display: flex; align-items: center; gap: 8px; }
.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 50%; place-items: center; border: 1px solid var(--line-strong); font-size: 1.1rem; }

@media (max-width: 960px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; top: calc(100% + 10px); left: 14px; right: 14px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    border-radius: 24px; background: rgba(255, 250, 251, 0.97);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98); transform-origin: top;
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s;
  }
  .nav__links a { padding: 13px 16px; font-size: 1.02rem; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
}
@media (max-width: 420px) { .nav__cta .btn { padding: 0 14px; } .nav__cta .btn .icon { display: none; } }

/* ---------- Sections ---------- */

.section { position: relative; padding: clamp(84px, 9vw, 148px) 0; }
.section--tint { background: linear-gradient(180deg, var(--paper), var(--cherry-50) 30%, var(--cherry-50) 70%, var(--paper)); }

.section--dark {
  margin-inline: clamp(8px, 1.4vw, 20px);
  border-radius: var(--radius-xl);
  color: var(--on-dark);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(210, 4, 45, 0.34), transparent 62%),
    radial-gradient(760px 480px at -6% 104%, rgba(255, 125, 151, 0.12), transparent 60%),
    var(--ink);
  overflow: hidden;
}
.section--dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}
.section--dark > .container { position: relative; }

.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 68px); max-width: 860px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */

.footer { padding: 72px 0 36px; }
.footer__top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__brand p { margin-top: 16px; max-width: 30em; color: var(--text-2); font-size: 0.96rem; }
.footer h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer li a { color: var(--text-2); font-size: 0.96rem; transition: color 0.2s; }
.footer li a:hover { color: var(--cherry-600); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; font-size: 0.86rem; color: var(--text-3); }
.footer__status { display: inline-flex; align-items: center; gap: 8px; }
.footer__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
.footer__wordmark {
  margin-top: 40px; font-size: clamp(5rem, 22vw, 19rem); font-weight: 700; line-height: 0.8; letter-spacing: -0.07em; text-align: center;
  background: linear-gradient(180deg, var(--cherry-200), rgba(255, 208, 218, 0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; pointer-events: none;
}

@media (max-width: 860px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
