/* ==========================================================================
   Generis Data Base — design system
   Monochrome heraldic base, per-product accent colours, no external assets.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink:        #08080a;
  --ink-2:      #0e0e12;
  --ink-3:      #15151b;
  --ink-4:      #1d1d25;
  --text:       #f3f3f0;
  --muted:      #93939e;
  --muted-2:    #63636e;
  --line:       rgba(255, 255, 255, .10);
  --line-soft:  rgba(255, 255, 255, .055);
  --brass:      #d3b271;
  --brass-dim:  rgba(211, 178, 113, .16);
  --qwizzy:     #7657ff;
  --wiksy:      #55b9e8;
  --barlingo:   #f0913e;
  --good:       #46d69b;
  --bad:        #ff6f80;

  --accent:     var(--brass);
  --accent-dim: var(--brass-dim);

  --glass:      rgba(20, 20, 26, .62);
  --shadow:     0 30px 70px -30px rgba(0, 0, 0, .9);
  --radius:     20px;
  --radius-sm:  13px;

  --font-ui:    -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease:       cubic-bezier(.22, 1, .36, 1);
  --ease-io:    cubic-bezier(.65, 0, .35, 1);
  --shell:      min(1180px, 100% - 2 * clamp(18px, 5vw, 56px));
}

:root[data-theme="light"] {
  --ink:        #f4f3ef;
  --ink-2:      #ffffff;
  --ink-3:      #ecebe5;
  --ink-4:      #e0dfd7;
  --text:       #0d0d10;
  --muted:      #5e5e68;
  --muted-2:    #8b8b95;
  --line:       rgba(10, 10, 15, .13);
  --line-soft:  rgba(10, 10, 15, .07);
  --brass:      #8a6d21;
  --brass-dim:  rgba(138, 109, 33, .14);
  --glass:      rgba(255, 255, 255, .72);
  --shadow:     0 26px 60px -34px rgba(15, 15, 25, .45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.62 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--ink); }

/* ---------- Layout helpers ---------- */
.shell { width: var(--shell); margin-inline: auto; }
.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.section + .section { padding-top: 0; }
.stack > * + * { margin-top: var(--gap, 18px); }
.center { text-align: center; }
.hide { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; line-height: 1.08; margin: 0; }
.h-xl  { font-size: clamp(2.9rem, 8.2vw, 6.4rem); }
.h-lg  { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
.h-md  { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lede  { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 62ch; line-height: 1.7; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .705rem; letter-spacing: .26em; text-transform: uppercase;
  font-weight: 600; color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .8;
}

/* Word-by-word reveal used on headlines.
   The tight heading line-height (1.08) leaves no room for descenders (g, y, p, q)
   inside the overflow:hidden clip box, so they got cropped. Padding-bottom adds
   that room back inside the clipped box; the matching negative margin keeps the
   heading's own height — and everything below it — exactly where it was. */
.reveal-words .word {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: 0.24em; margin-bottom: -0.24em;
}
.reveal-words .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform .95s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.reveal-words.is-in .word > span { transform: none; }

/* Generic scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  padding: 16px 0;
  transition: padding .45s var(--ease), background .45s var(--ease), border-color .45s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-stuck {
  padding: 9px 0;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom-color: var(--line-soft);
}
.head-inner { display: flex; align-items: center; gap: 14px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 38px; height: auto; transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(-4deg) scale(1.06); }
.brand-text { line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: .01em; }
.brand-sub { font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted-2); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 9px 14px; border-radius: 99px;
  font-size: .875rem; color: var(--muted); font-weight: 500;
  transition: color .3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); }

.head-tools { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: transparent;
  cursor: pointer; color: var(--muted);
  transition: color .3s, border-color .3s, transform .3s var(--ease), background .3s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--text); --btn-fg: var(--ink);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border: 0; border-radius: 99px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: .9rem; font-weight: 650; letter-spacing: .01em; cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s, color .3s, opacity .3s;
  will-change: transform;
}
.btn:hover { box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .65); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Components below use color-mix on --accent rather than the --accent-dim token,
   so a local `style="--accent: …"` override tints them correctly. Custom
   properties are substituted where they are declared, so a token that itself
   references --accent would keep the root value. */
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: #0a0a0b; }
.btn-sm { padding: 9px 17px; font-size: .8rem; }
.btn-block { width: 100%; }

/* click ripple */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .28; transform: scale(0);
  animation: ripple .62s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero-glow {
  position: absolute; left: 50%; top: 42%; width: min(1100px, 130vw); aspect-ratio: 1;
  translate: -50% -50%; pointer-events: none;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 62%);
  opacity: .85;
}
.hero-inner { position: relative; z-index: 2; padding: 130px 0 90px; }
.hero-crest {
  width: clamp(94px, 13vw, 150px); margin: 0 auto 34px;
  filter: drop-shadow(0 0 42px rgba(211, 178, 113, .3));
  animation: float 7s var(--ease-io) infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero .lede { margin: 26px auto 0; text-align: center; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; translate: -50% 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted-2);
}
.scroll-hint i { display: block; width: 1px; height: 42px; background: linear-gradient(var(--accent), transparent); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink); padding: 34px 26px; transition: background .4s var(--ease); }
.stat:hover { background: var(--ink-2); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 400; letter-spacing: -.02em; }
.stat small { display: block; margin-top: 5px; font-size: .74rem; letter-spacing: .17em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Cards / product grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  position: relative; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 30px; transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { border-color: var(--line); box-shadow: var(--shadow); }

/* tilt cards get a moving glare */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt .glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .09), transparent 62%);
  transition: opacity .4s var(--ease);
}
.tilt:hover .glare { opacity: 1; }

/* ---------- Product card ---------- */
.product {
  --accent: var(--brass);
  position: relative; display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; transition: transform .55s var(--ease), border-color .5s, box-shadow .5s;
}
.product:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow); }
.product-shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%),
    var(--ink-3);
  display: grid; place-items: center; padding: 26px;
  border-bottom: 1px solid var(--line-soft);
}
.product-shot img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.product-kicker { display: flex; align-items: center; gap: 9px; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.product h3 { font-size: 1.55rem; margin-bottom: 9px; }
.product p { color: var(--muted); font-size: .93rem; }
.product .btn { margin-top: auto; align-self: flex-start; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 20px; }
.tag {
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px;
  font-size: .7rem; letter-spacing: .06em; color: var(--muted);
  transition: border-color .3s, color .3s, background .3s;
}
.product:hover .tag { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 99px; font-size: .68rem; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

/* ---------- Device mockups (pure CSS/SVG placeholders) ---------- */
.mock { width: 100%; }
.mock-mac { filter: drop-shadow(0 24px 44px rgba(0, 0, 0, .55)); }
.mock-phone { filter: drop-shadow(0 24px 44px rgba(0, 0, 0, .55)); max-height: 340px; margin-inline: auto; width: auto; }

/* ---------- Split feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split, .split.flip > :first-child { grid-template-columns: 1fr; order: 0; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--ink-2); padding: 28px 30px; display: flex; gap: 20px; align-items: flex-start; transition: background .4s; }
.step:hover { background: var(--ink-3); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); flex-shrink: 0; line-height: 1.3;
}
.step h4 { font-size: 1.08rem; margin-bottom: 5px; font-family: var(--font-ui); font-weight: 650; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field > label, .lbl {
  display: block; margin-bottom: 8px;
  font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 650; color: var(--muted);
}
.input, input[type="text"], input[type="email"], textarea, select {
  width: 100%; padding: 13px 15px;
  background: var(--ink-3); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .3s, background .3s, box-shadow .3s;
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.hint { font-size: .78rem; color: var(--muted-2); margin-top: 7px; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }

/* Answer rows in the editor */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .answers { grid-template-columns: 1fr; } }
.answer {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--ink-3); transition: border-color .35s var(--ease), background .35s var(--ease);
}
.answer input[type="text"] { border: 0; background: transparent; padding: 3px 0; }
.answer input[type="text"]:focus { box-shadow: none; }
.answer .pick {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  font-size: .78rem; font-weight: 700; color: var(--muted);
  transition: all .35s var(--ease);
}
.answer.is-correct { border-color: color-mix(in srgb, var(--good) 55%, transparent); background: color-mix(in srgb, var(--good) 9%, var(--ink-3)); }
.answer.is-correct .pick { background: var(--good); border-color: var(--good); color: #06251a; transform: scale(1.06); }

/* Segmented pickers (difficulty) */
.segments { display: flex; gap: 8px; flex-wrap: wrap; }
.seg {
  flex: 1 1 90px; padding: 11px 8px; text-align: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink-3);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  transition: all .32s var(--ease);
}
.seg:hover { color: var(--text); border-color: var(--muted-2); transform: translateY(-2px); }
.seg.is-on { background: var(--accent); border-color: var(--accent); color: #0a0a0b; transform: translateY(-2px); }
.seg b { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }

/* ---------- Progress meter ---------- */
.meter { display: flex; align-items: center; gap: 13px; }
.meter-bar { flex: 1; height: 4px; background: var(--ink-4); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--good)); border-radius: 99px; transition: width .6s var(--ease); }
.meter small { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Review / voting ---------- */
.qcard { position: relative; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px 28px; transition: border-color .4s, transform .4s var(--ease); }
.qcard:hover { border-color: var(--line); }
.qcard.is-gone { opacity: 0; transform: scale(.96) translateY(-10px); transition: .45s var(--ease); }
.qcard .qtext { font-family: var(--font-display); font-size: 1.28rem; line-height: 1.35; margin-bottom: 18px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 20px; }
@media (max-width: 620px) { .opts { grid-template-columns: 1fr; } }
.opt {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .89rem; color: var(--muted); display: flex; gap: 10px; align-items: center;
  transition: all .3s var(--ease);
}
.opt .k { font-size: .68rem; font-weight: 700; color: var(--muted-2); width: 14px; }
.opt.right { border-color: color-mix(in srgb, var(--good) 50%, transparent); color: var(--text); background: color-mix(in srgb, var(--good) 8%, transparent); }
.opt.right .k { color: var(--good); }

.vote-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.vote {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: transparent;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  transition: all .3s var(--ease);
}
.vote svg { width: 16px; height: 16px; }
.vote:hover:not(:disabled) { transform: translateY(-2px); color: var(--text); }
.vote.up:hover:not(:disabled), .vote.up.is-on { border-color: var(--good); color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.vote.down:hover:not(:disabled), .vote.down.is-on { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.vote:disabled { cursor: default; }
.vote.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.16); } }

.meta-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }
.chip { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--line-soft); padding: 4px 10px; border-radius: 99px; }

/* ---------- Filter bar ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.filters select, .filters input { width: auto; min-width: 150px; padding: 9px 13px; font-size: .85rem; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 11px; max-width: min(380px, calc(100vw - 40px));
  padding: 13px 17px; border-radius: 14px;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); font-size: .88rem;
  animation: toast-in .5s var(--ease);
}
.toast.ok { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.toast.err { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.toast.out { animation: toast-out .35s var(--ease-io) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ---------- Empty / loading ---------- */
.empty { text-align: center; padding: 66px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 16px; color: var(--muted-2); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius); height: 150px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Notice ---------- */
.notice {
  display: flex; gap: 13px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: .88rem; color: var(--text);
}
.notice.warn { --accent: var(--barlingo); }
.notice.bad  { --accent: var(--bad); }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--ink-3); border: 1px solid var(--line-soft); border-radius: 99px; margin-bottom: 26px; }
.tabs button {
  padding: 9px 20px; border: 0; border-radius: 99px; background: transparent; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--muted); transition: all .3s var(--ease);
}
.tabs button.is-on { background: var(--text); color: var(--ink); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-2); font-weight: 650; }
tbody tr { transition: background .25s; }
tbody tr:hover { background: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { padding: 168px 0 clamp(46px, 7vw, 82px); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; left: 50%; top: -30%; width: 900px; aspect-ratio: 1; translate: -50% 0;
  background: radial-gradient(circle, var(--accent-dim), transparent 60%); pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }

/* Compact catalogue intro: use the animated home-page field instead of the
   generic warm page-hero glow and lead straight into the first product. */
.catalogue-hero {
  padding-bottom: 22px;
}
.catalogue-hero::after { display: none; }
.catalogue-main {
  position: relative;
  overflow: hidden;
}
.catalogue-main > #field {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}
.catalogue-main > .catalogue-glow {
  position: absolute;
  z-index: 0;
  top: 8%;
  opacity: .65;
}
.catalogue-main > section {
  position: relative;
  z-index: 1;
}
.catalogue-first {
  padding-top: 24px;
}
.catalogue-qwizzy-shot {
  aspect-ratio: 12 / 7;
  padding: 0;
  background: #130f36;
}
.catalogue-qwizzy-shot img {
  object-fit: cover;
}
.barlingo-main-shot {
  aspect-ratio: 16 / 10;
  padding: 0;
  background: #080b12;
}
.barlingo-main-shot img {
  object-fit: cover;
}
/* ---------- Qwizzy product page ---------- */
.qwizzy-hero-art {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #130f36;
  box-shadow: var(--shadow);
}
.qwizzy-hero-art img {
  width: 100%;
  height: auto;
}
.qwizzy-intro {
  --gap: 16px;
  max-width: 780px;
  margin-bottom: 48px;
}
.qwizzy-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.qwizzy-feature {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--ink-2);
  box-shadow: var(--shadow);
}
.qwizzy-feature-copy {
  min-height: 300px;
  padding: clamp(24px, 3vw, 34px);
}
.qwizzy-feature-copy h3 { margin: 18px 0 12px; }
.qwizzy-feature-copy p { color: var(--muted); }
.qwizzy-feature img {
  width: 100%;
  height: auto;
  border-top: 1px solid var(--line-soft);
}
.privacy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.privacy-item {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(118,87,255,.11), transparent 42%),
    var(--ink-2);
}
.privacy-item h3 {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.privacy-item h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.privacy-item p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.72;
}
.privacy-updated {
  margin-top: 22px;
  text-align: right;
  color: var(--muted-2);
  font-size: .8rem;
}

/* ---------- Qwizzy account deletion ---------- */
.deletion-hero { padding-bottom: 72px; }
.deletion-shell { max-width: 1080px; }
.deletion-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 24px;
  align-items: start;
  margin-top: 54px;
}
.deletion-card,
.deletion-aside > * {
  border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.deletion-card { padding: clamp(24px, 4vw, 44px); }
.deletion-aside { display: grid; gap: 16px; }
.deletion-aside .privacy-item { min-height: 0; }
.deletion-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  opacity: .68;
}
.deletion-step[hidden] { display: none; }
.deletion-step.is-active { opacity: 1; }
.deletion-step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 800;
}
.deletion-step h2 { margin: 4px 0 10px; font-family: var(--font-display); font-size: clamp(1.55rem, 3vw, 2.15rem); }
.deletion-step p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.deletion-step form { display: grid; gap: 14px; }
.deletion-step label:not(.deletion-confirm) { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.deletion-code-input {
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--ink-2) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
  font: 750 1.25rem/1 var(--font-mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  outline: none;
}
.deletion-code-input::placeholder {
  color: var(--muted-2);
  -webkit-text-fill-color: var(--muted-2);
  opacity: 1;
}
.deletion-code-input:-webkit-autofill,
.deletion-code-input:-webkit-autofill:hover,
.deletion-code-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--accent);
  box-shadow: 0 0 0 1000px var(--ink-2) inset;
  transition: background-color 9999s ease-out 0s;
}
.deletion-code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.deletion-card .btn { justify-content: center; border: 0; cursor: pointer; }
.deletion-danger { background: #d83d58; color: #fff; }
.deletion-danger:hover { background: #eb4966; }
.deletion-confirm { display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: start; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.deletion-confirm input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.deletion-timer { color: var(--accent) !important; font-weight: 750; }
.deletion-text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 7px; }
.deletion-text-button:hover { color: var(--accent); }
.deletion-success .deletion-step-number { color: #57d59a; border-color: #57d59a; background: rgba(87,213,154,.12); }
.deletion-support { margin-top: 18px; text-align: center; }
.deletion-note { margin: 0; padding: 20px 22px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.form-status { min-height: 1.5em; margin: 22px 0 0 56px; color: var(--muted); font-size: .88rem; }
.form-status[data-kind="error"] { color: #ff6b82; }
.form-status[data-kind="success"] { color: #57d59a; }
@media (max-width: 800px) {
  .deletion-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .deletion-card { padding: 22px 18px; }
  .deletion-step { grid-template-columns: 1fr; }
  .form-status { margin-left: 0; }
}
@media (max-width: 900px) {
  .qwizzy-feature-grid { grid-template-columns: 1fr; }
  .qwizzy-feature {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
  }
  .qwizzy-feature-copy { min-height: 0; }
  .qwizzy-feature img { border-top: 0; border-left: 1px solid var(--line-soft); }
}
@media (max-width: 620px) {
  .qwizzy-feature { display: block; }
  .qwizzy-feature img { border-left: 0; border-top: 1px solid var(--line-soft); }
  .privacy-list { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line-soft); padding: 62px 0 34px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; margin-bottom: 44px; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 15px; font-weight: 650; }
.foot-grid a { display: block; padding: 5px 0; font-size: .89rem; color: var(--muted); transition: color .3s, transform .3s var(--ease); }
.foot-grid a:hover { color: var(--accent); transform: translateX(4px); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--muted-2); }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 0; z-index: 80;
    flex-direction: column; justify-content: center; gap: 8px;
    background: var(--ink); padding: 80px 28px 40px;
    clip-path: circle(0% at calc(100% - 46px) 40px);
    transition: clip-path .7s var(--ease);
  }
  .nav.is-open { clip-path: circle(150% at calc(100% - 46px) 40px); }
  .nav a { font-family: var(--font-display); font-size: 1.9rem; padding: 12px 0; color: var(--text); }
  .nav a::after { display: none; }
  .head-tools { margin-left: auto; z-index: 85; }

  /* the wordmark must give way before the menu button does */
  .head-inner { gap: 10px; }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 480px) {
  .brand img { width: 32px; }
  .brand-name { font-size: .88rem; }
  .brand-sub { font-size: .52rem; letter-spacing: .22em; }
  .head-tools { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .reveal-words .word > span { transform: none; }
  #field { display: none; }
}
