/* ============================================================
   FrostFlip — Switchable PDLC Film
   Editorial design system (MODS-reference): Inter Tight display
   type with tight tracking, Fragment Mono annotations, monochrome
   surfaces with a single blue accent, light/dark theming.
   ============================================================ */

:root {
  --accent: #0099FF;        /* clarity blue — the only chromatic voice */
  --accent-rgb: 0, 153, 255; /* keep in sync with --accent for rgba() uses */
  --accent-2: #0055D4;      /* deep blue — gradient end, used sparingly */
  --spark: #FFAA1D;         /* theme-toggle flash only */
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));

  --bg: #FFFFFF;
  --bg-2: #F5F5F5;
  --surface: #F5F5F5;
  --surface-solid: #FFFFFF;
  --border: #E9E9E9;
  --text: #0A0A0A;
  --text-2: #666666;
  --text-3: #999999;
  --shadow: 0 8px 30px -14px rgba(10, 10, 10, 0.12);
  --shadow-lg: 0 24px 70px -24px rgba(10, 10, 10, 0.22);
  --frost-tint: rgba(255, 255, 255, 0.55);
  --nav-bg: rgba(255, 255, 255, 0.84);
  --hero-glow-1: transparent;
  --hero-glow-2: transparent;
  --dot-color: transparent;

  --radius: 16px;
  --radius-sm: 10px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* toggles/switches only */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);        /* everything else */
  --font-display: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Fragment Mono", "Cascadia Code", Consolas, monospace;
  --font: var(--font-body);
}

[data-theme="dark"] {
  --accent: #38B6FF;
  --accent-rgb: 56, 182, 255;
  --accent-2: #4D7CFE;
  --spark: #FFC24B;

  --bg: #0A0A0A;
  --bg-2: #101010;
  --surface: #161616;
  --surface-solid: #121212;
  --border: rgba(255, 255, 255, 0.10);
  --text: #F5F5F5;
  --text-2: #A0A0A0;
  --text-3: #6E6E6E;
  --shadow: 0 8px 30px -14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 70px -24px rgba(0, 0, 0, 0.65);
  --frost-tint: rgba(150, 175, 215, 0.26);
  --nav-bg: rgba(10, 10, 10, 0.84);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  transition: background 0.45s ease, color 0.45s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(var(--accent-rgb), 0.25); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.mono { font-family: var(--font-mono); letter-spacing: 0; }

/* Legacy motif classes — neutralized in the editorial system. */
.dot-grid { background-image: none; }
.border-beam::before { content: none; }
.frost-hover::after { content: none; }
.ambient { display: none; }
.cursor-glow { display: none; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ============================ NAV ============================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.45s ease;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 18px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 650; font-size: 1.15rem; letter-spacing: -0.02em;
}
.logo svg { width: 28px; height: 28px; }
.logo .lg-accent { color: var(--accent); }

.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; }
.nav-links a {
  padding: 8px 13px; font-weight: 500;
  font-size: 0.92rem; color: var(--text-2);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%) scale(0);
  transition: transform 0.25s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: translateX(-50%) scale(1); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  font-weight: 500; font-size: 0.88rem; white-space: nowrap;
  padding: 10px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-out);
}
.nav-cta:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  display: grid; place-items: center;
  transition: transform 0.4s var(--ease-spring), border-color 0.3s;
  position: relative; overflow: hidden;
}
.theme-toggle:hover { transform: rotate(25deg); border-color: var(--text-3); }
.theme-toggle .tt-icon {
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
  position: absolute; display: grid; place-items: center; color: var(--text);
}
.theme-toggle .tt-sun { opacity: 0; transform: translateY(120%); }
.theme-toggle .tt-moon { opacity: 1; transform: translateY(0); }
[data-theme="dark"] .theme-toggle .tt-sun { opacity: 1; transform: translateY(0); }
[data-theme="dark"] .theme-toggle .tt-moon { opacity: 0; transform: translateY(-120%); }

.hamburger {
  display: none; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  width: 18px; height: 1.5px; background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: none;
  font-weight: 500; font-size: 0.95rem;
  transition: transform 0.25s var(--ease-out), background 0.25s, color 0.25s,
    border-color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }

/* ============================ HERO ============================ */
.hero { padding: 168px 0 0; position: relative; }
#particles { display: none; }
.hero-grid { display: block; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--text-3);
  animation: fadeUp 0.8s var(--ease-out) both;
}
.hero-eyebrow::before { content: "("; }
.hero-eyebrow::after { content: ")"; }
.hero-eyebrow .dot { display: none; }
.hero h1 {
  font-size: clamp(2.9rem, calc(1.388rem + 5.55vw), 6.4rem); font-weight: 620;
  letter-spacing: -0.05em; line-height: 0.98;
  margin: 22px 0 0; max-width: 15ch;
  animation: fadeUp 0.8s 0.08s var(--ease-out) both;
}
.hero h1 .grad-text { color: var(--accent); }
.hero-sub {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; margin-top: 34px;
  animation: fadeUp 0.8s 0.18s var(--ease-out) both;
}
.hero p.lead { font-size: 1.1rem; color: var(--text-2); max-width: 32.5rem; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- interactive hero glass demo (real photo pair) --- */
.demo-wrap { position: relative; margin-top: clamp(40px, calc(18.0px + 4.5vw), 64px); animation: fadeUp 0.9s 0.26s var(--ease-out) both; }
.glass-demo {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  aspect-ratio: 16/8.2; max-height: min(640px, 74vh); isolation: isolate;
}
.glass-demo .gd-scene {
  position: absolute; inset: 0;
  background: url("../assets/images/hero-office.jpg") center/cover,
    linear-gradient(160deg, #1e3a5f, #2d6a8f 50%, #7fb2c9);
}
.glass-demo .gd-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; margin: 0;
}
.glass-demo .gd-photo.frost { opacity: var(--frost-op, 1); z-index: 1; transition: opacity 0.5s ease; }
.glass-demo .gd-frost {
  position: absolute; inset: 0; z-index: 2;
  backdrop-filter: blur(var(--frost-blur, 22px)) saturate(0.85);
  -webkit-backdrop-filter: blur(var(--frost-blur, 22px)) saturate(0.85);
  background: var(--frost-tint);
  transition: backdrop-filter 0.5s ease, background 0.5s ease, opacity 0.5s ease;
}
.glass-demo.is-clear .gd-frost { backdrop-filter: blur(0px) saturate(1); background: rgba(255,255,255,0.02); }
.glass-demo .gd-sheen {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.18) 45%, transparent 60%);
  transform: translateX(-120%);
}
.glass-demo:hover .gd-sheen { animation: sheen 1.4s ease; }
.gd-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.72));
  color: #fff;
}
.gd-state { font-family: var(--font-mono); font-size: 0.8rem; }
.gd-state .st-clear { color: #6ee7a0; display: none; }
.gd-state .st-frost { color: #8fd0ff; }
.glass-demo.is-clear .st-clear { display: inline; }
.glass-demo.is-clear .st-frost { display: none; }

.power-switch {
  width: 68px; height: 36px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.25); position: relative;
  transition: background 0.35s;
  flex-shrink: 0;
}
.power-switch::after {
  content: "⚡"; position: absolute; top: 4px; left: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: #0A0A0A;
  display: grid; place-items: center; font-size: 0.8rem;
  transition: transform 0.35s var(--ease-spring);
}
.power-switch.on { background: var(--accent); }
.power-switch.on::after { transform: translateX(32px); }

.gd-slider { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 220px; }
.gd-slider input[type="range"] { flex: 1; accent-color: var(--accent); }
.gd-slider label { font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.85; white-space: nowrap; }

/* floating hero chips — retired; kept harmless for stray markup */
.hero-chip { display: none; }

/* ============================ SECTIONS ============================ */
section { padding: clamp(72px, calc(27.0px + 6.75vw), 118px) 0; position: relative; }
.sec-head { text-align: left; max-width: 50.0rem; margin: 0 0 clamp(36px, calc(15.0px + 3.75vw), 56px); }
.sec-head h2 { font-size: clamp(2rem, calc(0.825rem + 3.3vw), 3.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; }
.sec-head p { color: var(--text-2); margin-top: 16px; font-size: 1.05rem; max-width: 38.75rem; }

.sec-eyebrow, .kicker {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--text-3);
  background: none; border: none; border-radius: 0; padding: 0;
  margin-bottom: 14px;
}
.sec-eyebrow::before, .kicker::before { content: "("; }
.sec-eyebrow::after, .kicker::after { content: ")"; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; } .reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; } .reveal-d4 { transition-delay: 0.32s; }

/* ---------- stats strip: editorial numerals over hairlines ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-card {
  text-align: left; padding: 22px 26px 4px;
  background: none; border: none; box-shadow: none; border-radius: 0;
  border-top: 1px solid var(--border);
  transition: border-color 0.3s;
}
.stat-card:hover { border-top-color: var(--text); }
.stat-card .num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, calc(0.862rem + 3.45vw), 3.9rem);
  letter-spacing: -0.04em; line-height: 1; color: var(--text);
}
.stat-card .lbl { font-size: 0.85rem; color: var(--text-3); margin-top: 10px; }

/* ---------- marquee: quiet mono ticker ---------- */
.marquee {
  overflow: hidden; white-space: nowrap; padding: 15px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  user-select: none;
}
.marquee-track {
  display: inline-flex; align-items: baseline; gap: 48px; padding-right: 48px;
  animation: marqueeScroll 32s linear infinite; will-change: transform;
}
.marquee span {
  font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  color: var(--text-3);
}
.marquee .outline { color: var(--text-3); -webkit-text-stroke: 0; }
.marquee .accent { color: var(--accent); }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- editorial statement (homepage about block) ---------- */
.statement-p {
  font-family: var(--font-display); font-weight: 550;
  font-size: clamp(1.5rem, calc(0.637rem + 2.55vw), 2.6rem);
  letter-spacing: -0.03em; line-height: 1.22;
  max-width: 57.5rem;
}
.statement-p em { font-style: normal; color: var(--text-3); }
.statement-p .st-accent { color: var(--accent); }

/* ---------- science / how it works ---------- */
.science-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.molecule-panel {
  border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--surface-solid); border: 1px solid var(--border);
}
#moleculeCanvas { width: 100%; height: 380px; display: block; }
.mol-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-top: 1px solid var(--border);
}
.mol-label { font-weight: 600; font-size: 0.92rem; }
.mol-label small { display: block; font-weight: 400; color: var(--text-3); }

.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 20px; padding: 22px 4px;
  border-top: 1px solid var(--border);
  transition: background 0.3s, padding 0.3s var(--ease-out);
  cursor: default;
}
.step:hover { padding-left: 12px; }
.step-n {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-3); width: auto; height: auto;
  background: none; border-radius: 0; box-shadow: none;
  display: block; padding-top: 3px;
}
.step-n::before { content: "("; }
.step-n::after { content: ")"; }
.step h4 { font-size: 1.08rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.step p { color: var(--text-2); font-size: 0.95rem; }

/* ---------- features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid transparent;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  position: relative; overflow: hidden;
}
.feature-card:hover { border-color: var(--border); transform: translateY(-4px); }
.feature-card::before { content: none; }
.feature-card .f-icon {
  width: 48px; height: 48px; border-radius: 12px; font-size: 1.3rem;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); box-shadow: none; transform: none;
}
[data-theme="dark"] .feature-card .f-icon { background: var(--surface-solid); }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-card p { color: var(--text-2); font-size: 0.94rem; }

/* ---------- switch-compare: real photo pair, clear vs frosted ----------
   Two identical shots — glass clear vs glass frosted — split at --cut.
   The glass IN the photo switches; no fake blur overlay. */
.switch-compare {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 16/9; max-height: 70vh; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  user-select: none; touch-action: none; cursor: ew-resize; isolation: isolate;
  background: var(--bg-2);
}
.switch-compare img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; margin: 0;
}
.switch-compare .sc-frost { clip-path: inset(0 0 0 var(--cut, 50%)); }
.switch-compare .cmp-handle {
  position: absolute; top: 0; bottom: 0; left: var(--cut, 50%);
  width: 2px; background: #fff; z-index: 3;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35); transform: translateX(-50%);
}
.switch-compare .cmp-handle::after {
  content: "⇄"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: #0A0A0A; font-size: 1.1rem;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.switch-compare .cmp-handle:focus-visible { outline: none; }
.switch-compare .cmp-handle:focus-visible::after { box-shadow: 0 0 0 3px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.3); }
.cmp-tag {
  position: absolute; top: 16px; z-index: 2;
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em;
  text-transform: none; font-weight: 400;
  background: rgba(10, 10, 10, 0.55); color: #fff;
  backdrop-filter: blur(6px);
}
.cmp-tag.left { left: 16px; } .cmp-tag.right { right: 16px; }

/* legacy blur comparator (unused pages safe) */
.compare { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 21/9; border: 1px solid var(--border); user-select: none; touch-action: none; cursor: ew-resize; }
.compare .cmp-img { position: absolute; inset: 0; background: url("../assets/images/compare-room.jpg") center/cover; }
.compare .cmp-frost { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut, 50%)); backdrop-filter: blur(20px) saturate(0.85); background: var(--frost-tint); }
.compare .cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; background: #fff; z-index: 3; transform: translateX(-50%); }

/* ---------- use-case rows (alternating editorial blocks) ---------- */
.uc-row {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, calc(15.0px + 3.75vw), 72px); align-items: center;
  padding: clamp(30px, calc(12.0px + 3.0vw), 54px) 0;
  border-top: 1px solid var(--border);
}
.uc-row:first-of-type { border-top: none; }
.uc-row.flip .uc-media { order: 2; }
.uc-media .switch-compare { aspect-ratio: 16/9; }
.uc-num {
  font-family: var(--font-mono); font-weight: 400; line-height: 1;
  font-size: 0.9rem; color: var(--text-3);
  -webkit-text-stroke: 0;
}
.uc-num::before { content: "("; }
.uc-num::after { content: ")"; }
.uc-copy h3 {
  font-size: clamp(1.7rem, calc(0.6rem + 2.4vw), 2.5rem); font-weight: 600;
  letter-spacing: -0.035em; line-height: 1.02; margin: 14px 0 14px;
}
.uc-copy p { color: var(--text-2); max-width: 30.0rem; }
.uc-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 20px;
  font-weight: 500; font-size: 0.95rem; color: var(--text);
  border-bottom: 1px solid var(--border); padding-bottom: 3px;
  transition: border-color 0.3s, color 0.3s;
}
.uc-link:hover { color: var(--accent); border-color: var(--accent); }
.uc-link svg, .uc-link .arr { transition: transform 0.3s var(--ease-out); }
.uc-link:hover .arr { transform: translateX(5px); }

/* ---------- applications ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.app-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/4.6; border: 1px solid var(--border); cursor: pointer;
}
.app-card .ac-img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform 0.7s var(--ease-out);
}
.app-card:hover .ac-img { transform: scale(1.06); }
.app-card .ac-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; color: #fff;
  background: linear-gradient(transparent 35%, rgba(10, 10, 10, 0.85));
}
.app-card h3 { font-size: 1.25rem; margin-bottom: 6px; letter-spacing: -0.02em; }
.app-card p {
  font-size: 0.9rem; opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.45s, max-height 0.45s; color: #cfcfcf;
}
.app-card:hover p { opacity: 1; max-height: 120px; }
.app-card .ac-num {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: #fff;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(10,10,10,0.4); backdrop-filter: blur(8px);
}
.ac-home    { background-image: url("../assets/images/app-home.jpg"),    linear-gradient(160deg, #4a5568, #718096); }
.ac-office  { background-image: url("../assets/images/app-office.jpg"),  linear-gradient(160deg, #1d4e6b, #4a90b8); }
.ac-health  { background-image: url("../assets/images/app-health.jpg"),  linear-gradient(160deg, #1a6b5a, #52b8a0); }
.ac-hotel   { background-image: url("../assets/images/app-hotel.jpg"),   linear-gradient(160deg, #8f5c2e, #d8a86b); }
.ac-retail  { background-image: url("../assets/images/app-retail.jpg"),  linear-gradient(160deg, #6b2e4a, #b86b8f); }
.ac-auto    { background-image: url("../assets/images/app-auto.jpg"),    linear-gradient(160deg, #2e3a5f, #6b7cb8); }

/* ---------- page-teaser cards (homepage directory) ---------- */
.teaser-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, calc(9.0px + 2.25vw), 40px); }
.teaser { display: block; position: relative; }
.teaser .t-media {
  display: block; position: relative; aspect-ratio: 16/10;
  border-radius: var(--radius); overflow: hidden; background: var(--bg-2);
  border: 1px solid var(--border);
}
.teaser .t-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.7s var(--ease-out);
}
.teaser:hover .t-media img { transform: scale(1.05); }
.teaser-body { padding: 18px 2px 0; }
.teaser-body .t-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.teaser-body .kicker { margin-bottom: 8px; }
.teaser-body .t-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); }
.teaser-body h3 {
  font-size: clamp(1.25rem, calc(0.375rem + 1.5vw), 1.55rem); font-weight: 600;
  letter-spacing: -0.02em; margin: 2px 0 6px; color: var(--text);
  transition: color 0.25s;
}
.teaser:hover .teaser-body h3 { color: var(--accent); }
.teaser-body p { font-size: 0.94rem; color: var(--text-2); max-width: 28.75rem; }
.teaser-body .arr-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-weight: 500; font-size: 0.9rem; color: var(--text);
}
.teaser:hover .arr-cta { color: var(--accent); }

/* ---------- testimonials ---------- */
.testi-wrap { position: relative; max-width: 48.75rem; margin: 0 auto; }
.testi-track { overflow: hidden; border-radius: var(--radius); }
.testi-slides { display: flex; transition: transform 0.6s var(--ease-out); }
.testi {
  flex: 0 0 100%; padding: 48px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
}
.testi .quote {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  font-style: normal; letter-spacing: -0.02em; line-height: 1.35; color: var(--text);
}
.testi .who { margin-top: 22px; font-weight: 600; }
.testi .role { color: var(--text-3); font-size: 0.88rem; }
.testi .stars { color: var(--accent); font-size: 0.95rem; letter-spacing: 3px; margin-bottom: 14px; }
.testi-nav { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.testi-dot {
  width: 8px; height: 8px; border-radius: 999px; border: none;
  background: var(--border); transition: width 0.3s, background 0.3s;
  box-sizing: content-box; padding: 8px 6px; background-clip: content-box;
}
.testi-dot.active { width: 26px; background: var(--text); }
.testi-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 1rem; color: var(--text); z-index: 2;
  transition: transform 0.25s var(--ease-out), border-color 0.25s;
}
.testi-arrow:hover { transform: translateY(-50%) scale(1.08); border-color: var(--text); }
.testi-arrow.prev { left: -22px; } .testi-arrow.next { right: -22px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 47.5rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border: none; border-top: 1px solid var(--border);
  background: none; border-radius: 0; overflow: hidden;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item.open { box-shadow: none; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 22px 4px; background: none; border: none;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 550; letter-spacing: -0.01em;
  color: var(--text); text-align: left; gap: 12px;
  transition: color 0.25s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .chev { transition: transform 0.35s var(--ease-spring); font-size: 0.8rem; color: var(--text-3); }
.faq-item.open .chev { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease-out);
  color: var(--text-2); font-size: 0.96rem;
}
.faq-a > div { padding: 0 4px 24px; max-width: 40.0rem; }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 24px; padding: clamp(48px, calc(21.0px + 5.25vw), 84px) clamp(28px, calc(15.0px + 3.75vw), 72px);
  text-align: left;
  background: var(--text); color: var(--bg);
  position: relative; overflow: hidden; box-shadow: none;
}
.cta-band::before, .cta-band::after { content: none; }
.cta-band h2 {
  font-size: clamp(2.1rem, calc(0.9rem + 3.6vw), 3.7rem); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1; position: relative; z-index: 1;
}
.cta-band p { margin: 16px 0 30px; max-width: 32.5rem; opacity: 0.75; position: relative; z-index: 1; }
.cta-band .btn { background: var(--bg); color: var(--text); position: relative; z-index: 1; }
.cta-band .btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.cta-benefits {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, calc(12.0px + 3.0vw), 48px);
  margin-top: clamp(36px, calc(15.0px + 3.75vw), 56px); position: relative; z-index: 1;
}
.cta-benefits > div { border-top: 1px solid rgba(128, 128, 128, 0.35); padding-top: 18px; }
.cta-benefits .cb-n { font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.6; }
.cta-benefits h4 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 8px 0 4px; }
.cta-benefits p { font-size: 0.92rem; opacity: 0.7; margin: 0; max-width: 380px; }

/* ============================ FOOTER ============================ */
footer {
  border-top: 1px solid var(--border); padding: 0 0 30px;
  background: var(--bg); transition: background 0.45s;
}
.footer-cta { padding: clamp(64px, calc(27.0px + 6.75vw), 108px) 0 clamp(48px, calc(21.0px + 5.25vw), 84px); }
.footer-cta .kicker { margin-bottom: 18px; }
.footer-cta h2 {
  font-size: clamp(2.5rem, calc(1.312rem + 5.25vw), 5.2rem); font-weight: 620;
  letter-spacing: -0.05em; line-height: 0.98;
}
.footer-cta .f-mail {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  font-family: var(--font-mono); font-size: clamp(0.95rem, calc(0.3rem + 1.2vw), 1.15rem);
  color: var(--text-2); border-bottom: 1px solid var(--border); padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.footer-cta .f-mail:hover { color: var(--accent); border-color: var(--accent); }

.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-top: 48px; border-top: 1px solid var(--border); margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.8rem; color: var(--text-3); margin-bottom: 18px;
  text-transform: none; letter-spacing: 0;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid ul a { color: var(--text-2); font-size: 0.94rem; transition: color 0.2s; }
.footer-grid ul a:hover { color: var(--text); }
.footer-grid .f-addr { color: var(--text-2); font-size: 0.94rem; line-height: 1.5; }
.footer-about p { color: var(--text-2); font-size: 0.94rem; margin-top: 14px; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  color: var(--text-3); font-size: 0.82rem; font-family: var(--font-mono);
}
.az-credit { text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.az-credit:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: transparent; color: var(--text-2);
  transition: transform 0.25s var(--ease-out), border-color 0.25s, color 0.25s;
}
.socials a:hover { transform: translateY(-3px); border-color: var(--text); color: var(--text); }

/* ============================ PAGE HERO (sub pages) ============================ */
.page-hero { padding: 168px 0 40px; text-align: left; }
.page-hero h1 {
  font-size: clamp(2.6rem, calc(1.219rem + 4.875vw), 5.2rem); font-weight: 620;
  letter-spacing: -0.05em; line-height: 0.98;
}
.page-hero h1 .grad-text { color: var(--accent); }
.page-hero p { color: var(--text-2); max-width: 38.75rem; margin: 18px 0 0; font-size: 1.08rem; }

/* ============================ GAMES PAGE ============================ */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.game-card {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid transparent; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--border); }
.game-card .g-emoji { font-size: 2.2rem; }
.game-card h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.game-card p { color: var(--text-2); font-size: 0.93rem; flex: 1; }
.game-card .g-best {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.game-card .btn { align-self: flex-start; padding: 11px 22px; font-size: 0.9rem; }
.game-card .g-diff {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 400;
  padding: 5px 11px; border-radius: 999px; letter-spacing: 0.04em; text-transform: none;
}
.g-diff.easy { background: rgba(34,197,94,0.12); color: #16a34a; }
.g-diff.med  { background: rgba(245,158,11,0.12); color: #d97706; }
.g-diff.hard { background: rgba(239,68,68,0.12); color: #dc2626; }
[data-theme="dark"] .g-diff.easy { color: #4ade80; }
[data-theme="dark"] .g-diff.med { color: #fbbf24; }
[data-theme="dark"] .g-diff.hard { color: #f87171; }

/* game modal */
.game-modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.game-modal.open { display: flex; }
.gm-backdrop {
  position: absolute; inset: 0; background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(8px);
}
.gm-panel {
  position: relative; z-index: 1; width: min(860px, 100%);
  max-height: 92vh; overflow-y: auto;
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--ease-out);
}
.gm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 26px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface-solid); z-index: 5;
}
.gm-head h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.gm-close {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; font-size: 0.95rem; color: var(--text);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}
.gm-close:hover { transform: rotate(90deg); background: var(--text); color: var(--bg); }
.gm-body { padding: 26px; }
.gm-hud { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.hud-chip {
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--surface); border: 1px solid var(--border);
}
.hud-chip span { color: var(--accent); }

/* reaction game */
.rx-arena {
  border-radius: var(--radius); aspect-ratio: 16/8.5; position: relative;
  overflow: hidden; cursor: pointer; border: 1px solid var(--border);
  display: grid; place-items: center; text-align: center;
  background: linear-gradient(150deg, #24435f, #3d7ea6 55%, #a8cfdd);
}
.rx-arena .rx-frost {
  position: absolute; inset: 0;
  backdrop-filter: blur(22px); background: var(--frost-tint);
  transition: backdrop-filter 0.18s, background 0.18s;
}
.rx-arena.clear .rx-frost { backdrop-filter: blur(0px); background: transparent; }
.rx-arena .rx-msg {
  position: relative; z-index: 2; color: #fff; font-weight: 600;
  font-family: var(--font-display); letter-spacing: -0.01em;
  font-size: clamp(1.1rem, calc(0.45rem + 1.8vw), 1.5rem); padding: 0 30px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.rx-arena.tooearly { background: linear-gradient(150deg, #7f1d1d, #b91c1c); }

/* memory game */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-card { aspect-ratio: 1; perspective: 600px; cursor: pointer; border: none; background: none; }
.mem-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.5s var(--ease-spring);
}
.mem-card.flipped .mem-inner, .mem-card.matched .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; border-radius: 12px;
  display: grid; place-items: center; font-size: clamp(1.4rem, calc(0.75rem + 3.0vw), 2.2rem);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--border);
}
.mem-front {
  background: linear-gradient(140deg, rgba(148, 190, 233, 0.5), rgba(190, 215, 240, 0.7));
  backdrop-filter: blur(6px);
}
[data-theme="dark"] .mem-front { background: linear-gradient(140deg, rgba(40, 65, 105, 0.8), rgba(25, 42, 70, 0.9)); }
.mem-front::after { content: "❄"; opacity: 0.5; font-size: 1.2rem; }
.mem-back { background: var(--surface-solid); transform: rotateY(180deg); }
.mem-card.matched .mem-back { background: rgba(34, 197, 94, 0.15); border-color: #22c55e; }
.mem-card.matched { animation: matchPop 0.5s var(--ease-spring); }

/* simon game */
.simon-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  max-width: 26.25rem; margin: 0 auto;
}
.simon-tile {
  aspect-ratio: 1.5; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.8rem; transition: transform 0.15s, box-shadow 0.2s, background 0.15s;
  position: relative; overflow: hidden;
}
.simon-tile:hover { transform: scale(1.02); }
.simon-tile.lit { transform: scale(1.05); }
.simon-tile[data-c="0"].lit { background: #06b6d4; box-shadow: 0 0 36px #06b6d4; }
.simon-tile[data-c="1"].lit { background: #3b82f6; box-shadow: 0 0 36px #3b82f6; }
.simon-tile[data-c="2"].lit { background: #8b5cf6; box-shadow: 0 0 36px #8b5cf6; }
.simon-tile[data-c="3"].lit { background: #22c55e; box-shadow: 0 0 36px #22c55e; }
.simon-status { text-align: center; font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 16px; min-height: 1.6em; }

/* quiz */
.quiz-q { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 20px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  text-align: left; padding: 15px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent;
  font-size: 0.96rem; font-weight: 500; color: var(--text);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.quiz-opt:hover:not(:disabled) { transform: translateX(5px); border-color: var(--text); }
.quiz-opt.correct { background: rgba(34,197,94,0.13); border-color: #22c55e; }
.quiz-opt.wrong { background: rgba(239,68,68,0.13); border-color: #ef4444; }
.quiz-expl {
  margin-top: 16px; padding: 14px 18px; border-radius: 10px;
  background: var(--surface); border-left: 2px solid var(--accent);
  font-size: 0.92rem; color: var(--text-2);
}
.quiz-bar { height: 4px; border-radius: 99px; background: var(--border); margin-bottom: 22px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s var(--ease-out); }

/* breaker */
#breakerCanvas {
  width: 100%; border-radius: var(--radius); display: block;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0c1a30, #12253f);
  touch-action: none;
}

/* game result overlay */
.g-result { text-align: center; padding: 36px 20px; }
.g-result .big { font-size: 2.8rem; }
.g-result h4 { font-size: 1.4rem; margin: 10px 0 6px; letter-spacing: -0.02em; }
.g-result p { color: var(--text-2); margin-bottom: 22px; }

/* ============================ CONTACT ============================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.panel {
  padding: 36px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
}
.panel h3 { font-size: 1.4rem; margin-bottom: 6px; letter-spacing: -0.025em; }
.panel > p { color: var(--text-2); margin-bottom: 26px; font-size: 0.95rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: 0.88rem; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .err { color: #ef4444; font-size: 0.8rem; font-weight: 500; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #ef4444; }
.field.invalid .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* quote calculator */
.calc-slider { margin-bottom: 22px; }
.calc-slider .cs-top { display: flex; justify-content: space-between; font-weight: 500; font-size: 0.9rem; margin-bottom: 10px; }
.calc-slider .cs-val { color: var(--accent); font-family: var(--font-mono); }
.calc-slider input[type="range"] { width: 100%; accent-color: var(--accent); height: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.seg button {
  padding: 12px 8px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; font-weight: 500; font-size: 0.87rem; color: var(--text-2);
  transition: all 0.25s;
}
.seg button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.calc-extras { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.check {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font-weight: 450; font-size: 0.92rem; color: var(--text-2);
}
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.quote-out {
  padding: 26px; border-radius: 14px; text-align: left;
  background: var(--text); color: var(--bg);
}
.quote-out .q-label { font-family: var(--font-mono); font-size: 0.75rem; text-transform: none; letter-spacing: 0.02em; opacity: 0.65; }
.quote-out .q-price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 620; letter-spacing: -0.03em; margin: 6px 0; }
.quote-out .q-note { font-size: 0.8rem; opacity: 0.65; }

.form-success { text-align: center; padding: 40px 20px; display: none; }
.form-success .big { font-size: 3rem; animation: matchPop 0.6s var(--ease-spring); }
.form-success h4 { font-size: 1.4rem; margin: 12px 0 8px; letter-spacing: -0.02em; }
.form-success p { color: var(--text-2); }

.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.cc {
  padding: 26px 20px; border-radius: 14px; text-align: left;
  background: var(--surface); border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.cc:hover { transform: translateY(-4px); border-color: var(--border); }
.cc .cc-i { font-size: 1.5rem; margin-bottom: 10px; }
.cc h4 { font-size: 0.98rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.cc p { color: var(--text-2); font-size: 0.88rem; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 140%);
  padding: 13px 24px; border-radius: 22px; z-index: 400;
  background: var(--text); color: var(--bg); font-weight: 500; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); transition: transform 0.5s var(--ease-spring);
  max-width: min(420px, calc(100vw - 40px)); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- confetti canvas ---------- */
#confettiCanvas { position: fixed; inset: 0; z-index: 500; pointer-events: none; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out), background 0.25s, color 0.25s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--text); color: var(--bg); transform: translateY(-3px); }

/* ---------- custom cursor (fine pointers only; theme.js opts in) ---------- */
html.custom-cursor, html.custom-cursor a, html.custom-cursor button,
html.custom-cursor label, html.custom-cursor .switch-compare { cursor: none; }
html.custom-cursor input, html.custom-cursor textarea, html.custom-cursor select { cursor: auto; }
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: var(--accent);
  z-index: 9999; pointer-events: none;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid var(--text-3); border-radius: 50%; opacity: 0.6;
  z-index: 9998; pointer-events: none;
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
    margin 0.25s var(--ease-out), opacity 0.25s, border-color 0.25s, background 0.25s;
}
.cursor-ring.grow {
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  background: rgba(0, 153, 255, 0.07); border-color: var(--accent); opacity: 0.95;
}
.cursor-dot.hidden, .cursor-ring.hidden { opacity: 0; }

/* ============================ ANIMATIONS ============================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes sheen { to { transform: translateX(120%); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes matchPop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1000px) {
  .science-grid, .contact-grid { grid-template-columns: 1fr; }
  .features-grid, .apps-grid, .games-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 18px 4px 4px; margin: 0 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .uc-row { grid-template-columns: 1fr; gap: 22px; }
  .uc-row.flip .uc-media { order: 0; }
  .hero { padding-top: 140px; }
  .glass-demo { aspect-ratio: 16/10; }
  .testi-arrow.prev { left: 6px; } .testi-arrow.next { right: 6px; }
  .cta-benefits { grid-template-columns: 1fr; }
}

/* tighten desktop nav just before the burger takes over */
@media (max-width: 880px) {
  .nav-links a { padding: 8px 9px; font-size: 0.88rem; }
  .nav-cta { padding: 9px 16px; font-size: 0.85rem; }
  .nav-inner { gap: 12px; }
}

/* burger menu: full editorial overlay */
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    padding: 24px 6% 40px; overflow-y: auto;
    transform: translateX(105%); transition: transform 0.45s var(--ease-out);
  }
  .nav-links.open { transform: none; }
  .nav-links a {
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
    letter-spacing: -0.03em; text-align: left;
    padding: 18px 4px; border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--accent); }
  .hamburger { display: flex; }
}

@media (max-width: 680px) {
  .features-grid, .apps-grid, .games-grid,
  .field-row, .contact-cards, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card { margin: 0; padding: 16px 2px 2px; }
  .stat-card .num { font-size: 2.1rem; }
  .switch-compare, .uc-media .switch-compare { aspect-ratio: 4/3; border-radius: 14px; }
  .switch-compare .cmp-handle::after { width: 38px; height: 38px; font-size: 0.95rem; }
  .glass-demo { aspect-ratio: 4/3.4; border-radius: 14px; }
  .gd-controls { padding: 12px 14px; gap: 10px; }
  .gd-slider { max-width: 130px; }
  .gd-slider label { display: none; }
  .hero { padding-top: 124px; }
  .hero-sub { margin-top: 26px; }
  .teaser-grid { grid-template-columns: 1fr; }
  .cta-band { border-radius: 18px; }
  .panel { padding: 24px 20px; }
  .mem-grid { gap: 7px; }
  .marquee-track { gap: 30px; padding-right: 30px; }
  .footer-grid { gap: 28px; }
  .to-top { bottom: 18px; right: 18px; }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-sub { flex-direction: column; align-items: stretch; }
}

/* ---------- large screens & zoomed-out views ----------
   The type system is rem-based (fluid clamps use calc(rem + vw)), so
   scaling the root font grows the whole composition together instead of
   leaving a 1200px island in a sea of margin. Applies equally when the
   browser is zoomed out (effective viewport gets wider). */
@media (min-width: 1600px) {
  html { font-size: 17px; }
  .container { width: min(1380px, 90%); }
}
@media (min-width: 2200px) {
  html { font-size: 19px; }
  .container { width: min(1640px, 86%); }
}
@media (min-width: 3200px) {
  html { font-size: 21px; }
  .container { width: min(1920px, 82%); }
}

/* ---------- short landscape viewports (phones rotated, small laptops
   at high zoom): keep the hero and demos inside one screen ---------- */
@media (max-height: 540px) and (min-width: 600px) {
  .hero { padding-top: 108px; }
  section { padding: 44px 0; }
  .glass-demo { max-height: 76vh; }
  .switch-compare { max-height: 72vh; }
  .page-hero, .sub-hero, .blog-hero, .article-hero, .ab-hero { padding-top: 112px; }
}

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