/* ==========================================================================
   AICOS — full site
   Liquid-metal / instrument language. Inter throughout, Instrument Serif
   italic used once per heading as the accent voice. Two themes, tokenised.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root {
  color-scheme: dark;

  --bg: #000000;
  --panel: #0A0A0A;
  --panel-2: #131313;
  --panel-3: #1C1C1C;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);

  --text: #ffffff;
  --muted: #9a9a9a;
  --stat: #d8d8d8;

  --accent: #2563EB;
  --accent-2: #7CB0FF;
  --ok: #3FBF7F;
  --warn: #E0A03F;

  /* liquid metal */
  --pill-bg: linear-gradient(105deg, #050505 0%, #2a2a2a 48%, #4a4a4a 100%);
  --pill-bg-hover: linear-gradient(105deg, #111 0%, #3a3a3a 45%, #6a6a6a 100%);
  --pill-border: rgba(198, 198, 198, 0.55);
  --pill-border-hover: rgba(235, 235, 235, 0.9);
  --pill-text: #f3f3f3;
  --pill-shine: rgba(255, 255, 255, 0.16);

  --solid-bg: linear-gradient(180deg, #ffffff 0%, #e7e7e7 48%, #cfcfcf 100%);
  --solid-bg-hover: linear-gradient(180deg, #fff 0%, #f3f6ff 42%, #d5def2 100%);
  --solid-fg: #111111;
  --solid-border: #ffffff;

  --ghost-bg: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.45) 50%, rgba(160,175,200,0.08));
  --ghost-bg-hover: linear-gradient(135deg, rgba(210,225,255,0.18), rgba(0,0,0,0.35) 48%, rgba(180,195,220,0.16));
  --ghost-border: rgba(198, 198, 198, 0.45);

  --badge-bg: linear-gradient(90deg, #7d7d7d 0%, #2a2a2a 52%, #0a0a0a 100%);
  --badge-fg: #f2f2f2;

  --hero-scrim: linear-gradient(180deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.34) 30%, rgba(0,0,0,0.60) 72%, rgba(0,0,0,0.95) 100%);
  --hero-img: url("../assets/photos/hero-dark-1400.jpg");
  --hero-pos: 50% 62%;
  --nav-bg: rgba(0, 0, 0, 0.62);
  --menu-bg: rgba(6, 6, 6, 0.97);
  --grain-blend: overlay;
  --grain-opacity: 0.05;

  --logo: 15.5px;
  --logo-mark: 26px;
  --nav: 14px;
  --nav-h: 40px;
  --btn: 13.5px;
  --btn-h: 40px;
  --hero-btn-h: 42px;
  --h1: 52px;
  --h2: 38px;
  --lede: 15.5px;
  --badge: 12.5px;
  --stat-size: 13.5px;

  --header-y: 22px;
  --header-x: 40px;
  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 48px);
  --sec: clamp(80px, 9vw, 132px);
  --r: 10px;
  --r-lg: 14px;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --panel: #F7F7F8;
  --panel-2: #F0F0F2;
  --panel-3: #E6E6E9;
  --line: rgba(0, 0, 0, 0.13);
  --line-soft: rgba(0, 0, 0, 0.08);

  --text: #0A0A0A;
  --muted: #5A5A5A;
  --stat: #3A3A3A;

  --accent: #1D4ED8;
  --accent-2: #1D4ED8;
  --ok: #15803D;
  --warn: #A55A08;

  --pill-bg: linear-gradient(105deg, #ffffff 0%, #ededf0 48%, #d9d9de 100%);
  --pill-bg-hover: linear-gradient(105deg, #ffffff 0%, #f4f6ff 45%, #dfe6f7 100%);
  --pill-border: rgba(0, 0, 0, 0.22);
  --pill-border-hover: rgba(29, 78, 216, 0.55);
  --pill-text: #14141a;
  --pill-shine: rgba(255, 255, 255, 0.9);

  --solid-bg: linear-gradient(180deg, #1b1b1b 0%, #0e0e0e 48%, #000000 100%);
  --solid-bg-hover: linear-gradient(180deg, #2a3550 0%, #16203a 48%, #0b1220 100%);
  --solid-fg: #ffffff;
  --solid-border: #0A0A0A;

  --ghost-bg: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(255,255,255,0.7) 50%, rgba(120,145,190,0.08));
  --ghost-bg-hover: linear-gradient(135deg, rgba(29,78,216,0.10), rgba(255,255,255,0.75) 48%, rgba(120,145,190,0.14));
  --ghost-border: rgba(0, 0, 0, 0.22);

  --badge-bg: linear-gradient(90deg, #d8d8dc 0%, #f2f2f4 52%, #ffffff 100%);
  --badge-fg: #16161a;

  --hero-scrim: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.60) 30%, rgba(255,255,255,0.80) 72%, rgba(255,255,255,0.97) 100%);
  --hero-img: url("../assets/photos/hero-light-1400.jpg");
  --hero-pos: 50% 54%;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --grain-blend: multiply;
  --grain-opacity: 0.035;
}

/* hero stills, per theme and width — only the matching url() is fetched */
@media (max-width: 820px){ :root{ --hero-img: url("../assets/photos/hero-dark-800.jpg"); } }
@media (min-width: 1500px){ :root{ --hero-img: url("../assets/photos/hero-dark-2400.jpg"); } }
@media (max-width: 820px){ :root[data-theme="light"]{ --hero-img: url("../assets/photos/hero-light-800.jpg"); } }
@media (min-width: 1500px){ :root[data-theme="light"]{ --hero-img: url("../assets/photos/hero-light-2400.jpg"); } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--panel-3) var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 99px; border: 3px solid var(--bg); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 200; padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ── type ─────────────────────────────────────────────────────── */
.h1 { font-size: var(--h1); font-weight: 500; line-height: 1.1; letter-spacing: -0.045em; }
.h2 { font-size: var(--h2); font-weight: 500; line-height: 1.12; letter-spacing: -0.04em; text-wrap: balance; }
.h3 { font-size: 19px; font-weight: 500; line-height: 1.34; letter-spacing: -0.02em; }
em, .serif {
  font-family: "Instrument Serif", "Times New Roman", Times, serif;
  font-style: italic; font-weight: 400; font-size: 1.08em;
  letter-spacing: -0.03em; color: var(--muted);
}
.lede { font-size: var(--lede); line-height: 1.6; letter-spacing: -0.015em; color: var(--muted); text-wrap: pretty; }
.mono { font-variant-numeric: tabular-nums; }

/* ── grain ────────────────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── header ───────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.header-in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--header-y) var(--header-x);
}
.logo {
  display: inline-flex; align-items: center; gap: 9px; justify-self: start;
  font-size: var(--logo); font-weight: 600; letter-spacing: -0.03em; color: var(--text);
}
.logo svg { width: var(--logo-mark); height: var(--logo-mark); flex: none; color: var(--text); }

.nav { display: flex; align-items: center; gap: 8px; justify-self: center; }
.nav a {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--nav-h); padding: 0 16px; border-radius: 7px;
  border: 1px solid var(--pill-border); background: var(--pill-bg);
  color: var(--pill-text); font-size: var(--nav); font-weight: 400;
  letter-spacing: -0.01em; white-space: nowrap;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.nav a::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, var(--pill-shine) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.nav a:hover::before { transform: translateX(120%); }
.nav a:hover { border-color: var(--pill-border-hover); background: var(--pill-bg-hover); box-shadow: 0 0 18px rgba(120,150,220,0.18); }

.nav-right { display: flex; align-items: center; gap: 9px; justify-self: end; }
.nav a.nav-cta-mobile { display: none; }

/* ── theme toggle ─────────────────────────────────────────────── */
.theme-toggle {
  width: 40px; height: 40px; flex: none; border-radius: 7px;
  border: 1px solid var(--pill-border); background: var(--pill-bg);
  color: var(--pill-text); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: border-color .3s ease, background .3s ease;
}
.theme-toggle:hover { border-color: var(--pill-border-hover); background: var(--pill-bg-hover); }
.theme-toggle svg { grid-area: 1/1; transition: opacity .25s ease, transform .35s cubic-bezier(.16,1,.3,1); }
.theme-toggle .i-moon { opacity: 0; transform: rotate(-70deg) scale(.5); }
:root[data-theme="light"] .theme-toggle .i-sun { opacity: 0; transform: rotate(70deg) scale(.5); }
:root[data-theme="light"] .theme-toggle .i-moon { opacity: 1; transform: none; }

/* ── buttons ──────────────────────────────────────────────────── */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 16px; border-radius: 6px;
  font-size: var(--btn); font-weight: 500; letter-spacing: -0.02em; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, color .35s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.45) 48%, transparent 76%);
  transform: translateX(-130%); transition: transform .65s ease;
}
.btn:hover::after { transform: translateX(130%); }
.btn-solid { background: var(--solid-bg); color: var(--solid-fg); border: 1px solid var(--solid-border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.btn-solid:hover { background: var(--solid-bg-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 22px rgba(120,150,220,0.32); }
.btn-ghost { background: var(--ghost-bg); color: var(--text); border: 1px solid var(--ghost-border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); }
.btn-ghost:hover { background: var(--ghost-bg-hover); border-color: var(--pill-border-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 20px rgba(120,150,220,0.22); }
.hero-actions .btn { height: var(--hero-btn-h); padding: 0 18px; }
.hero-actions .btn-ghost { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* ── burger ───────────────────────────────────────────────────── */
.burger {
  display: none; place-items: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 7px;
  border: 1px solid var(--pill-border); background: var(--pill-bg); cursor: pointer; z-index: 60;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--pill-text); border-radius: 1px; transition: transform .25s ease, opacity .2s ease; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-backdrop {
  display: none; position: fixed; inset: 0; z-index: 40; background: rgba(8,8,8,0.42);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease, backdrop-filter .28s ease;
}

/* ── hero ─────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 92vh; min-height: 92dvh; display: flex; align-items: flex-end; justify-content: center; padding: 40px 24px 64px; overflow: hidden; }
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background-image: var(--hero-img); background-size: cover;
  background-position: var(--hero-pos); background-repeat: no-repeat;
}
.hero-media video {
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;              /* decorative: never interactive */
  background: transparent;
  opacity: 0; transition: opacity .9s ease;
}
.hero-media video.is-playing { opacity: 1; }
/* WebKit paints a start-playback button over a poster until autoplay begins
   (iOS especially). This is a background, so suppress all media chrome. */
.hero-media video::-webkit-media-controls,
.hero-media video::-webkit-media-controls-panel,
.hero-media video::-webkit-media-controls-play-button,
.hero-media video::-webkit-media-controls-overlay-play-button,
.hero-media video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
}
.hero-media::after { content: ""; position: absolute; inset: 0; background: var(--hero-scrim); }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 900px; width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 22px; padding: 9px 15px; border: 0; border-radius: 5px;
  background: var(--badge-bg); color: var(--badge-fg);
  font-size: var(--badge); font-weight: 400; letter-spacing: -0.01em;
}
.badge-star { flex: none; filter: drop-shadow(0 0 3px rgba(255,255,255,0.45)); color: currentColor; }
.hero h1 { display: flex; flex-direction: column; align-items: center; }
.headline-line { display: block; overflow: hidden; padding: 0.06em 0.15em 0.14em; }
.hero .lede { max-width: 500px; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.hero-assure { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 34px; margin-top: 40px; color: var(--stat); font-size: var(--stat-size); letter-spacing: -0.015em; }
.hero-assure li { display: inline-flex; align-items: center; gap: 12px; }
.hero-assure svg { flex: none; color: var(--stat); }

/* ── sections ─────────────────────────────────────────────────── */
.section { padding: var(--sec) 0; border-top: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: clamp(38px, 4.6vw, 60px); }
.section-head .lede { margin-top: 18px; }

/* problem */
.pains { border-top: 1px solid var(--line-soft); max-width: 880px; }
.pains li { padding: 22px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); }
.turn { margin-top: clamp(34px, 4vw, 52px); font-size: clamp(20px, 2.3vw, 27px); line-height: 1.32; letter-spacing: -0.03em; max-width: 24ch; }

/* loop */
.flow { position: relative; height: 54px; margin-bottom: 22px; }
.flow-track { position: absolute; left: 12.5%; right: 12.5%; top: 50%; height: 2px; transform: translateY(-50%); background: var(--line); border-radius: 2px; }
.flow-fill { position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: left center; transform: scaleX(0); background: var(--accent); border-radius: 2px; }
.flow-dot { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--accent); opacity: 0; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.flow.js-on .flow-dot { opacity: 1; }
.flow-nodes { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4,1fr); align-items: center; }
.fnode { justify-self: center; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); position: relative; }
.fnode.done { border-color: var(--accent); background: var(--accent); }
.fnode.gate.holding { border-color: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); animation: gatePulse 1.2s ease-out infinite; }
@keyframes gatePulse { to { box-shadow: 0 0 0 14px transparent; } }
.flow-gate-label { position: absolute; top: calc(50% + 15px); left: 62.5%; transform: translateX(-50%); font-size: 12px; color: var(--accent-2); white-space: nowrap; opacity: 0; transition: opacity .3s ease; }
.flow-gate-label.on { opacity: 1; }

.loop { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.loop li { background: var(--bg); padding: clamp(20px,2.3vw,28px); display: flex; flex-direction: column; gap: 10px; }
.loop .n { font-size: 12px; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.loop p { font-size: 15px; color: var(--muted); }

/* glass panel */
.panel {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r-lg);
}

/* example */
.example { margin-top: clamp(34px,4vw,54px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.example > div { background: var(--bg); padding: clamp(22px,2.8vw,32px); }
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.steps li { display: flex; gap: 13px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.steps li:last-child { border-bottom: none; }
.steps .ic { flex: none; margin-top: 2px; color: var(--ok); }
.steps .ic.pending { color: var(--accent-2); }
.steps strong { display: block; font-weight: 500; font-size: 15px; }
.steps span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.meter dt { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.meter dd { margin: 0 0 20px; }
.bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transform-origin: left center; transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.bar-lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }

/* status pills */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.status.beta { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.status.demo { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.tile { padding: clamp(22px,2.4vw,28px); display: flex; flex-direction: column; gap: 11px; transition: border-color .3s ease, transform .3s ease; }
.tile:hover { border-color: var(--pill-border); transform: translateY(-2px); }
.tile.wide { grid-column: span 2; }
.tile .ic { color: var(--muted); margin-bottom: 4px; }
.tile p { font-size: 15px; color: var(--muted); }
.tile-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }

/* services */
.services { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.svc { padding: clamp(24px,2.7vw,32px); display: flex; flex-direction: column; gap: 13px; }
.svc p { font-size: 15px; color: var(--muted); }

/* controls */
.controls { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 clamp(30px,5vw,70px); }
.controls li { padding: 26px 0; border-top: 1px solid var(--line-soft); display: flex; gap: 16px; align-items: flex-start; }
.controls .ic { flex: none; color: var(--accent-2); margin-top: 3px; }
.controls p { font-size: 15px; color: var(--muted); margin-top: 7px; }

/* photo band */
.photo-band { position: relative; overflow: hidden; border-radius: var(--r-lg); isolation: isolate; background: #050505; border: 1px solid var(--line); display: grid; align-items: center; min-height: clamp(300px,36vw,420px); }
.photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; z-index: 0; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(4,4,4,0.93) 0%, rgba(4,4,4,0.74) 48%, rgba(4,4,4,0.22) 100%); }
.photo-band .band-in { position: relative; z-index: 2; padding: clamp(28px,4vw,54px); max-width: 640px; color: #fff; }
.photo-band .band-in h2, .photo-band .band-in em { color: #fff; }
.photo-band .band-in em { color: rgba(255,255,255,0.72); }
.photo-band .band-in p { color: rgba(255,255,255,0.80); margin-top: 18px; font-size: clamp(15px,1.4vw,17px); }
.band-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; margin-top: 20px; border-bottom: 1px solid rgba(255,255,255,0.35); padding-bottom: 3px; }
.band-link:hover { border-bottom-color: #fff; }
.band-about { min-height: clamp(260px,30vw,360px); }
.band-about::after { background: linear-gradient(180deg, rgba(4,4,4,0.30) 0%, rgba(4,4,4,0.12) 45%, rgba(4,4,4,0.46) 100%); }
.band-about img { object-position: 38% 46%; }
@media (max-width: 760px) { .photo-band::after { background: linear-gradient(180deg, rgba(4,4,4,0.80) 0%, rgba(4,4,4,0.92) 60%, rgba(4,4,4,0.96) 100%); } }

/* proof */
.proof { border-top: 1px solid var(--line-soft); }
.proof li { display: grid; grid-template-columns: minmax(150px,.85fr) 2fr auto; gap: clamp(16px,3vw,40px); align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line-soft); }
.proof h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.proof p { font-size: 15px; color: var(--muted); }
.proof li.reserved { opacity: .62; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,66px); align-items: start; margin-top: clamp(34px,4vw,52px); }
.about p + p { margin-top: 18px; }

/* close */
.close { padding: clamp(88px,10vw,150px) 0; text-align: center; border-top: 1px solid var(--line-soft); }
.close .lede { margin: 18px auto 0; max-width: 46ch; }
.close .hero-actions { margin-top: 30px; }

/* footer */
.foot { border-top: 1px solid var(--line-soft); padding: clamp(44px,5vw,66px) 0 40px; font-size: 14px; color: var(--muted); }
.foot-top { display: flex; gap: 30px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 36px; }
.foot-nav { display: flex; gap: clamp(28px,5vw,70px); flex-wrap: wrap; }
.foot-nav h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text); margin-bottom: 13px; }
.foot-nav a { display: block; padding: 5px 0; color: var(--muted); }
.foot-nav a:hover { color: var(--text); }
.foot-bottom { display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color .25s ease, border-color .25s ease; }
.socials a:hover { color: var(--text); border-color: var(--pill-border); }


/* ── mobile menu (own overlay, a direct child of <body>) ───────
   It must NOT live inside .header: that element has backdrop-filter,
   which makes it the containing block for position:fixed descendants
   and collapsed every link to 2px tall. ─────────────────────── */
.mmenu {
  position: fixed; inset: 0; z-index: 60;
  display: none; flex-direction: column;
  background: var(--menu-bg);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  padding: max(16px, env(safe-area-inset-top)) var(--gut) max(22px, env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .3s ease, visibility .3s ease, transform .38s cubic-bezier(.16,1,.3,1);
}
body.menu-open .mmenu { opacity: 1; visibility: visible; transform: none; }
.mmenu-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; flex: none; }
.mmenu-links { flex: 1 1 auto; overflow-y: auto; margin-top: 20px; min-height: 0; }
.mmenu-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 2px; border-bottom: 1px solid var(--line-soft);
  font-size: 23px; font-weight: 500; letter-spacing: -0.035em; color: var(--text);
}
.mmenu-links a .idx { font-size: 11px; letter-spacing: .1em; color: var(--muted); font-weight: 400; }
.mmenu-links a:active { opacity: .6; }
.mmenu-foot { flex: none; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.mmenu-foot .btn { width: 100%; height: 52px; font-size: 15px; }
.mmenu-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .mmenu { display: flex; } }

/* ── reveal ───────────────────────────────────────────────────── */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal.in { opacity: 1; transform: none; transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }

/* ── entrance ─────────────────────────────────────────────────── */
.appear { opacity: 1; animation-duration: 1.05s; animation-fill-mode: both; animation-timing-function: cubic-bezier(.16,1,.3,1); animation-delay: var(--d, .08s); }
.appear--scale { animation-name: in-scale; }
.appear--soft { animation-name: in-soft; }
.appear--mask { animation-name: in-mask; }
.appear--pop { animation-name: in-pop; }
.appear--btn { animation-name: in-btn; }
.appear--side { animation-name: in-side; }
.appear--stat { animation-name: in-stat; }
.lede.appear { animation-duration: 1.25s; }
.is-in { animation: none; opacity: 1; transform: none; clip-path: none; filter: none; }
@keyframes in-scale { from { opacity:0; transform:scale(.84);} to { opacity:1; transform:scale(1);} }
@keyframes in-soft { from { opacity:0; transform:translateY(14px);} to { opacity:1; transform:translateY(0);} }
@keyframes in-mask { from { opacity:0; transform:translateY(40%);} to { opacity:1; transform:translateY(0);} }
@keyframes in-pop { 0%{opacity:0;transform:scale(.9);} 70%{opacity:1;transform:scale(1.03);} 100%{opacity:1;transform:scale(1);} }
@keyframes in-btn { from { opacity:0; transform:translateY(18px) scale(.94);} to { opacity:1; transform:translateY(0) scale(1);} }
@keyframes in-side { from { opacity:0; transform:translateX(22px);} to { opacity:1; transform:translateX(0);} }
@keyframes in-stat { from { opacity:0; transform:translateY(20px);} to { opacity:1; transform:translateY(0);} }
.badge-star { animation: in-star .9s cubic-bezier(.16,1,.3,1) .28s both; }
@keyframes in-star { 0%{opacity:0;transform:scale(.2) rotate(-50deg);} 65%{opacity:1;transform:scale(1.2) rotate(8deg);} 100%{opacity:1;transform:scale(1) rotate(0);} }
.hero h1 em { animation: in-em 1.2s cubic-bezier(.16,1,.3,1) .72s both; }
@keyframes in-em { from { opacity:.35; filter:blur(4px);} to { opacity:1; filter:blur(0);} }

.theme-ready body, .theme-ready .panel, .theme-ready .header { transition: background-color .3s ease, border-color .3s ease, color .3s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .appear, .hero h1 em, .badge-star { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
  .bar i { transform: none !important; }
}

/* ── responsive ───────────────────────────────────────────────── */
@media (min-width: 1600px) {
  :root { --logo:17px; --logo-mark:24px; --nav:15px; --nav-h:44px; --btn:15px; --btn-h:44px; --hero-btn-h:48px; --h1:68px; --h2:46px; --lede:18px; --badge:13.5px; --stat-size:15px; --header-y:26px; --header-x:64px; --wrap:1360px; }
}
@media (min-width: 1920px) {
  :root { --h1:80px; --h2:52px; --lede:19px; --header-x:80px; --wrap:1440px; }
}
@media (max-width: 1279px) {
  :root { --h1:44px; --h2:34px; --header-x:28px; }
  .nav a { padding: 0 13px; }
  .nav { gap: 6px; }
}
@media (max-width: 1080px) {
  .bento, .services { grid-template-columns: repeat(2,1fr); }
  .tile.wide { grid-column: span 2; }
  .example, .about { grid-template-columns: 1fr; }
  .loop { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  :root { --h1:36px; --h2:30px; --lede:16px; --btn-h:46px; --hero-btn-h:48px; --header-x:18px; }
  .nav-desktop-only { display: none; }
  .burger { display: grid; }
  .menu-backdrop { display: block; }
  body.menu-open .menu-backdrop { opacity: 1; visibility: visible; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  body.menu-open { overflow: hidden; }
  .nav { display: none; }
  .header-in { grid-template-columns: 1fr auto auto; gap: 8px; }
  .logo, .nav-right, .burger { z-index: 80; }
  .hero { min-height: auto; padding: 56px 20px 56px; }
  .hero-assure { flex-direction: column; align-items: flex-start; width: fit-content; margin-inline: auto; gap: 12px; }
  .bento, .services, .controls, .loop { grid-template-columns: 1fr; }
  .tile.wide { grid-column: span 1; }
  .proof li { grid-template-columns: 1fr; gap: 10px; }
  .foot-top { flex-direction: column; }
}
@media (max-width: 560px) {
  :root { --h1:33px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

/* ==========================================================================
   Product board — reconstruction of the AICOS Jarvis Command Centre.
   Built in DOM so it themes, stays crisp at any density, and can animate.
   Every mission reference, state and "Unavailable" field is real product data.
   ========================================================================== */
.board {
  margin-top: clamp(34px, 4vw, 54px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  overflow: hidden;
  display: grid; grid-template-columns: 176px 1fr;
}
.board-rail { border-right: 1px solid var(--line-soft); padding: 18px 0; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
.rail-brand { display: flex; align-items: center; gap: 9px; padding: 0 16px 18px; }
.rail-brand .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent-2); display: grid; place-items: center; flex: none; }
.rail-brand .dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); display: block; }
.rail-brand b { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; display: block; line-height: 1.2; }
.rail-brand span { font-size: 8.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.rail-group { font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); padding: 14px 16px 7px; }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 12.5px; color: var(--muted); }
.rail-item i { width: 13px; height: 13px; border-radius: 3px; border: 1.2px solid currentColor; flex: none; opacity: .7; }
.rail-item.on { color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); border-left: 2px solid var(--accent-2); padding-left: 14px; }
.rail-foot { margin: 18px 12px 0; padding: 11px; border: 1px solid var(--line-soft); border-radius: 8px; }
.rail-foot .who { display: flex; align-items: center; gap: 9px; }
.rail-foot .av { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-size: 10px; color: var(--muted); flex: none; }
.rail-foot b { font-size: 12.5px; font-weight: 500; display: block; line-height: 1.25; }
.rail-foot small { font-size: 10px; color: var(--muted); }
.rail-foot .ready { margin-left: auto; font-size: 9px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.rail-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-top: 10px; font-size: 9px; color: var(--muted); }

.board-main { min-width: 0; display: flex; flex-direction: column; }
.board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 14px; flex-wrap: wrap; }
.board-eyebrow { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.board-head h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; margin-top: 2px; }
.board-head p { font-size: 12.5px; color: var(--muted); max-width: 62ch; margin-top: 6px; }
.live-chip { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 10.5px; color: var(--muted); flex: none; }
.live-chip b { display: block; font-size: 11.5px; font-weight: 500; color: var(--text); }

.board-grid { display: grid; grid-template-columns: 1fr 262px; gap: 12px; padding: 0 20px 20px; min-width: 0; }
.lanes-wrap { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; min-width: 0; }
.lanes-bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.lanes-bar span { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-size: 10.5px; display: inline-flex; align-items: center; gap: 6px; }
.lanes-bar span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.lanes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); overflow-x: auto; scrollbar-width: thin; }
.lane { background: var(--bg); padding: 11px 9px 14px; min-width: 0; }
.lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 10px; min-width: 0; flex-wrap: wrap; }
.lane-head b { font-size: 12px; font-weight: 500; }
.lane-head small { font-size: 9.5px; color: var(--muted); }
.lane-empty { font-size: 10.5px; color: var(--muted); line-height: 1.45; }

.mcard { border: 1px solid var(--line-soft); border-left: 2px solid var(--accent-2); border-radius: 6px; padding: 9px; margin-bottom: 8px; background: color-mix(in srgb, var(--panel-2) 70%, var(--bg)); }
.mcard:last-child { margin-bottom: 0; }
.mcard b { font-size: 11.5px; font-weight: 600; color: var(--accent-2); letter-spacing: 0.01em; }
.mcard p { font-size: 10.5px; color: var(--text); line-height: 1.35; margin: 4px 0 7px; overflow-wrap: anywhere; }
.mrow { display: flex; justify-content: space-between; gap: 6px; font-size: 9.5px; line-height: 1.5; min-width: 0; }
.mrow span, .mrow em { overflow-wrap: anywhere; }
.mrow span { color: var(--muted); }
.mrow em { font-style: normal; font-family: inherit; font-size: 9.5px; color: var(--text); letter-spacing: 0; }
.mcard.st-cancelled { border-left-color: var(--warn); }
.mcard.st-archived { border-left-color: var(--muted); }
.mcard.st-done { border-left-color: var(--ok); }
.mcard.st-paused { border-left-color: var(--warn); }

.inspector { border: 1px solid var(--line-soft); border-radius: 10px; padding: 13px; min-width: 0; }
.insp-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.insp-bar span { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-size: 10.5px; }
.insp-kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.insp-kv div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 10.5px; }
.insp-kv dt { color: var(--muted); }
.insp-kv dd { color: var(--text); }
.insp-note { margin-top: 12px; padding: 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: 10px; line-height: 1.45; color: var(--muted); }
.insp-btn { margin-top: 12px; width: 100%; height: 32px; font-size: 11px; }

@media (max-width: 1200px) {
  .board { grid-template-columns: 1fr; }
  .board-rail { display: none; }
}
@media (max-width: 980px) {
  .board-grid { grid-template-columns: 1fr; }
}
/* Phones: the board stops being a side-scrolling kanban and becomes a
   stacked list of the same lanes. Nothing is hidden, nothing scrolls sideways. */
@media (max-width: 900px) {
  /* the panel keeps its own height and scrolls internally, exactly as the real
     board does — so the mockup fits the screen instead of running for 2,300px */
  .lanes {
    grid-template-columns: 1fr; overflow-x: visible;
    max-height: 56vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .lanes-wrap { position: relative; }
  .lanes-wrap::after {
    content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 44px;
    pointer-events: none; border-radius: 0 0 9px 9px;
    background: linear-gradient(180deg, transparent, var(--bg) 92%);
  }
  .lane { min-width: 0; padding: 13px 14px 15px; }
  .lane-head b { font-size: 13.5px; }
  .lane-head small { font-size: 11px; }
  .lane-empty { font-size: 12px; }

  /* cards go two-up where there is room, so tall lanes stay compact */
  .lane-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mcard { margin-bottom: 0; padding: 9px; }
  .mcard b { font-size: 12px; }
  .mcard p { font-size: 11px; margin: 4px 0 6px; line-height: 1.3; }
  .mrow { font-size: 10.5px; line-height: 1.35; }

  .board-head { padding: 16px 16px 12px; }
  .board-head h3 { font-size: 26px; }
  .board-head p { font-size: 12.5px; }
  .board-grid { padding: 0 16px 16px; gap: 10px; }
  .insp-kv div { grid-template-columns: 104px 1fr; font-size: 11.5px; }
  .insp-note { font-size: 11px; }
}
@media (max-width: 389px) {
  .lane-cards { grid-template-columns: 1fr; }
}
