/* Ghaym site system: near-black film ground, navy fields and lines, screens as the only full colour, signal yellow for the primary action only. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-500-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/inter-700-latin.woff2) format('woff2'); }

:root {
  /* Night cockpit: midnight ground, warm white type, cyan for data, lime for the path. */
  --black: #06090f;
  --navy-950: #090d17;
  --navy-900: #0d121f;
  --navy-850: #121828;
  --navy-800: #171e31;
  --navy-line: rgba(150, 210, 230, 0.13);
  --navy-line-strong: rgba(150, 210, 230, 0.24);
  --on-navy: #f4f1ea;
  --on-navy-2: #c3c4c4;
  --on-navy-3: #959aa3;

  --paper: #f4f6f3;
  --ink: #14181f;

  --blue-400: #4fd8ff;
  --blue-200: #4fd8ff;
  --signal: #c8f04c;
  --signal-hover: #d6f574;

  --ground-rgb: 6, 9, 15;
  --line-rgb: 150, 210, 230;
  --text-rgb: 244, 241, 234;
  --cyan-rgb: 79, 216, 255;
  --signal-rgb: 200, 240, 76;
  --dusk-rgb: 96, 78, 168;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-display: clamp(2.5rem, 1.55rem + 3.2vw, 4rem);
  --text-h2: clamp(2rem, 1.45rem + 1.9vw, 3rem);
  --text-h3: 1.25rem;
  --text-lede: clamp(1.125rem, 1.04rem + 0.3vw, 1.25rem);
  --text-body: 1.0625rem;
  --text-small: 0.875rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 320ms;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 72px;
  --section-y: clamp(88px, 10vw, 144px);
  --shadow-device: 0 48px 80px -32px rgba(2, 6, 14, 0.7), 0 16px 32px -16px rgba(2, 6, 14, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-color: #262f44 var(--black);
}
body {
  margin: 0;
  background: var(--black);
  color: var(--on-navy);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea { caret-color: var(--blue-400); }
.num { font-variant-numeric: tabular-nums; }

::selection { background: var(--blue-400); color: var(--navy-900); }
:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.band { position: relative; padding-block: var(--section-y); }
.navy { background: var(--navy-900); color: var(--on-navy); }

/* type */
p, li, dd, figcaption { text-wrap: pretty; }
.display { font-size: var(--text-display); font-weight: 700; line-height: 1.03; letter-spacing: -0.035em; text-wrap: balance; }
.h2 { font-size: var(--text-h2); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.lede { font-size: var(--text-lede); line-height: 1.55; max-width: 60ch; text-wrap: pretty; }
.navy .lede, .navy .body-2 { color: var(--on-navy-2); }
.head { display: grid; gap: 20px; max-width: 780px; margin-bottom: clamp(48px, 6vw, 80px); }
.head.center { margin-inline: auto; text-align: center; justify-items: center; }
.text-link {
  font-weight: 600; text-decoration: underline; text-underline-offset: 0.24em;
  text-decoration-thickness: 1px; transition: text-decoration-color var(--dur) var(--ease-out);
}
.text-link { color: var(--blue-200); text-decoration-color: rgba(var(--cyan-rgb), 0.4); }
.text-link:hover { text-decoration-color: currentColor; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform 200ms var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--ground-rgb), 0.25); }
.btn-primary:hover { background: var(--signal-hover); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--on-navy); border-color: var(--navy-line-strong); }
.btn-ghost:hover { background: rgba(var(--line-rgb), 0.07); border-color: rgba(var(--line-rgb), 0.45); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; border-radius: 9px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.0625rem; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--ground-rgb), 0.74);
  -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.nav.scrolled { background: rgba(var(--ground-rgb), 0.86); border-bottom-color: var(--navy-line); }
.nav-bar { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: auto; height: 28px; }
.wordmark { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.18em; color: var(--on-navy); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px; font-size: 0.9375rem; font-weight: 500; color: var(--on-navy-2);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.nav-links a:hover { color: var(--on-navy); background: rgba(var(--line-rgb), 0.07); }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: auto;
  border: 1px solid var(--navy-line-strong); border-radius: 10px; background: transparent; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.5px; background: var(--on-navy); border-radius: 1px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; inset: var(--nav-h) 0 auto; margin: 0; padding: 8px var(--gutter) 20px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--navy-line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .nav-links a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--navy-line); font-size: 1.0625rem; }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
@media (max-width: 420px) { .nav-cta { display: none; } }

/* device frames: sizes come from the parent, proportions from container units */
.device { position: relative; container-type: inline-size; }
.screen { position: relative; overflow: hidden; background: #05080d; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity var(--dur) var(--ease-out); }
.screen img.is-fading { opacity: 0; }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), transparent 38%);
}
.laptop .lid {
  width: 86cqi; margin-inline: auto; padding: 1.7cqi 1.7cqi 2.4cqi;
  border-radius: 2.4cqi 2.4cqi 0.8cqi 0.8cqi; background: #0b0f16;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), var(--shadow-device);
}
.laptop .screen { aspect-ratio: 1440 / 900; border-radius: 0.5cqi; }
.laptop .base {
  position: relative; width: 100cqi; height: 2.3cqi; border-radius: 0 0 2.4cqi 2.4cqi / 0 0 1.8cqi 1.8cqi;
  background: linear-gradient(#4a5263, #272d39 42%, #151920);
  box-shadow: 0 30px 40px -24px rgba(2, 6, 14, 0.8);
}
.laptop .base::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 15cqi; height: 0.9cqi; transform: translateX(-50%);
  border-radius: 0 0 1cqi 1cqi; background: #161a22;
}
.tablet .bezel {
  padding: 3.6cqi; border-radius: 7.5cqi; background: #0b0f16;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 0 0.9cqi #141a24, var(--shadow-device);
}
.tablet .screen { aspect-ratio: 820 / 1180; border-radius: 4cqi; }
.phone .bezel {
  padding: 3.4cqi; border-radius: 15cqi; background: #0b0f16;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 0 1.6cqi #141a24, var(--shadow-device);
}
.phone .screen { aspect-ratio: 390 / 844; border-radius: 11.5cqi; }

/* footer */
.footer { background: var(--navy-950); color: var(--on-navy-2); padding-block: 72px 40px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer .tagline { margin-top: 16px; max-width: 36ch; }
.footer h2 { margin-bottom: 14px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0; color: var(--on-navy); }
.footer ul { display: grid; gap: 10px; }
.footer a { transition: color var(--dur) var(--ease-out); }
.footer a:hover { color: var(--on-navy); }
.credits { max-width: 60ch; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--navy-line); font-size: 0.8125rem; line-height: 1.65; color: var(--on-navy-3); }
.credits a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(149, 154, 163, 0.5); }
.footer-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 20px; font-size: 0.8125rem; color: var(--on-navy-3); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
