/* ==========================================================================
   Oculiz: base: tokens, reset, type, buttons, motion primitives
   Colours are lifted from the real app (frontend/style.css).
   ========================================================================== */

@font-face {
  font-family: "Michroma";
  src: url("../assets/fonts/Michroma-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-2: #080b0e;
  --panel: #0c0f10;
  --panel-2: #101514;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-accent: rgba(31, 227, 161, 0.3);

  --text: #eef4f1;
  --muted: #869590;
  --muted-2: #566360;

  --accent: #1fe3a1;
  --accent-2: #7cffce;
  --accent-soft: rgba(31, 227, 161, 0.12);
  --amber: #ffc46b;

  --font-display: "Sora", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-brand: "Michroma", "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --r-lg: 24px;
  --r-md: 16px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: rgba(31, 227, 161, 0.3); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

svg.ico, .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Film grain: only there to stop big dark gradients banding. It sits BEHIND
   the content (not over it) and is very light, so text and screenshots stay crisp. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-footer { position: relative; z-index: 1; }

/* Shortcut keys per platform: Ctrl+O on Windows, Cmd+O on Mac (set on <html> by the inline script in <head>). */
/* Both shortcuts are always shown: Ctrl+O (Windows) or Cmd+O (Mac). */
.kset { display: inline-flex; align-items: center; gap: inherit; }
.kor { font: 500 12px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); padding: 0 2px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 130; translate: -50% 0;
  max-width: calc(100% - 32px); padding: 13px 20px; border-radius: 999px;
  font-size: 14px; color: var(--text); background: rgba(10, 16, 14, 0.94); border: 1px solid var(--line-accent);
  backdrop-filter: blur(14px); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.35s, transform 0.5s var(--ease);
}
.toast.show { opacity: 1; transform: none; }

.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.wrap.narrow { width: min(820px, calc(100% - 48px)); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 11px/1 var(--font-brand);
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.eyebrow::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }

h2 {
  font: 700 clamp(34px, 5.2vw, 66px)/1.05 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h3 { font: 600 clamp(19px, 1.8vw, 22px)/1.25 var(--font-display); letter-spacing: -0.02em; }
.lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; max-width: 620px; margin: 22px auto 0; text-wrap: pretty; }
.micro { color: var(--muted-2); font-size: 13px; margin-top: 16px; }

.section { padding: clamp(90px, 12vw, 170px) 0; position: relative; }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head.center { text-align: center; max-width: 820px; margin-inline: auto; }

/* ---------- Keycaps ---------- */
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 42px; padding: 0 14px;
  font: 400 12px/1 var(--font-brand); letter-spacing: 0.06em; color: var(--accent-2);
  background: linear-gradient(180deg, #1b2422, #0f1514);
  border: 1px solid rgba(124, 255, 206, 0.22);
  border-bottom-width: 3px; border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
kbd.inline { min-width: 0; height: 26px; padding: 0 8px; font-size: 10px; border-radius: 7px; margin: 0 2px; vertical-align: 1px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
  font: 600 15px/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
  will-change: transform;
}
.btn-primary {
  background: var(--accent); color: #04110c;
  box-shadow: 0 12px 40px -12px rgba(31, 227, 161, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn-primary:hover { background: #3bf0b4; box-shadow: 0 18px 52px -12px rgba(31, 227, 161, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary .ico { transition: transform 0.35s var(--ease); }
.btn-primary:hover .ico { transform: translateX(4px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13.5px; }
.wl-form .btn-primary { animation: btnPulse 3.4s ease-out 2.5s infinite; }
@keyframes btnPulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 227, 161, 0.5), 0 12px 40px -12px rgba(31, 227, 161, 0.6); }
  60%, 100% { box-shadow: 0 0 0 18px rgba(31, 227, 161, 0), 0 12px 40px -12px rgba(31, 227, 161, 0.6); }
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-radius: 999px;
  font: 400 10.5px/1 var(--font-brand); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2);
  background: rgba(31, 227, 161, 0.07); border: 1px solid var(--line-accent);
  backdrop-filter: blur(10px);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(31, 227, 161, 0.6); animation: livePulse 1.8s ease-out infinite; flex-shrink: 0;
}
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(31, 227, 161, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(31, 227, 161, 0); } }

/* ---------- Reveal system (only when JS is on, so no-JS users see everything) ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.1em 0.03em 0.16em; margin: -0.1em -0.03em -0.16em; }
.js [data-split] .wi {
  display: inline-block; transform: translateY(118%) rotate(4deg); transform-origin: left bottom;
  transition: transform 1.15s var(--ease); transition-delay: calc(var(--i, 0) * 75ms + var(--base, 0ms));
}
.js [data-split].is-in .wi { transform: none; }
.hero-title .line { display: block; }
/* Without JS the line carries the gradient; with JS each split word does
   (background-clip:text breaks on transformed children, so never both). */
.grad {
  background: linear-gradient(100deg, #eafff6 0%, #7cffce 42%, #1fe3a1 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.js .grad { background: none; }
.js .grad .wi {
  background: linear-gradient(100deg, #eafff6 0%, #7cffce 45%, #1fe3a1 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: var(--bg);
}
.js .preloader { animation: preFail 0.5s ease 5s forwards; }
@keyframes preFail { to { opacity: 0; visibility: hidden; } }
.pre-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.pre-ring { position: relative; width: 132px; }
.pre-ring::before {
  content: ""; position: absolute; inset: -70%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(31, 227, 161, 0.55), transparent 62%);
  filter: blur(14px); animation: preGlow 1.6s ease-in-out infinite alternate;
}
.pre-ring img { animation: preIgnite 1.3s var(--ease) both, preSpin 6s linear infinite; }
@keyframes preIgnite { 0% { opacity: 0; transform: scale(0.55) rotate(-40deg); filter: blur(22px); } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes preSpin { to { rotate: 360deg; } }
@keyframes preGlow { from { opacity: 0.55; transform: scale(0.9); } to { opacity: 1; transform: scale(1.12); } }
.pre-word { width: 230px; clip-path: inset(0 100% 0 0); animation: preWipe 1.1s var(--ease) 0.55s forwards; filter: drop-shadow(0 0 14px rgba(31, 227, 161, 0.3)); }
@keyframes preWipe { to { clip-path: inset(0 0 0 0); } }
.preloader.done { animation: curtain 1s var(--ease) forwards; pointer-events: none; }
@keyframes curtain { 0% { opacity: 1; clip-path: inset(0 0 0 0); } 100% { opacity: 1; clip-path: inset(0 0 100% 0); visibility: hidden; } }

/* ---------- Chrome: scroll bar, cursor, dust, header ---------- */
.scroll-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120;
  background: linear-gradient(90deg, var(--accent-dim, #0e9e6f), var(--accent), var(--accent-2));
  transform: scaleX(var(--p, 0)); transform-origin: left; box-shadow: 0 0 12px var(--accent);
}
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; z-index: 0; pointer-events: none;
  border-radius: 50%; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(circle, rgba(31, 227, 161, 0.1), transparent 65%);
  translate: -50% -50%;
}
.dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.8; }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--header-h);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s, transform 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(5, 7, 10, 0.7); backdrop-filter: blur(20px) saturate(1.5); border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 36px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-ring { width: 30px; height: auto; filter: drop-shadow(0 0 10px rgba(31, 227, 161, 0.4)); }
.brand-word { height: 14px; width: auto; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { position: relative; font-size: 14px; color: var(--muted); transition: color 0.3s; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Reduced motion: everything visible, nothing moving ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js [data-split] .wi { opacity: 1; transform: none; }
  .preloader, .cursor-glow, .dust { display: none; }
}
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
