/* ReChord website — shared design system */
@view-transition { navigation: auto; }

:root {
  --bg: #050a14;
  --bg-2: #09111e;
  --surface: #0d1626;
  --surface-2: #152238;
  --surface-3: #1d2e49;
  --line: rgba(140, 196, 255, .14);
  --line-2: rgba(140, 196, 255, .28);
  --text: #ededf4;
  --dim: #9aa9c2;
  --faint: #62718c;
  --blue: #5da8ff;
  --blue-2: #8cc4ff;
  --navy: #0a417b;
  --red: #ff5449;
  --cyan: #7ce0f4;
  --green: #55d67b;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(18px, 4vw, 56px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--blue); color: #04101f; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1240px, 100% - var(--gutter) * 2); margin-inline: auto; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-2); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.display {
  font-size: clamp(40px, 7.4vw, 112px); line-height: .96; letter-spacing: -.045em; font-weight: 600;
  text-wrap: balance;
}
.display .serif { letter-spacing: -.03em; font-size: 1.06em; color: var(--blue-2); }
.h2 { font-size: clamp(32px, 5vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; }
.h2 .serif { color: var(--blue-2); font-size: 1.06em; }
.lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--dim); max-width: 52ch; text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  --bgc: var(--text); --fg: #06101f;
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--bgc); color: var(--fg); font-weight: 600; font-size: 15px;
  letter-spacing: -.01em; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .4s;
  will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue-2);
  transform: translateY(101%); border-radius: inherit; transition: transform .45s var(--ease-out);
}
.btn:hover::after { transform: none; }
.btn.ghost { --bgc: rgba(140, 196, 255, .08); --fg: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(12px); }
.btn.ghost::after { background: rgba(140, 196, 255, .16); }
.btn.red { --bgc: var(--red); --fg: #fff; }
.btn.red::after { background: #ff7a70; }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .4s var(--ease-out); }
.btn:hover svg.arrow { transform: translate(3px, -3px); }
.link { color: var(--blue-2); display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .3s, gap .3s var(--ease-out); }
.link:hover { border-color: var(--blue-2); gap: 12px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 80; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  transition: transform .5s var(--ease-out), background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(5, 10, 20, .72); backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.nav.hide { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -.03em; font-size: 20px; }
.brand svg { width: 24px; height: 27px; fill: var(--blue); transition: transform .8s var(--ease-out); }
.brand:hover svg { transform: rotate(-12deg) scale(1.08); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--dim); position: relative;
  transition: color .3s, background .3s;
}
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(140, 196, 255, .08); }
.nav-links .btn { height: 40px; padding: 0 18px; font-size: 14px; margin-left: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); position: relative; background: rgba(5, 10, 20, .5); backdrop-filter: blur(10px); }
.menu-btn i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .4s var(--ease-out), top .4s var(--ease-out); }
.menu-btn i:first-child { top: 18px; } .menu-btn i:last-child { top: 25px; }
.menu-open .menu-btn i:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-open .menu-btn i:last-child { top: 21.5px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: block; z-index: 2; }
  .nav-links {
    position: fixed; inset: 0; height: 100dvh; background: rgba(5, 10, 20, .96); backdrop-filter: blur(24px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 0 var(--gutter);
    opacity: 0; pointer-events: none; transition: opacity .4s;
  }
  .nav-links a:not(.btn) { font-size: clamp(34px, 10vw, 54px); letter-spacing: -.04em; font-weight: 600; color: var(--text); padding: 4px 0; background: none !important; transform: translateY(24px); opacity: 0; transition: transform .6s var(--ease-out), opacity .5s; }
  .nav-links .btn { margin: 28px 0 0; height: 52px; font-size: 16px; opacity: 0; transition: opacity .5s .3s; }
  .menu-open .nav-links { opacity: 1; pointer-events: auto; }
  .menu-open .nav-links a:not(.btn) { transform: none; opacity: 1; }
  .menu-open .nav-links a:nth-child(2) { transition-delay: .05s; } .menu-open .nav-links a:nth-child(3) { transition-delay: .1s; } .menu-open .nav-links a:nth-child(4) { transition-delay: .15s; }
  .menu-open .nav-links .btn { opacity: 1; }
  .menu-open .nav { transform: none !important; }
}

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 45ms + var(--d, 0s)); }
.split.in .w > span { transform: none; }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1px solid rgba(140, 196, 255, .55); opacity: 0; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s, border-color .3s, opacity .3s; mix-blend-mode: screen; }
.cursor.on { opacity: 1; }
.cursor.hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(93, 168, 255, .14); border-color: transparent; }
.cursor.down { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- chips, cards ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--dim); background: rgba(9, 17, 30, .7); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(12px); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(85, 214, 123, .6); animation: ping 2s infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px rgba(85, 214, 123, 0); } }
.card { background: linear-gradient(180deg, rgba(21, 34, 56, .72), rgba(13, 22, 38, .72)); border: 1px solid var(--line); border-radius: 28px; }

/* ---------- waveform ---------- */
.wave { display: flex; align-items: center; gap: 2px; height: 36px; }
.wave i { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(140, 196, 255, .28); height: calc(var(--h) * 100%); transition: background .15s; }
.wave i.on { background: var(--blue-2); }

/* ---------- section scaffolding ---------- */
section { position: relative; }
.pad { padding-block: clamp(90px, 13vw, 180px); }
.page-hero { padding: calc(var(--nav-h) + clamp(60px, 10vw, 130px)) 0 clamp(50px, 7vw, 90px); position: relative; overflow: clip; }
.page-hero .lead { margin-top: 28px; }
.glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .5; background: radial-gradient(circle, #1f5fc0, transparent 65%); }
.grid-bg { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(140, 196, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 196, 255, .06) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 34px; position: relative; overflow: clip; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(130px, 1fr)); gap: 40px; }
.footer h4 { margin: 0 0 16px; font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { color: var(--dim); transition: color .25s; } .footer li a:hover { color: var(--text); }
.footer .tag { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.03em; line-height: 1.15; margin-top: 18px; max-width: 14ch; }
.footer-word { font-size: clamp(90px, 25vw, 400px); font-weight: 600; letter-spacing: -.07em; line-height: .8; margin: 70px 0 0 -.05em; white-space: nowrap; background: linear-gradient(180deg, rgba(140, 196, 255, .22), rgba(140, 196, 255, 0) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 13px; margin-top: 18px; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-top > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .split .w > span { opacity: 1; transform: none; }
}
