/* IOVO shared shell — nav, type, buttons, footer, reveal helpers, easter eggs.
   Tokens come from iovo-tokens.css (linked before this file). Pass 9: graphite, warm white, one amber accent. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink-0); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--ink-0); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(255, 154, 39, .32); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink-2); border-radius: var(--r-1); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 40px); } }

/* ---------- Type ---------- */
.mono, .eyebrow, .tag {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; line-height: 1.4;
}
.eyebrow { color: var(--accent); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.eyebrow.amber { color: var(--accent); }

.display, h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.03; }
h2 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.06; }
h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.015em; margin: 0; font-size: 20px; line-height: 1.3; }
h1 em, h2 em { font-style: normal; color: var(--text-3); }
h1 .lit, h2 .lit {
  background: linear-gradient(100deg, var(--accent-hi) 0%, var(--accent) 55%, var(--accent-lo) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; color: var(--text-2); max-width: 36em; margin: 0; font-weight: 300; }
p { text-wrap: pretty; }

/* ---------- Buttons: quiet glass, one solid amber primary ---------- */
.btn {
  --mx: 50%; --my: 50%;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: rgba(20, 22, 27, .6); color: var(--text); text-decoration: none; cursor: pointer;
  font-weight: 500; font-size: 15px; letter-spacing: -.005em; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .3s, background-color .3s, color .3s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .35s;
  background: radial-gradient(120px 80px at var(--mx) var(--my), rgba(244, 241, 236, .09), transparent 70%);
}
.btn:hover::before { opacity: 1; }
.btn:hover { border-color: rgba(244, 241, 236, .3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn.primary::before { background: radial-gradient(110px 70px at var(--mx) var(--my), rgba(255, 255, 255, .35), transparent 70%); }
.btn.primary:hover { background: #FFA83D; }
.btn.quiet { background: transparent; border-color: transparent; padding-inline: 6px; }
.btn.quiet:hover { border-color: transparent; color: var(--accent); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 68px; display: flex; align-items: center;
  transition: background-color .4s, border-color .4s, transform .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(7, 8, 11, .76); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-mark { display: inline-flex; align-items: center; height: 52px; text-decoration: none; }
.nav-mark img { height: 50px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
/* Language: a quiet text toggle. The primary action stays the only filled control in the nav. */
.lang { display: inline-flex; align-items: center; gap: 2px; }
.lang button {
  min-width: 36px; min-height: 44px; padding: 0 6px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; color: var(--text-3); transition: color .25s;
}
.lang button + button { position: relative; }
.lang button + button::before { content: ""; position: absolute; left: -1px; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--line-strong); }
.lang button[aria-pressed="true"] { color: var(--text); }
.lang button:not([aria-pressed="true"]):hover { color: var(--text-2); }
@media (max-width: 560px) {
  .nav { height: 60px; }
  .nav-mark img { height: 34px; }
  .nav .btn .long { display: none; }
  .nav .btn { padding: 0 14px; }
}
@media (min-width: 561px) { .nav .btn .short { display: none; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 10vw, 140px) 0; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent); border: 0; margin: 0; }

/* The thin water line: a brand moment (hero, /puronics/), the ring's blue → cyan, barely lit */
.waterline {
  position: relative; height: 1px; background: linear-gradient(90deg, transparent, rgba(11, 95, 224, .6) 18%, rgba(56, 200, 255, .85) 50%, rgba(11, 95, 224, .6) 82%, transparent);
}

/* ---------- Status tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--text-3); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.live { color: var(--live); }
.tag.pilot { color: var(--pilot); }
.tag.soon { color: var(--soon); }
.tag.soon::before { background: transparent; border: 1px solid currentColor; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.rv-line { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease-water); transition-delay: var(--d, 0s); }
.rv-line.in { clip-path: inset(0 0 0 0); }
.no-js .rv, .no-js .rv-line { opacity: 1; transform: none; clip-path: none; }

/* Text glitch on language change (tiny, mono-scramble) */
.glitching { text-shadow: 1px 0 rgba(255, 154, 39, .4); }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; padding: 72px 0 40px; border-top: 1px solid var(--line); }
.footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 32px 48px; align-items: center; }
.footer-mark img { height: 56px; width: auto; }
.footer-cols { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 36px; }
.footer-cols a { text-decoration: none; color: var(--text-2); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.footer-cols a:hover { color: var(--text); }
.footer-fine { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; line-height: 1.6; }
.footer-fine p { margin: 0; max-width: 72ch; }
@media (max-width: 760px) {
  .footer .wrap { grid-template-columns: 1fr; }
  .footer-cols { justify-content: flex-start; }
}

/* ---------- Easter eggs (assets/eggs.js). Each ≤ ~600 ms of motion, never blocks content, off under reduced motion ---------- */
.egg-mark { position: relative; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
.egg-mark img { position: relative; z-index: 1; }
.egg-ring { position: absolute; z-index: 0; left: 50%; top: 49.5%; width: 62%; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--accent);
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.egg-ring.go { animation: egg-ring .6s var(--ease-out) both; }
@keyframes egg-ring { from { opacity: .9; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(2.3); } }
.egg-drop { position: absolute; z-index: 2; left: 69.9%; top: 30.7%; width: 6px; height: 8px; margin: -2px 0 0 -3px; pointer-events: none; opacity: 0;
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; background: radial-gradient(circle at 40% 70%, #FFD36B, var(--accent) 55%, var(--accent-lo)); }
.egg-drop.go { animation: egg-drip .6s cubic-bezier(.5, 0, .75, .4) both; }
@keyframes egg-drip { 0% { opacity: 0; transform: translateY(0) scale(.6, .6); } 25% { opacity: 1; transform: translateY(2px) scale(.9, 1.25); } 100% { opacity: 0; transform: translateY(26px) scale(.7, 1.1); } }
/* 5 taps on the mark: the node blooms (a warm flower of light from the amber node) */
.egg-bloom { position: absolute; z-index: 3; left: 69.9%; top: 30.7%; width: 0; height: 0; pointer-events: none; }
.egg-bloom i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 40% 35%, #FFE2A0, var(--accent) 60%, var(--accent-lo)); }
.egg-bloom b { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 194, 71, .9), rgba(255, 154, 39, .35) 55%, transparent); }
.egg-bloom.go b { animation: egg-bloom-core .64s var(--ease-out) both; }
.egg-bloom.go i { animation: egg-petal .64s var(--ease-out) both; animation-delay: calc(var(--k) * 12ms); }
@keyframes egg-bloom-core { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(2.6); } 100% { opacity: 0; transform: scale(4.2); } }
.egg-bloom-xl { transform: scale(3.2); }
.egg-node-hit { position: absolute; z-index: 4; left: 69.9%; top: 30.7%; width: 16%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); -webkit-tap-highlight-color: transparent; }
@keyframes egg-petal { 0% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(34px) scale(.2); } }
.egg-gauge { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask-size: auto 50px; mask-size: auto 50px; -webkit-mask-position: 0 50%; mask-position: 0 50%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.egg-gauge i { position: absolute; inset: 0; transform: translateY(101%); transition: transform .6s var(--ease-water);
  background: linear-gradient(0deg, rgba(56, 200, 255, .9), rgba(139, 232, 255, .7) 70%, rgba(234, 251, 255, .95)); }
.egg-mark.filling .egg-gauge i { transform: translateY(0); transition: transform 1.35s linear; }
@media (max-width: 560px) { .egg-gauge { -webkit-mask-size: auto 34px; mask-size: auto 34px; } }
.egg-sweep { position: absolute; left: 0; bottom: 18px; width: 58px; height: 90px; stroke: var(--text-2); stroke-width: 1.5; opacity: 0; pointer-events: none; transform: translateX(-80px); }
.egg-sweep.go { animation: egg-sweep .6s cubic-bezier(.45, .05, .35, 1) both; }
@keyframes egg-sweep { 0% { opacity: 0; transform: translateX(-80px); } 15%, 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(calc(100vw + 20px)); } }
/* The footer drop: tap it and it ripples */
.egg-water { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -12px -6px -12px 2px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-3); vertical-align: middle; -webkit-tap-highlight-color: transparent; }
.egg-water svg { width: 12px; height: 15px; transition: color .3s; }
.egg-water:hover svg { color: var(--accent); }
.egg-water i { position: absolute; left: 50%; top: 58%; width: 12px; height: 5px; margin: -2.5px 0 0 -6px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; pointer-events: none; }
.egg-water.go svg { animation: egg-plip .6s var(--ease-snap); }
.egg-water.go i { animation: egg-ripple .6s var(--ease-out) both; animation-delay: calc(var(--k) * 110ms); }
@keyframes egg-plip { 30% { transform: translateY(-3px) scale(.9, 1.1); } 60% { transform: translateY(1px) scale(1.12, .88); } }
@keyframes egg-ripple { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(3.4); } }
/* The Konami code: AQUIS pops in and waves (everywhere the 3D AQUIS isn't on screen) */
.egg-aquis { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 84px; height: 84px; pointer-events: none;
  border-radius: 50%; overflow: hidden; background: var(--ink-1); border: 1px solid var(--line-strong); opacity: 0; transform: translateY(24px) scale(.8); }
.egg-aquis img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.5) translateY(4%); filter: brightness(.85) saturate(.9); transform-origin: 50% 70%; }
.egg-aquis.go { animation: egg-aquis-in 1.6s var(--ease-out) both; }
.egg-aquis.go img { animation: egg-wave .9s .25s ease-in-out both; }
@keyframes egg-aquis-in { 0% { opacity: 0; transform: translateY(24px) scale(.8); } 18%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(12px) scale(.9); } }
@keyframes egg-wave { 0%, 100% { transform: scale(1.5) translateY(4%) rotate(0); } 20% { transform: scale(1.5) translateY(4%) rotate(-12deg); } 45% { transform: scale(1.5) translateY(4%) rotate(10deg); } 70% { transform: scale(1.5) translateY(4%) rotate(-7deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
  .rv-line { clip-path: none; }
}
