/* ==========================================================================
   Riama — landing (direction 2a, "Signal v2")
   Design tokens, layout and motion ported from the design handoff.
   ========================================================================== */

/* ---- Self-hosted fonts ------------------------------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --bg: #08090A;
  --ink: #EDEFEA;
  --accent: #C6F24E;

  --ink-80: rgba(237, 239, 234, 0.8);
  --ink-62: rgba(237, 239, 234, 0.62);
  --ink-60: rgba(237, 239, 234, 0.6);
  --ink-55: rgba(237, 239, 234, 0.55);
  --ink-50: rgba(237, 239, 234, 0.5);
  --ink-42: rgba(237, 239, 234, 0.42);
  --ink-40: rgba(237, 239, 234, 0.4);
  --line-28: rgba(237, 239, 234, 0.28);
  --line-14: rgba(237, 239, 234, 0.14);
  --line-12: rgba(237, 239, 234, 0.12);
  --line-10: rgba(237, 239, 234, 0.1);
  --wash: rgba(198, 242, 78, 0.06);

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --pad-x: 56px;
}

/* ---- Reset / base ------------------------------------------------------ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
}

/* ---- Keyframes --------------------------------------------------------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe   { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bar    { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Nav --------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
}
.nav__brand { display: flex; align-items: center; gap: 11px; }
.nav__mark { display: block; width: 30px; height: 30px; }
.nav__wordmark { font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.nav__right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-mono);
}
.nav__link {
  font-size: 12px;
  color: var(--ink-50);
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--ink); }

.toggle { display: flex; gap: 4px; }
.toggle__btn {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-55);
  transition: background 0.2s ease, color 0.2s ease;
}
.toggle__btn:hover { color: var(--ink); }
.toggle__btn[aria-current="true"] {
  background: var(--accent);
  color: var(--bg);
}

.cta-nav {
  font-size: 12px;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s ease;
}
.cta-nav:hover { background: var(--ink); }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 96px var(--pad-x) 84px;
  overflow: hidden;
  border-top: 1px solid var(--line-10);
}
.hero__glow {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  pointer-events: none;
  left: var(--glow-x, 72%);
  top: var(--glow-y, 35%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(198, 242, 78, 0.16), rgba(198, 242, 78, 0) 62%);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1), top 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero__equalizer {
  position: absolute;
  right: var(--pad-x);
  top: 96px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 200px;
  opacity: 0.9;
}
.eq-bar {
  width: 12px;
  height: 100%;
  transform-origin: bottom;
  animation: bar 2.4s ease-in-out infinite;
}
.eq-bar:nth-child(1) { background: var(--accent);                 animation-delay: 0s;   }
.eq-bar:nth-child(2) { background: rgba(198, 242, 78, 0.7);       animation-delay: 0.2s; }
.eq-bar:nth-child(3) { background: rgba(198, 242, 78, 0.5);       animation-delay: 0.4s; }
.eq-bar:nth-child(4) { background: rgba(198, 242, 78, 0.35);      animation-delay: 0.6s; }
.eq-bar:nth-child(5) { background: rgba(198, 242, 78, 0.22);      animation-delay: 0.8s; }

.hero__content {
  position: relative;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  animation: fadeIn 0.8s ease both;
}
.hero__title {
  margin: 0;
  font-size: 76px;
  font-weight: 700;
  line-height: 0.97;
  letter-spacing: -0.045em;
  text-wrap: pretty;
  animation: wipe 1.1s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__sub {
  margin: 0;
  max-width: 580px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-62);
  animation: riseIn 0.9s 0.3s ease both;
}
.hero__actions {
  display: flex;
  gap: 12px;
  animation: riseIn 0.9s 0.42s ease both;
}

.btn {
  padding: 16px 26px;
  font-size: 14px;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.btn--primary {
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover { background: var(--ink); }
.btn--secondary {
  font-weight: 500;
  border: 1px solid var(--line-28);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Ticker ------------------------------------------------------------ */
.ticker {
  border-top: 1px solid var(--line-10);
  border-bottom: 1px solid var(--line-10);
  overflow: hidden;
  padding: 13px 0;
}
.ticker__rail {
  display: flex;
  gap: 40px;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-42);
  animation: ticker 26s linear infinite;
}

/* ---- Services ---------------------------------------------------------- */
.services {
  padding: 76px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  border: 1px solid var(--line-14);
  padding: 32px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  background: var(--wash);
}
.card__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.card__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-60);
}

/* ---- Two panels -------------------------------------------------------- */
.panels {
  padding: 0 var(--pad-x) 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel--lime { background: var(--accent); color: var(--bg); }
.panel--team { border: 1px solid var(--line-14); }
.panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.panel--team .panel__eyebrow { color: var(--accent); }
.panel__statement {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.panel__body {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-80);
  text-wrap: pretty;
}

/* ---- Footer ------------------------------------------------------------ */
.footer {
  padding: var(--pad-x);
  border-top: 1px solid var(--line-12);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.footer__left { display: flex; flex-direction: column; gap: 18px; }
.footer__title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 520px;
  text-wrap: pretty;
}
.footer__email {
  font-size: 18px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer__offices { display: flex; gap: 44px; font-family: var(--font-mono); }
.office { display: flex; flex-direction: column; gap: 8px; }
.office__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.office__num { font-size: 14px; }
.office__num:hover { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1179px) {
  :root { --pad-x: 40px; }
  .hero__equalizer { display: none; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 56px; }
}

@media (max-width: 767px) {
  :root { --pad-x: 24px; }
  .nav__link { display: none; }
  .hero { padding: 64px var(--pad-x) 56px; }
  .hero__title { font-size: 40px; }
  .hero__content { gap: 22px; }
  .services {
    grid-template-columns: 1fr;
    padding: 56px var(--pad-x);
  }
  .panels { grid-template-columns: 1fr; }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .footer__title { font-size: 34px; }
}

@media (max-width: 380px) {
  .nav__right { gap: 12px; }
  .hero__actions { flex-wrap: wrap; }
}

/* ==========================================================================
   Reduced motion — freeze ambient loops, hold final entrance states
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero__kicker,
  .hero__title,
  .hero__sub,
  .hero__actions {
    animation: none;
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .eq-bar { animation: none; transform: none; }
  .ticker__rail { animation: none; }
  .hero__glow { transition: none; }
}
