/* Foxenmark — site styles. Vanilla CSS, no build step.
   Dark cinematic theme by default; light theme via prefers-color-scheme or the toggle. */

@property --pa {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff6a1f;
}

:root {
  --bg: #0b0f14;
  --bg-2: #0f141b;
  --surface: #131a23;
  --surface-2: #1a2330;
  --line: rgba(241, 230, 214, 0.1);
  --line-2: rgba(241, 230, 214, 0.2);
  --text: #f1e6d6;
  --text-dim: #b3a692;
  --text-faint: #958a7a;
  --accent: #ff6a1f;
  --accent-text: #ff7d3b;
  --accent-ink: #0b0f14;
  --glow: rgba(255, 106, 31, 0.3);
  --glass: rgba(11, 15, 20, 0.72);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  --grain: 0.06;
  --mk-c: #f6ead8;
  --mk-k: #e1cdb0;
  --mk-m: #c9b08b;
  --plate: #0b0f14;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: 16px;
  --head-h: 4.25rem;
  --pa: #ff6a1f;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f0e7;
    --bg-2: #efe7db;
    --surface: #fbf7f1;
    --surface-2: #f1e7d9;
    --line: rgba(52, 34, 18, 0.11);
    --line-2: rgba(52, 34, 18, 0.22);
    --text: #1b140d;
    --text-dim: #574b3f;
    --text-faint: #6b5f52;
    --accent-text: #a63c09;
    --glow: rgba(255, 106, 31, 0.24);
    --glass: rgba(246, 240, 231, 0.78);
    --shadow: 0 30px 70px -35px rgba(70, 40, 10, 0.35);
    --grain: 0.045;
    --mk-c: #eac394;
    --mk-k: #d9a96f;
    --mk-m: #bf8d52;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f0e7;
  --bg-2: #efe7db;
  --surface: #fbf7f1;
  --surface-2: #f1e7d9;
  --line: rgba(52, 34, 18, 0.11);
  --line-2: rgba(52, 34, 18, 0.22);
  --text: #1b140d;
  --text-dim: #574b3f;
  --text-faint: #6b5f52;
  --accent-text: #a63c09;
  --glow: rgba(255, 106, 31, 0.24);
  --glass: rgba(246, 240, 231, 0.78);
  --shadow: 0 30px 70px -35px rgba(70, 40, 10, 0.35);
  --grain: 0.045;
  --mk-c: #eac394;
  --mk-k: #d9a96f;
  --mk-m: #bf8d52;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* Large screens: scale everything that is sized in rem. */
@media (min-width: 2000px) {
  html { font-size: 118.75%; }
}

@media (min-width: 2800px) {
  html { font-size: 150%; }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 1rem);
  scrollbar-color: var(--line-2) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Film grain over everything; purely decorative. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: url("/assets/img/grain.svg");
  opacity: var(--grain);
}

[hidden] { display: none !important; }

img,
svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

a { color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 1.5rem + 4.8vw, 5.8rem); font-weight: 560; }
h2 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.7rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); }
p { margin: 0 0 1em; }

h1 em,
h2 em { font-style: italic; font-weight: 450; color: var(--accent-text); }

.lede { font-size: clamp(1.06rem, 1rem + 0.35vw, 1.3rem); color: var(--text-dim); max-width: 38em; text-wrap: pretty; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 1.4rem;
  font: 700 0.76rem/1.2 var(--font-text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.eyebrow .num { color: var(--accent-text); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 0.75em; }
.eyebrow .num::after { content: ""; width: 2.4em; height: 1px; background: currentColor; opacity: 0.7; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }

.section { position: relative; padding-block: clamp(4.5rem, 3rem + 7vw, 9rem); }
.sec-head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Marks (inline SVG tones follow the theme) ---------- */
.mk .c { fill: var(--mk-c); }
.mk .k { fill: var(--mk-k); }
.mk .m { fill: var(--mk-m); }
.mk .ln { stroke: var(--mk-c); }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease;
  view-transition-name: fm-head;
}

.site-head.is-scrolled,
html:not(.js) .site-head,
.site-head.is-open {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}

.head-row { display: flex; align-items: center; gap: 0.75rem; min-height: var(--head-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font: 600 1.22rem/1 var(--font-display);
  letter-spacing: -0.01em;
}

.brand-mark { width: 2.1rem; height: 2.1rem; transition: transform 0.5s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.nav-links { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }

.nav-links a {
  position: relative;
  display: block;
  padding: 0.55rem 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.3rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 0.9rem/1 var(--font-text);
  cursor: pointer;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before,
.nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }

.head-tools { display: flex; align-items: center; gap: 0.5rem; }

.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.lang::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent);
  transition: translate 0.4s var(--ease-out);
}

:root[lang="tr"] .lang::before { translate: 100% 0; }

.lang button {
  position: relative;
  min-width: 2.3rem;
  min-height: 2.1rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-dim);
  font: 700 0.78rem/1 var(--font-text);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.3s;
}

.lang button[aria-pressed="true"] { color: var(--accent-ink); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; transition: transform 0.6s var(--ease-out); }
:root[data-theme="light"] .theme-toggle svg { transform: rotate(180deg); }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle svg { transform: rotate(180deg); }
}

@media (max-width: 859px) {
  .js .nav-toggle { display: inline-flex; }

  .js .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    translate: 0 -0.5rem;
    transition: opacity 0.3s ease, translate 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }

  .js .nav.is-open .nav-links { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
  .js .nav-links a { padding: 0.9rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav-links a::after { display: none; }

  html:not(.js) .head-row { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .nav { order: 3; width: 100%; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .nav-toggle { padding: 0 0.7rem; }
  .nav-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .brand { font-size: 1.08rem; gap: 0.45rem; }
  .brand-mark { width: 1.85rem; height: 1.85rem; }
  .head-row { gap: 0.4rem; }
  .lang button { min-width: 2rem; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.45rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1.15 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 32px -12px var(--glow); }

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  translate: -120% 0;
  transition: translate 0.8s var(--ease-out);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(255, 106, 31, 0.65); }
.btn-primary:hover::after { translate: 120% 0; }
.btn .arrow { width: 1.1rem; height: 1.1rem; transition: transform 0.3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }

.btn-soon { background: transparent; color: var(--text-dim); border: 1px dashed var(--line-2); cursor: not-allowed; }
.btn-sm { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 700; text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform 0.3s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(100svh, 62rem);
  margin-top: calc(-1 * var(--head-h));
  padding: calc(var(--head-h) + 2.5rem) 0 6rem;
  overflow: clip;
  isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero-bg .glow {
  position: absolute;
  top: -22vmax;
  right: -18vmax;
  width: 80vmax;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  translate: 0 var(--py, 0);
  animation: breathe 9s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 6rem,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 6rem 100%;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 70% 40%, #000, transparent 75%);
  opacity: 0.55;
}

.shards { position: absolute; inset: 0; width: 100%; height: 100%; translate: 0 var(--py, 0); }
.shards polygon { fill: var(--accent); }
.shards .sh1 { opacity: 0.07; }
.shards .sh2 { opacity: 0.05; }
.shards .sh3 { opacity: 0.09; }

.embers span {
  position: absolute;
  bottom: -2rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(255, 106, 31, 0.55);
  opacity: 0;
  animation: ember 13s linear infinite;
}

.embers span:nth-child(1) { left: 6%; animation-duration: 14s; animation-delay: -2s; }
.embers span:nth-child(2) { left: 17%; animation-duration: 11s; animation-delay: -7s; width: 3px; height: 3px; }
.embers span:nth-child(3) { left: 29%; animation-duration: 16s; animation-delay: -4s; }
.embers span:nth-child(4) { left: 41%; animation-duration: 12s; animation-delay: -9s; width: 2px; height: 2px; }
.embers span:nth-child(5) { left: 53%; animation-duration: 15s; animation-delay: -1s; }
.embers span:nth-child(6) { left: 62%; animation-duration: 10s; animation-delay: -5s; width: 3px; height: 3px; }
.embers span:nth-child(7) { left: 71%; animation-duration: 17s; animation-delay: -11s; }
.embers span:nth-child(8) { left: 80%; animation-duration: 12s; animation-delay: -3s; width: 5px; height: 5px; }
.embers span:nth-child(9) { left: 88%; animation-duration: 14s; animation-delay: -8s; width: 2px; height: 2px; }
.embers span:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: -6s; }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 0.45em; }
.hero h1 .line { display: block; animation: rise 1.1s var(--ease-out) both; }
.hero h1 .line:nth-child(1) { animation-delay: 0.15s; }
.hero h1 .line:nth-child(2) { animation-delay: 0.3s; }
.rise { animation: rise 1.1s var(--ease-out) both; }
.r1 { animation-delay: 0.05s; }
.r3 { animation-delay: 0.45s; }
.r4 { animation-delay: 0.6s; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero-visual { order: -1; translate: 0 var(--py, 0); }

.viewfinder {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 15rem);
  aspect-ratio: 1;
  margin-inline: auto;
}

.vf-c { position: absolute; width: 12%; height: 12%; border: 2px solid var(--text-faint); opacity: 0.7; }
.vf-c.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.vf-c.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.vf-c.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.vf-c.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

.vf-rec,
.vf-tc {
  position: absolute;
  display: none;
  align-items: center;
  gap: 0.5em;
  color: var(--text-dim);
  font: 600 0.72rem/1 var(--font-mono);
  letter-spacing: 0.14em;
}

.vf-rec { top: 4%; left: 15%; }
.vf-tc { bottom: 4%; right: 15%; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.vf-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); animation: blink 1.6s steps(2, jump-none) infinite; }

.vf-ring {
  position: absolute;
  inset: 13%;
  border: 1px dashed var(--line-2);
  border-radius: 50%;
  animation: spin 70s linear infinite;
}

.vf-ring::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px 3px rgba(255, 106, 31, 0.6);
}

.hero-fox {
  position: relative;
  width: 64%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 22px 40px rgba(255, 106, 31, 0.28));
  animation: float 7s ease-in-out 2.6s infinite;
}

.hero-fox .ol {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.9s var(--ease-io) 0.25s forwards, fade-out 1s ease 2.8s forwards;
}

.hero-fox .ol2 { stroke-width: 0.5; animation-delay: 0.8s, 2.8s; }

.hero-fox .fa {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: facet 0.8s var(--ease-out) forwards;
}

.hero-fox .n1 { animation-delay: 1.25s; }
.hero-fox .n2 { animation-delay: 1.35s; }
.hero-fox .n3 { animation-delay: 1.5s; }
.hero-fox .n4 { animation-delay: 1.55s; }
.hero-fox .n5 { animation-delay: 1.65s; }
.hero-fox .n6 { animation-delay: 1.7s; }
.hero-fox .n7 { animation-delay: 1.85s; }
.hero-fox .n8 { animation-delay: 1.9s; }
.hero-fox .n9,
.hero-fox .n10 { animation: facet 0.6s var(--ease-out) 2.2s forwards, blink-eye 7s ease 4.5s infinite; }
.hero-fox .n11 { animation-delay: 2.05s; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  translate: -50% 0;
  color: var(--text-faint);
  font: 700 0.7rem/1 var(--font-text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.cue-line { position: relative; width: 1px; height: 2.6rem; overflow: hidden; background: var(--line-2); }
.cue-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent); animation: cue 2.2s var(--ease-io) infinite; }

@media (min-width: 600px) {
  .viewfinder { width: min(100%, 22rem); }
  .vf-rec,
  .vf-tc { display: inline-flex; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; }
  .hero-visual { order: 0; }
  .viewfinder { width: min(100%, 34rem); }
  .scroll-cue { display: flex; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 1.15rem;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-group { display: flex; flex: none; }

.mq-group span {
  display: inline-flex;
  align-items: center;
  gap: 2.4rem;
  padding-right: 2.4rem;
  white-space: nowrap;
  color: var(--text-dim);
  font: italic 450 clamp(1.1rem, 0.9rem + 1vw, 1.65rem)/1.2 var(--font-display);
}

.mq-group span::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--accent); rotate: 45deg; }

/* ---------- Apps: tabs + stage ---------- */
.tabs {
  --tab-gap: 0.4rem;
  --cols: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--tab-gap);
  margin-bottom: 1.25rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--bg-2);
}

html:not(.js) .tabs { display: none; }

.tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-radius: 1rem;
  background: none;
  color: var(--text-dim);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.tab:hover,
.tab[aria-selected="true"] { color: var(--text); }
.tab-mark { flex: none; width: 2.9rem; height: 2.9rem; transition: transform 0.5s var(--ease-out); }
.tab:hover .tab-mark { transform: translateY(-2px) rotate(-5deg); }
.tab[aria-selected="true"] .tab-mark { transform: scale(1.06); }
.tab-text { min-width: 0; }
.tab-name { display: block; font: 600 1.08rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.tab-sub { display: block; margin-top: 0.15rem; color: var(--text-faint); font-size: 0.82rem; line-height: 1.3; }

.tab-ind {
  position: absolute;
  z-index: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.4rem;
  width: calc((100% - 0.8rem - (var(--cols) - 1) * var(--tab-gap)) / var(--cols));
  border: 1px solid var(--line-2);
  border-radius: 1rem;
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--accent), var(--shadow);
  translate: calc(var(--ti, 0) * (100% + var(--tab-gap))) 0;
  transition: translate 0.6s var(--ease-out);
}

.stage[data-product="hakime"],
.panel[data-product="hakime"] { --pa: #e3a24a; }
.stage[data-product="aiwb"],
.panel[data-product="aiwb"] { --pa: #3fc2c8; }
.stage[data-product="veryazsin"],
.panel[data-product="veryazsin"] { --pa: #7d78ff; }

.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
  transition: --pa 0.8s ease;
  view-transition-name: fm-stage;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(38rem circle at var(--mx, 25%) var(--my, 40%), color-mix(in srgb, var(--pa) 14%, transparent), transparent 70%);
  transition: opacity 0.4s;
}

.panel {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: clamp(1.1rem, 0.8rem + 2vw, 3rem);
}

.js .panel:not(.is-active) { display: none; }
html:not(.js) .panel + .panel { border-top: 1px solid var(--line); }
.js .panel.is-active { view-transition-name: fm-panel; }
.js .panel.is-active .plate-mark { view-transition-name: fm-mark; }
.no-vt .panel.is-active { animation: panel-in 0.6s var(--ease-out) both; }
.no-vt[data-dir="back"] .panel.is-active { animation-name: panel-in-back; }

@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; }
}

.plate {
  --mk-c: #f6ead8;
  --mk-k: #e1cdb0;
  --mk-m: #c9b08b;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(241, 230, 214, 0.1);
  border-radius: 1.4rem;
  background:
    radial-gradient(60% 65% at 50% 55%, color-mix(in srgb, var(--pa) 30%, transparent), transparent 72%),
    var(--plate);
}

.plate::before,
.plate::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }

/* vp1: film perforations that roll */
.panel[data-product="vp1"] .plate::before,
.panel[data-product="vp1"] .plate::after {
  height: 0.6rem;
  background: repeating-linear-gradient(90deg, rgba(241, 230, 214, 0.18) 0 0.9rem, transparent 0.9rem 1.8rem);
  animation: roll 1.6s linear infinite;
}

.panel[data-product="vp1"] .plate::before { top: 0.8rem; }
.panel[data-product="vp1"] .plate::after { bottom: 0.8rem; animation-direction: reverse; }

/* Hakime Hanim: ruled legal pad with a margin line */
.panel[data-product="hakime"] .plate::before {
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(241, 230, 214, 0.07) 0 1px, transparent 1px 1.6rem);
}

.panel[data-product="hakime"] .plate::after { top: 0; bottom: 0; left: 14%; right: auto; width: 1px; background: color-mix(in srgb, var(--pa) 55%, transparent); }

/* AI Workbench: dot grid */
.panel[data-product="aiwb"] .plate::before {
  inset: 0;
  background: radial-gradient(rgba(241, 230, 214, 0.16) 1px, transparent 1.6px) 0 0 / 1.4rem 1.4rem;
  -webkit-mask-image: radial-gradient(75% 75% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(75% 75% at 50% 50%, #000, transparent);
}

/* Veryazsin: squared exam paper and a row of four answer bubbles, one marked */
.panel[data-product="veryazsin"] .plate::before {
  inset: 0;
  background:
    linear-gradient(rgba(241, 230, 214, 0.07) 1px, transparent 1px) 0 0 / 1.3rem 1.3rem,
    linear-gradient(90deg, rgba(241, 230, 214, 0.07) 1px, transparent 1px) 0 0 / 1.3rem 1.3rem;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
}

.panel[data-product="veryazsin"] .plate::after {
  --ring: radial-gradient(circle closest-side, transparent 68%, rgba(241, 230, 214, 0.42) 71% 86%, transparent 90%);
  left: 50%;
  right: auto;
  bottom: 0.9rem;
  width: 6.4rem;
  height: 1.1rem;
  translate: -50% 0;
  background:
    radial-gradient(circle closest-side, var(--pa) 0 62%, transparent 66%) 66.667% 0 / 1.1rem 1.1rem no-repeat,
    var(--ring) 0 0 / 1.1rem 1.1rem no-repeat,
    var(--ring) 33.333% 0 / 1.1rem 1.1rem no-repeat,
    var(--ring) 66.667% 0 / 1.1rem 1.1rem no-repeat,
    var(--ring) 100% 0 / 1.1rem 1.1rem no-repeat;
}

.orbit {
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  max-height: 88%;
  border: 1px dashed rgba(241, 230, 214, 0.16);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--pa);
  box-shadow: 0 0 14px 2px var(--pa);
}

.plate-mark {
  position: relative;
  width: 44%;
  max-width: 15rem;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
}

.panel-body { min-width: 0; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status .dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--pa); animation: pulse 2.4s ease-out infinite; }

.panel h3 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.2rem); margin-bottom: 0.4em; }
.panel h3 .kicker { display: block; margin-top: 0.4em; color: var(--accent-text); font-size: 0.42em; font-style: italic; font-weight: 450; letter-spacing: 0; line-height: 1.3; }
.panel-body > p { color: var(--text-dim); max-width: 36em; }

.steps { display: grid; gap: 0.6rem; margin: 1.5rem 0; padding: 0; list-style: none; counter-reset: step; }

.steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 1rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--glass);
  transition: border-color 0.3s, translate 0.3s var(--ease-out);
}

.steps li:hover { border-color: var(--line-2); translate: 4px 0; }
.steps li::before { content: "0" counter(step); counter-increment: step; grid-row: span 2; color: var(--accent-text); font: 700 0.8rem/1 var(--font-mono); }
.steps strong { font: 600 1.12rem/1.3 var(--font-display); }
.steps span { grid-column: 2; color: var(--text-dim); font-size: 0.95rem; }

.points { display: grid; gap: 0.55rem; margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; }
.points li { display: flex; align-items: center; gap: 0.8rem; }
.points li::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; background: var(--pa); rotate: 45deg; }

.meta { color: var(--text-faint); font-size: 0.9rem; letter-spacing: 0.02em; }
.avail-title { margin: 1.4rem 0 0.6rem; color: var(--text-faint); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.chips li { padding: 0.45rem 0.85rem; border: 1px dashed var(--line-2); border-radius: 999px; color: var(--text-dim); font-size: 0.86rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Feature rows: the .steps look with a diamond instead of a number */
.steps.feats li::before { content: ""; align-self: start; width: 0.5rem; height: 0.5rem; margin-top: 0.5rem; background: var(--pa); rotate: 45deg; }
.panel-body > .limits { margin: 0.5rem 0 0; color: var(--text-faint); font-size: 0.88rem; line-height: 1.55; max-width: 40em; }

/* Veryazsin: how a question is made (eight steps; a light runs along them) */
.flow-wrap { grid-column: 1 / -1; min-width: 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.flow-title { margin: 0 0 1rem; color: var(--text-faint); font: 700 0.78rem/1.3 var(--font-text); letter-spacing: 0.14em; text-transform: uppercase; }

.flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.8rem 0.9rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--glass);
  animation: flow-lit 9.6s ease-in-out infinite;
}

.flow li:nth-child(2) { animation-delay: 1.2s; }
.flow li:nth-child(3) { animation-delay: 2.4s; }
.flow li:nth-child(4) { animation-delay: 3.6s; }
.flow li:nth-child(5) { animation-delay: 4.8s; }
.flow li:nth-child(6) { animation-delay: 6s; }
.flow li:nth-child(7) { animation-delay: 7.2s; }
.flow li:nth-child(8) { animation-delay: 8.4s; }
.flow li::before { content: counter(flow, decimal-leading-zero); counter-increment: flow; margin-bottom: 0.3rem; color: color-mix(in srgb, var(--pa) 72%, var(--text)); font: 700 0.72rem/1 var(--font-mono); }
.flow strong { color: var(--text); font: 600 1.02rem/1.25 var(--font-display); }
.flow li > span { color: var(--text-dim); font-size: 0.86rem; line-height: 1.4; }

/* chevrons between neighbours in a row: two columns, four from 1000 px */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.02rem;
  width: 0.45rem;
  height: 0.45rem;
  border-top: 1.5px solid var(--text-faint);
  border-right: 1.5px solid var(--text-faint);
  translate: 0 -50%;
  rotate: 45deg;
}

.flow li:nth-child(2n)::after { display: none; }
.flow .fl-pair { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }
.flow .fl-pair span { padding: 0.1rem 0.5rem; border: 1px solid color-mix(in srgb, var(--pa) 50%, transparent); border-radius: 999px; color: var(--text-dim); font-size: 0.74rem; }
.flow .fl-you { border-color: color-mix(in srgb, var(--pa) 55%, transparent); background: color-mix(in srgb, var(--pa) 12%, var(--glass)); }
.flow-note { margin: 1rem 0 0; color: var(--text-faint); font-size: 0.88rem; }

@media (max-width: 479px) {
  .flow { gap: 0.5rem 1.1rem; }
  .flow li { padding: 0.7rem 0.75rem 0.75rem; }
  .flow li:not(:last-child)::after { right: -0.84rem; }
}

@media (min-width: 1000px) {
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow li:nth-child(2n)::after { display: block; }
  .flow li:nth-child(4n)::after { display: none; }
}

/* Four tabs: below 900 px the mark sits above the name. */
@media (max-width: 899px) {
  .tab { flex-direction: column; justify-content: center; gap: 0.5rem; padding: 0.8rem 0.4rem; text-align: center; }
}

@media (max-width: 640px) {
  .tab { flex-direction: column; justify-content: center; gap: 0.45rem; padding: 0.7rem 0.3rem; text-align: center; }
  .tab-mark { width: 2.2rem; height: 2.2rem; }
  .tab-name { font-size: 0.86rem; }
  .tab-sub { display: none; }
}

/* Narrow phones: the four tabs sit in a 2 x 2 grid (needs CSS mod() for the indicator). */
@media (max-width: 479px) {
  @supports (width: calc(mod(3, 2) * 1px)) {
    .tabs { --cols: 2; }
    .tab { flex-direction: row; justify-content: flex-start; gap: 0.6rem; padding: 0.6rem 0.7rem; text-align: left; }
    .tab-ind {
      bottom: auto;
      height: calc((100% - 0.8rem - var(--tab-gap)) / 2);
      translate: calc(mod(var(--ti, 0), 2) * (100% + var(--tab-gap))) calc(round(down, var(--ti, 0) / 2, 1) * (100% + var(--tab-gap)));
    }
  }
}

/* ---------- Principles ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  padding: 1.75rem 1.6rem 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, var(--surface), transparent 140%);
  transition: border-color 0.4s, transform 0.5s var(--ease-out), box-shadow 0.5s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4.5rem;
  height: 4.5rem;
  background: linear-gradient(225deg, rgba(255, 106, 31, 0.22), transparent 60%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out);
}

.card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { width: 7rem; height: 7rem; }
.card h3 { margin-bottom: 0.45em; }
.card p { margin: 0; color: var(--text-dim); }
.ico { width: 2.2rem; height: 2.2rem; margin-bottom: 1.3rem; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more { margin: 2rem 0 0; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2.5rem; align-items: center; }
.about-copy > p { color: var(--text-dim); font-size: 1.08rem; max-width: 36em; }
.facts { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: minmax(6.5rem, 9rem) 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text-faint); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 0.2em; }
.facts dd { margin: 0; }

.fox-note {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 106, 31, 0.14), transparent 70%), var(--surface);
}

.fox-line-wrap { translate: 0 var(--py, 0); }
.fox-line { width: 72%; max-width: 17rem; margin: 0 auto 1.75rem; overflow: visible; }
.fox-line path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.fox-line .ln-a { stroke: var(--accent); stroke-width: 0.9; }
.fox-line .ln-b { stroke: var(--text-faint); stroke-width: 0.5; }
.js .fox-note .fox-line path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .fox-note.is-in .fox-line path { animation: draw 2.4s var(--ease-io) 0.2s forwards; }
.js .fox-note.is-in .fox-line .ln-b { animation-delay: 0.9s; }
.fox-note p { margin: 0; color: var(--text-dim); }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 4rem; }
}

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 4vw, 5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 106, 31, 0.17), transparent 55%), var(--surface);
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 14rem;
  height: 14rem;
  background: var(--accent);
  opacity: 0.08;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  rotate: -18deg;
}

.mail { margin: 1.5rem 0 1.25rem; font: 500 clamp(1.1rem, 5.4vw, 3.8rem)/1.1 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }

.mail a {
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.6s var(--ease-out), color 0.3s;
}

.mail a:hover { color: var(--accent-text); background-size: 100% 2px; }
.contact-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.copy-status { color: var(--text-dim); font-size: 0.9rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 2rem 0 0; }

/* ---------- Footer ---------- */
.site-foot { position: relative; overflow: hidden; padding-top: 3.5rem; border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 2rem; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 0.9rem; }
.foot-mark { width: 2.75rem; height: 2.75rem; flex: none; }
.foot-brand p { display: grid; margin: 0; }
.foot-brand strong { font: 600 1.15rem/1.2 var(--font-display); }
.foot-brand span { color: var(--text-dim); font-size: 0.92rem; }
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.foot-nav a { color: var(--text-dim); text-decoration: none; font-weight: 600; }
.foot-nav a:hover { color: var(--text); }
.foot-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; color: var(--text-faint); font-size: 0.88rem; }
.to-top { color: var(--text-dim); }

.foot-word {
  margin: 2.5rem 0 0;
  color: transparent;
  font: 600 clamp(3.5rem, 18.5vw, 24rem)/0.78 var(--font-display);
  letter-spacing: -0.045em;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 1px var(--line-2);
  background: linear-gradient(180deg, rgba(255, 106, 31, 0.28), transparent 75%);
  -webkit-background-clip: text;
  background-clip: text;
  translate: 0 14%;
  user-select: none;
}

@media (min-width: 860px) {
  .foot-grid { grid-template-columns: 1.3fr 1fr; }
  .foot-legal { grid-column: 1 / -1; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--line); }
}

/* ---------- Legal and support pages ---------- */
.page-hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(1.5rem, 1rem + 2vw, 3rem); }
.page-hero { position: relative; isolation: isolate; overflow-x: clip; }
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -12rem;
  right: -10rem;
  width: min(60rem, 120vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 5rem); }
.page-hero .updated { color: var(--text-faint); font-size: 0.9rem; }
.legal-grid { display: grid; gap: 2.5rem; padding-bottom: clamp(4rem, 3rem + 5vw, 8rem); }

.toc { align-self: start; }
.toc p { margin: 0 0 0.75rem; color: var(--text-faint); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.toc ol { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 0.35rem 0 0.35rem 1rem; border-left: 2px solid transparent; color: var(--text-dim); text-decoration: none; font-size: 0.94rem; transition: color 0.2s, border-color 0.2s; }
.toc a:hover,
.toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent); }

.prose { max-width: 46rem; min-width: 0; }
.prose h2 { margin-top: 2.4em; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); scroll-margin-top: calc(var(--head-h) + 1.5rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose p,
.prose li { color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--accent); }

.summary {
  margin: 0 0 2.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0.9rem;
  background: var(--surface);
}

.summary p:last-child { margin: 0; }
.prose .mail { font-size: clamp(1.1rem, 4.4vw, 2.5rem); }

.data-table { width: 100%; margin: 1.25rem 0 1.5rem; border-collapse: collapse; font-size: 0.97rem; }
.data-table th,
.data-table td { padding: 0.8rem 0.9rem 0.8rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th { color: var(--text-faint); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.data-table tbody th { color: var(--text); font-weight: 600; }
.data-table td { color: var(--text-dim); }

.app-badge { display: inline-flex; align-items: center; gap: 0.6rem; }
.app-badge .mk { width: 2rem; height: 2rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.card-grid li { padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.card-grid .mk { width: 2.6rem; height: 2.6rem; margin-bottom: 0.9rem; }
.card-grid strong { display: block; font: 600 1.1rem/1.25 var(--font-display); color: var(--text); }
.card-grid span { color: var(--text-dim); font-size: 0.92rem; }

.faq { margin-top: 1rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  font: 600 1.12rem/1.35 var(--font-display);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  rotate: 45deg;
  translate: 0 -25%;
  transition: rotate 0.35s var(--ease-out), translate 0.35s var(--ease-out);
}

.faq details[open] summary::after { rotate: 225deg; translate: 0 25%; }
.faq details p { margin: 0 0 1.25rem; }

@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.45s var(--ease-out), content-visibility 0.45s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}

@media (max-width: 999px) {
  .toc ol { display: flex; flex-wrap: wrap; gap: 0.4rem; border: 0; }
  .toc a { margin: 0; padding: 0.35rem 0.85rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.86rem; }
}

@media (min-width: 1000px) {
  .legal-grid { grid-template-columns: 14rem minmax(0, 46rem); gap: 4rem; }
  .toc { position: sticky; top: calc(var(--head-h) + 2rem); }
}

/* ---------- 404 ---------- */
.nf { display: grid; place-items: center; min-height: calc(100svh - var(--head-h) - 6rem); padding-block: 3rem; text-align: center; }
.nf-fox { width: 9rem; height: auto; margin: 0 auto 1.5rem; animation: sniff 4s ease-in-out infinite; transform-origin: 50% 90%; }
.nf-code { margin: 0 0 0.5rem; color: var(--accent-text); font: 700 0.8rem/1 var(--font-mono); letter-spacing: 0.3em; }
.nf p { color: var(--text-dim); max-width: 30em; margin-inline: auto; }
.nf .actions { justify-content: center; }

/* ---------- Scroll reveals ---------- */
.js [data-reveal] { opacity: 0; translate: 0 1.75rem; transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
.js [data-reveal="2"] { transition-delay: 0.08s; }
.js [data-reveal="3"] { transition-delay: 0.16s; }
.js [data-reveal="4"] { transition-delay: 0.24s; }

/* Turkish dictionary still loading: hide briefly, never longer than 1.2 s. */
.i18n-wait body { opacity: 0; animation: unhide 0s linear 1.2s forwards; }

/* ---------- View transitions ---------- */
::view-transition-old(fm-panel) { animation: vt-out 0.3s var(--ease-io) both; }
::view-transition-new(fm-panel) { animation: vt-in 0.55s var(--ease-out) both; }
:root[data-dir="back"]::view-transition-old(fm-panel) { animation-name: vt-out-back; }
:root[data-dir="back"]::view-transition-new(fm-panel) { animation-name: vt-in-back; }
::view-transition-group(fm-mark),
::view-transition-group(fm-stage) { animation-duration: 0.55s; animation-timing-function: var(--ease-out); }

/* Theme switch: a circle grows from the toggle; named parts join the root snapshot. */
.vt-theme * { view-transition-name: none !important; }
.vt-theme body { transition: none; }
:root.vt-theme::view-transition-old(root),
:root.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.vt-theme::view-transition-new(root) { animation: theme-in 0.7s var(--ease-io); }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes facet { from { opacity: 0; transform: scale(0.55) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes blink-eye { 0%, 94%, 100% { transform: none; } 96% { transform: scaleY(0.12); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes blink { 50% { opacity: 0.15; } }
@keyframes breathe { from { scale: 0.92; opacity: 0.8; } to { scale: 1.06; opacity: 1; } }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 0.9; } 80% { opacity: 0.6; } 100% { opacity: 0; transform: translate(3rem, -75vh); } }
@keyframes cue { to { top: 110%; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes roll { to { background-position: 1.8rem 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pa) 60%, transparent); } 100% { box-shadow: 0 0 0 0.6rem transparent; } }
@keyframes panel-in { from { opacity: 0; translate: 3rem 0; } }
@keyframes panel-in-back { from { opacity: 0; translate: -3rem 0; } }
@keyframes vt-out { to { opacity: 0; transform: translateX(-5%); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(7%); filter: blur(6px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(5%); filter: blur(6px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-7%); filter: blur(6px); } }
@keyframes theme-in { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 0)); } to { clip-path: circle(var(--vr, 150vmax) at var(--vx, 50%) var(--vy, 0)); } }
@keyframes unhide { to { opacity: 1; } }
@keyframes flow-lit {
  0%, 15%, 100% { box-shadow: 0 0 0 0 transparent; }
  6% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pa) 70%, transparent), 0 14px 34px -18px var(--pa); }
}
@keyframes sniff { 0%, 100% { rotate: 0deg; } 25% { rotate: -7deg; } 60% { rotate: 6deg; } }

/* ---------- Reduced motion: everything lands in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .embers,
  .scroll-cue .cue-line::after { display: none; }
  .marquee-track { animation: none !important; }
  .flow li { animation: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .js .fox-note .fox-line path { stroke-dashoffset: 0; }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-head,
  .site-foot,
  .hero-bg,
  .marquee,
  body::after { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p,
  .prose li { color: #000; }
}
