/* ============================================================
   JoyTellect — Design System v3 "Emerald Dark" (макет)
   Dark theme with green accents. Soft-voxel motifs, image
   placeholders (backgrounds / icons / banners / shots) and a
   CSS-3D animated hero about 3D skin creation.
   Original brand, no Minecraft trade dress.
   Class names compatible with v1 markup.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Dark green-charcoal neutrals */
  --bg: #0c1310;          /* page background */
  --bg-soft: #0f1814;     /* tinted section */
  --card: #141f19;        /* surface */
  --card-2: #182620;      /* raised surface */
  /* Borders are alpha, not solid: a solid hairline draws a hard outline around
     every block and the page reads as stacked plates. Alpha lets the border
     pick up whatever it sits on, so edges recede instead of stacking. */
  --line: rgba(214, 244, 228, 0.085);
  --line-strong: rgba(214, 244, 228, 0.155);
  --line-field: #5c7c69; /* inputs need 3:1 non-text contrast (WCAG 1.4.11): 3.4:1 here */

  /* Lit surface: a short highlight at the top edge instead of a flat fill, so
     cards read as catching light rather than as painted rectangles. */
  --surface: linear-gradient(178deg, rgba(255, 255, 255, 0.048) 0%, rgba(255, 255, 255, 0.012) 34%, rgba(255, 255, 255, 0) 72%);
  --surface-2: linear-gradient(178deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%);

  --ink: #eaf4ee;         /* headings */
  --body: #b9cac0;        /* body text */
  --muted: #8aa295;       /* secondary text */

  /* Greens (single family + tints) */
  --primary: #10b981;     /* emerald 500 — CTA */
  --primary-2: #34d399;   /* emerald 400 — hover/links */
  --primary-soft: rgba(16, 185, 129, 0.14);
  --primary-ink: #a7f3d0; /* light mint for text accents */
  --primary-deep: #065f46;

  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --teal-ink: #99f6e4;

  --coral: #a3e635;       /* lime takes the old coral slot */
  --coral-soft: rgba(163, 230, 53, 0.12);
  --coral-ink: #d9f99d;

  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --amber-ink: #fde68a;

  /* Legacy dark-surface vars (v1 markup may reference) */
  --d-bg: #0a100d;
  --d-card: #141f19;
  --d-line: #2e453a;
  --d-text: #eaf4ee;
  --d-muted: #8aa295;

  /* Type */
  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  /* Radii / shadows */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  /* Wider, softer, less black: a tight dark shadow reads as a sticker cut out
     and dropped on the background. --edge-top is the lit top hairline. */
  --edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.22), 0 18px 40px -28px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.28), 0 30px 60px -32px rgba(16, 185, 129, 0.32);
  --shadow-btn: 0 6px 20px -10px rgba(16, 185, 129, 0.6);

  /* Layout */
  --container: 1160px;
  --gutter: 20px;

  /* Z-scale */
  --z-header: 50;
  --z-menu: 40;
  --z-skip: 100;
}

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

html { scroll-behavior: smooth; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background:
    radial-gradient(1100px 500px at 80% -200px, rgba(16, 185, 129, 0.07), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.1px;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-2); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--primary-ink); }

:focus-visible {
  outline: 3px solid var(--primary-2);
  outline-offset: 2px;
  border-radius: 4px;
}

ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

strong { color: var(--ink); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 64px 0; position: relative; }
/* Alternating sections used to be a flat fill between two hairlines, which cut
   the page into visible horizontal strips. The tint now fades in and out, so
   sections change weight without a seam. */
.section--soft {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.021) 14%,
      rgba(255, 255, 255, 0.026) 50%,
      rgba(255, 255, 255, 0.021) 86%,
      rgba(255, 255, 255, 0) 100%);
  border: 0;
}
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head .kicker { margin-bottom: 8px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary-2);
}
.kicker::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary-2), var(--coral));
  flex: none;
}

.lead { font-size: 1.13rem; color: var(--body); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: var(--z-skip);
  background: var(--primary);
  color: #04130c;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: #04130c; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(12, 19, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  color: var(--ink);
  flex: none;
}
.brand:hover { color: var(--primary-ink); }
.brand svg { width: 34px; height: 34px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav-group__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav a:hover, .nav-group__btn:hover { background: var(--primary-soft); color: var(--primary-ink); }
.nav a[aria-current="page"], .nav a.is-active { background: var(--primary-soft); color: var(--primary-ink); }

.nav-group { position: relative; }
.nav-group__btn::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 2px;
}
.nav-group__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-menu);
  min-width: 220px;
  background: var(--card-2);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  display: none;
}
.nav-group.is-open .nav-group__menu { display: block; }
.nav-group__menu a {
  display: flex;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--card);
    border-bottom: 1.5px solid var(--line);
    padding: 10px var(--gutter) 16px;
    box-shadow: var(--shadow-card);
  }
  .nav.is-open { display: flex; }
  .nav a, .nav-group__btn { width: 100%; justify-content: flex-start; }
  .nav-group__menu {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
    background: transparent;
  }
  .nav-group__btn { display: none; }
  .nav-group::before {
    content: attr(data-label);
    display: block;
    padding: 10px 14px 2px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .nav-cta { margin: 10px 0 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--shadow-btn);
  background: var(--primary);
  color: #04130c;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--primary-2); color: #04130c; }

.btn--secondary {
  background: var(--card);
  color: var(--primary-ink);
  border-color: var(--line-strong);
}
.btn--secondary:hover { border-color: var(--primary-2); color: var(--primary-ink); }

.btn--ghost { background: transparent; color: var(--primary-2); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 10px 8px; }
.btn--ghost:hover { color: var(--primary-ink); }

.btn--on-dark { background: var(--card-2); color: var(--ink); border-color: var(--line-strong); }
.btn--on-dark:hover { border-color: var(--primary-2); color: var(--primary-ink); }

/* Store buttons */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 9px 20px 9px 16px;
  border-radius: 14px;
  background: #060a08;
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--line-strong);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
  cursor: pointer;
}
.store-btn:hover { border-color: var(--primary-2); color: #fff; background: #0e1a15; }
.store-btn:active { transform: translateY(1px); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn__text small { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.store-btn__text span { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Chips (green-family tints) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  border: 1.5px solid transparent;
}
.chip svg { width: 14px; height: 14px; }
.chip--violet { background: var(--primary-soft); color: var(--primary-ink); border-color: rgba(52, 211, 153, 0.35); }
.chip--teal { background: var(--teal-soft); color: var(--teal-ink); border-color: rgba(45, 212, 191, 0.35); }
.chip--coral { background: var(--coral-soft); color: var(--coral-ink); border-color: rgba(163, 230, 53, 0.32); }
.chip--amber { background: var(--amber-soft); color: var(--amber-ink); border-color: rgba(251, 191, 36, 0.32); }
.chip--outline { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.on-dark .chip--violet { background: var(--primary-soft); color: var(--primary-ink); border-color: rgba(52, 211, 153, 0.35); }
.on-dark .chip--teal { background: var(--teal-soft); color: var(--teal-ink); border-color: rgba(45, 212, 191, 0.35); }

/* ---------- Cards ---------- */
.card {
  --card-pad: 26px;
  background: var(--surface), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--card-pad);
  box-shadow: var(--edge-top), var(--shadow-card);
}
.card h3 a, .card h4 a { color: inherit; text-decoration: none; }
.card h3 a:hover, .card h4 a:hover { color: var(--primary-2); }

.card--hover { transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.card--hover:hover { border-color: rgba(52, 211, 153, 0.5); box-shadow: var(--shadow-pop); transform: translateY(-3px); }

/* Whole-card click target: the heading link is stretched over the card, so the
   card stays a single semantic link (no nested anchors) while every part of it
   is clickable. Cards without a heading link are unaffected. */
.card--hover { position: relative; }
.card--hover h3 > a::after,
.card--hover h4 > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.card--hover:has(h3 > a),
.card--hover:has(h4 > a) { cursor: pointer; }
/* Secondary links and buttons stay clickable above the stretched overlay */
.card--hover .btn-row a,
.card--hover .btn,
.card--hover p a,
.card--hover li a,
.card--hover .card__meta a { position: relative; z-index: 2; }

.card-grid { display: grid; gap: 20px; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
}

.card .icon-tile {
  width: 52px; height: 52px;
  border-radius: 15px;
  border: 1px solid var(--line);
  box-shadow: var(--edge-top);
  background-image: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile--violet { background: var(--primary-soft); color: var(--primary-2); }
.icon-tile--teal { background: var(--teal-soft); color: var(--teal); }
.icon-tile--coral { background: var(--coral-soft); color: var(--coral); }
.icon-tile--amber { background: var(--amber-soft); color: var(--amber); }

.card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 0.88rem; align-items: center; }
/* Plain text in a meta row (e.g. "Last reviewed") takes its own line, so cards
   with different chip counts still line up as a row. */
.card__meta > span:not([class]) { flex: 1 0 100%; }

/* ---------- Facts block ---------- */
.facts {
  background: var(--surface), var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  box-shadow: var(--edge-top), var(--shadow-card);
}
.facts h2, .facts h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-bottom: 14px; }
.facts h2 svg, .facts h3 svg { width: 22px; height: 22px; color: var(--primary-2); }
.facts dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
  margin: 0;
}
@media (max-width: 640px) { .facts dl { grid-template-columns: 1fr; } }
.facts dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.facts dd a { font-weight: 700; }
.facts .facts__note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface), var(--card); box-shadow: var(--edge-top), var(--shadow-card); }
table.matrix { width: 100%; border-collapse: collapse; min-width: 560px; }
.matrix th, .matrix td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.matrix thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.028);
}
.matrix tbody tr:last-child td, .matrix tbody tr:last-child th { border-bottom: 0; }
.matrix tbody th { font-weight: 700; color: var(--ink); }
.matrix .yes { color: var(--primary-2); font-weight: 700; }
.matrix .no { color: var(--muted); }
.matrix .yes svg, .matrix .no svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 5px; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps > li {
  position: relative;
  counter-increment: step;
  background: var(--surface), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px 18px 68px;
  box-shadow: var(--edge-top);
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 18px; top: 16px;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #04130c;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps > li strong:first-child { display: block; font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-bottom: 2px; }

/* Horizontal mini-workflow */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }
.flow .card {
  --card-pad: 20px;
  padding: var(--card-pad);
  background: var(--surface-2), rgba(255, 255, 255, 0.018);
  border-color: rgba(214, 244, 228, 0.06);
  box-shadow: none;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.flow .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-2), rgba(52, 211, 153, 0));
}
.flow .card:nth-child(2)::before { background: linear-gradient(90deg, var(--teal), rgba(45, 212, 191, 0)); }
.flow .card:nth-child(3)::before { background: linear-gradient(90deg, var(--coral), rgba(163, 230, 53, 0)); }
.flow .card:nth-child(4)::before { background: linear-gradient(90deg, var(--amber), rgba(251, 191, 36, 0)); }
.flow .card:nth-child(2) .flow__num { color: var(--teal-ink); }
.flow .card:nth-child(3) .flow__num { color: var(--coral-ink); }
.flow .card:nth-child(4) .flow__num { color: var(--amber-ink); }
.flow .flow__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0;
  overflow: hidden;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  min-height: 44px;
  transition: background-color 0.18s ease;
}
.faq summary:hover { background: rgba(255, 255, 255, 0.035); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--primary-2);
  border-bottom: 2.5px solid var(--primary-2);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq .faq__body { padding: 0 20px 18px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 18px 0 0; font-size: 0.9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 4px; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); margin: 0 4px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-2); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(16, 185, 129, 0.22), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(163, 230, 53, 0.10), transparent 60%),
    linear-gradient(160deg, #101a15 0%, #0a110e 100%);
  color: var(--d-text);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .kicker { color: var(--primary-2); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: var(--body); max-width: 54ch; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  padding: 72px 0;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding: 52px 0; }
  .hero__art { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
}
.hero__art svg { width: 100%; height: auto; }
.hero--page .hero__inner { padding: 56px 0; }

/* voxel grid overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(52, 211, 153, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.032) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(80% 90% at 60% 20%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero > .container { position: relative; }

/* Decorative voxel cluster in the light page heroes (About / Contact / Support).
   Four saturated blocks at full strength read as clip art dropped next to the
   headline; dimmed and softly lit they sit back as a brand accent. */
.container > svg[aria-hidden="true"] {
  opacity: 0.72;
  filter: saturate(0.8) drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
}

/* ---------- Pixel strip ---------- */
.pixel-strip {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.pixel-strip i { aspect-ratio: 1; border-radius: 3px; background: var(--px, var(--line-strong)); display: block; }

/* ============================================================
   IMAGE PLACEHOLDERS (заглушки под изображения)
   .ph          — base frame (dashed, striped, labeled)
   .ph--banner  — wide game/app banner (21:8)
   .ph--wide    — background / section image (16:7)
   .ph--shot    — app screenshot, portrait (9:16)
   .ph--icon    — app icon slot (squircle)
   .ph-tag      — corner tag marking a background-image slot
   ============================================================ */
.ph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 120px;
  padding: 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(45deg, rgba(52, 211, 153, 0.035) 0 12px, transparent 12px 24px),
    var(--card-2);
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}
.ph svg { width: 30px; height: 30px; opacity: 0.75; color: var(--primary-2); }
.ph .ph__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
  max-width: 30ch;
}
.ph .ph__size { display: block; font-size: 0.72rem; opacity: 0.75; letter-spacing: 0.06em; }

.ph--banner { aspect-ratio: 21 / 8; min-height: 0; }
.ph--wide { aspect-ratio: 16 / 7; min-height: 0; }
.ph--shot { aspect-ratio: 9 / 16; min-height: 0; }
.ph--icon {
  width: 84px; height: 84px;
  min-height: 0;
  padding: 6px;
  gap: 4px;
  border-radius: 22px;
  flex: none;
}
.ph--icon svg { width: 24px; height: 24px; }
.ph--icon .ph__label { font-size: 0.6rem; letter-spacing: 0.02em; }

.ph-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px) { .ph-row { grid-template-columns: 1fr; max-width: 320px; } }

/* Corner tag for background-image slots (e.g. hero) */
.ph-tag {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(12, 19, 16, 0.72);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.ph-tag svg { width: 14px; height: 14px; color: var(--primary-2); }

/* ============================================================
   REAL MEDIA (replaces .ph placeholders once assets exist)
   .media          — framed image block (banner / screenshot / tile)
   .app-icon       — real app icon at the 84px slot size
   .hero--photo    — hero with a photographic background + scrim
   ============================================================ */
.media {
  position: relative;
  display: block;
  margin: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card-2);
  overflow: hidden;
}
.media img { display: block; width: 100%; height: auto; }
.media--banner { border-radius: var(--r-md); }
.media--shot { border-radius: var(--r-lg); }
.media--tile { border-radius: var(--r-md); }
.media--wide { border-radius: var(--r-md); }

/* Art direction grade. The library art comes from several sources with
   different saturation and colour temperature; a shared grade pulls them onto
   one palette so a grid of them reads as one library, not a mood board. */
.media img { filter: saturate(0.84) contrast(1.05) brightness(0.97); }
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(185deg, rgba(11, 24, 18, 0) 45%, rgba(11, 19, 15, 0.5) 100%),
    linear-gradient(160deg, rgba(16, 185, 129, 0.07), rgba(8, 24, 18, 0.14));
}

/* Image at the top of a card bleeds to the card edge instead of floating
   inside it. An inset image inside a bordered card is a frame within a frame,
   which is what makes the blocks read as stacked plates. */
.card > .media:first-child,
.card > .media--banner.mb-2:first-child {
  margin: calc((var(--card-pad) + 1px) * -1) calc((var(--card-pad) + 1px) * -1) 20px;
  border: 0;
  border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0;
  background: none;
}
.card > .media:first-child::after {
  background:
    linear-gradient(185deg, rgba(20, 31, 25, 0) 52%, rgba(20, 31, 25, 0.88) 97%, #141f19 100%),
    linear-gradient(160deg, rgba(16, 185, 129, 0.07), rgba(8, 24, 18, 0.14));
}

/* App icon overlaps the banner it sits under. Overlap is the cheapest real
   depth cue on a dark page: two elements on different planes instead of two
   more rectangles stacked in a column. */
.card > .media:first-child + .app-icon {
  position: relative;
  z-index: 1;
  margin-top: -52px;
  box-shadow:
    0 0 0 4px var(--card),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 14px 26px -14px rgba(0, 0, 0, 0.95);
}

/* Hover lift for interactive gallery tiles */
.card--hover:hover .media { border-color: rgba(52, 211, 153, 0.4); }
.card--hover:hover > .media:first-child { border-color: transparent; }
.card--hover .media img { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.35s ease; }
.card--hover:hover .media img { transform: scale(1.035); filter: saturate(0.95) contrast(1.05) brightness(1.02); }

.app-icon {
  display: block;
  width: 84px; height: 84px;
  flex: none;
  border-radius: 22px;
  border: 0;
  overflow: hidden;
  background: var(--card-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 10px 22px -12px rgba(0, 0, 0, 0.9);
}
.app-icon img { display: block; width: 100%; height: 100%; }

/* Photographic hero: image sits right, text stays on a dark scrim left.
   Pages set --hero-img (desktop) and --hero-img-sm (mobile) inline. */
.hero--photo {
  background-image:
    linear-gradient(100deg, #0b120f 0%, rgba(11, 18, 15, 0.95) 32%, rgba(11, 18, 15, 0.66) 50%, rgba(11, 18, 15, 0.30) 100%),
    var(--hero-img);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center right;
}
.hero--photo::before { opacity: 0.45; }
/* Single-column only on the app pages, whose photo already carries the visual.
   The home hero keeps its two columns: text left, live 3D character right. */
.hero--page.hero--photo .hero__inner {
  grid-template-columns: minmax(0, 620px);
  padding: 88px 0 96px;
}
@media (max-width: 900px) {
  .hero--photo {
    background-image:
      linear-gradient(180deg, rgba(11, 18, 15, 0.93) 0%, rgba(11, 18, 15, 0.88) 55%, rgba(11, 18, 15, 0.96) 100%),
      var(--hero-img-sm, var(--hero-img));
    background-position: center, 70% center;
  }
  .hero--photo .hero__inner { grid-template-columns: 1fr; padding: 52px 0 58px; }
}

/* Home hero: the photo is a backdrop behind the live 3D character, so it is
   pushed further back than on the app pages to keep the figure legible. */
.hero--photo-backdrop {
  background-image:
    linear-gradient(100deg, #0b120f 0%, rgba(11, 18, 15, 0.93) 30%, rgba(11, 18, 15, 0.80) 58%, rgba(11, 18, 15, 0.74) 100%),
    var(--hero-img);
}
@media (max-width: 900px) {
  .hero--photo-backdrop {
    background-image:
      linear-gradient(180deg, rgba(11, 18, 15, 0.94) 0%, rgba(11, 18, 15, 0.90) 55%, rgba(11, 18, 15, 0.96) 100%),
      var(--hero-img-sm, var(--hero-img));
  }
}

/* ============================================================
   HERO 3D ANIMATION — voxel mannequin being "painted"
   (CSS 3D, honors prefers-reduced-motion)
   ============================================================ */
.voxel-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  perspective: 1100px;
}
@media (max-width: 900px) { .voxel-scene { min-height: 400px; transform: scale(0.95); } }

/* WebGL character: replaces the CSS figure once the module initialises. */
.voxel-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.voxel-scene.is-3d .voxel-figure,
.voxel-scene.is-3d .vox-scan { display: none; }

.voxel-figure {
  position: relative;
  width: 120px;
  height: 250px;
  transform-style: preserve-3d;
  animation: vox-spin 16s linear infinite;
}
@keyframes vox-spin {
  from { transform: rotateX(-10deg) rotateY(0deg); }
  to   { transform: rotateX(-10deg) rotateY(360deg); }
}

/* Each part is a cuboid: --w/--h/--d + positioned in the figure */
.vox {
  position: absolute;
  left: 50%;
  width: var(--w); height: var(--h);
  margin-left: calc(var(--w) / -2);
  transform-style: preserve-3d;
  transform: translateX(var(--x, 0)) translateZ(var(--z, 0));
}
.vox i {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--w); height: var(--h);
  background:
    repeating-conic-gradient(var(--pxa) 0% 25%, var(--pxb) 0% 50%);
  background-size: calc(100% / 3) calc(100% / 3);
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 6px;
}
.vox i:nth-child(1) { transform: translate(-50%, -50%) translateZ(calc(var(--d) / 2)); }
.vox i:nth-child(2) { transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.vox i:nth-child(3), .vox i:nth-child(4) { width: var(--d); filter: brightness(0.72); }
.vox i:nth-child(3) { transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--w) / 2)); }
.vox i:nth-child(4) { transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.vox i:nth-child(5), .vox i:nth-child(6) { height: var(--d); }
.vox i:nth-child(5) { transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--h) / 2)); filter: brightness(1.18); }
.vox i:nth-child(6) { transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--h) / 2)); filter: brightness(0.6); }

/* Part geometry (blank mannequin, greens/mint — original, not Steve) */
.vox--head  { --w: 76px; --h: 76px; --d: 76px; top: 0; --pxa: #34d399; --pxb: #10b981; }
.vox--torso { --w: 84px; --h: 96px; --d: 44px; top: 80px; --pxa: #1e3d31; --pxb: #295445; }
.vox--arm-l { --w: 26px; --h: 92px; --d: 34px; top: 82px; --x: -57px; --pxa: #2dd4bf; --pxb: #14b8a6; }
.vox--arm-r { --w: 26px; --h: 92px; --d: 34px; top: 82px; --x: 57px; --pxa: #2dd4bf; --pxb: #14b8a6; }
.vox--leg-l { --w: 34px; --h: 66px; --d: 40px; top: 180px; --x: -22px; --pxa: #182b23; --pxb: #223c30; }
.vox--leg-r { --w: 34px; --h: 66px; --d: 40px; top: 180px; --x: 22px; --pxa: #182b23; --pxb: #223c30; }

/* Painted scanline sweeping the figure (2D overlay in the scene) */
.vox-scan {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 210px;
  height: 30px;
  margin-left: -105px;
  border-radius: 10px;
  background: linear-gradient(180deg, transparent, rgba(52, 211, 153, 0.5) 48%, rgba(163, 230, 53, 0.28) 56%, transparent);
  box-shadow: 0 0 40px rgba(52, 211, 153, 0.45);
  animation: vox-scan 4.2s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  pointer-events: none;
  z-index: 2;
}
@keyframes vox-scan {
  from { transform: translateY(0); opacity: 0.9; }
  to   { transform: translateY(230px); opacity: 0.9; }
}

/* Ground glow */
.vox-ground {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 240px; height: 44px;
  margin-left: -120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.28), transparent);
  filter: blur(2px);
  animation: vox-ground 16s linear infinite;
  pointer-events: none;
}
@keyframes vox-ground {
  0%, 100% { transform: scaleX(1); }
  25% { transform: scaleX(0.82); }
  50% { transform: scaleX(1); }
  75% { transform: scaleX(0.82); }
}

/* Floating palette + brush cursor */
  to   { transform: translateY(9px) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .voxel-figure { animation: none; transform: rotateX(-10deg) rotateY(-32deg); }
  .vox-scan, .vox-ground { display: none; }
  }

/* ---------- Disclaimer & footer ---------- */
.disclaimer {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.05), rgba(251, 191, 36, 0.03));
  border-top: 1px solid rgba(251, 191, 36, 0.16);
  border-bottom: 1px solid rgba(251, 191, 36, 0.16);
  color: #dcc078;
  padding: 14px 0;
}
.disclaimer .container {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.disclaimer svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

.site-footer {
  background: #0a100d;
  color: var(--muted);
  padding: 52px 0 28px;
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0));
}
.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: var(--primary-ink); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Legal-only footer: company identity, addresses and policy links */
.footer-legal {
  display: grid;
  grid-template-columns: 0.85fr 3fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.footer-legal__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.footer-legal h3 {
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.footer-legal p { font-size: 0.92rem; line-height: 1.55; margin: 0; }
.footer-legal ul { list-style: none; padding: 0; margin: 0; }
.footer-legal li { margin-bottom: 8px; }
.footer-legal .pending { color: var(--muted); font-style: italic; }
.footer-legal address { font-style: normal; font-size: 0.92rem; line-height: 1.55; }
@media (max-width: 900px) {
  .footer-legal { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .footer-legal__cols { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: var(--ink);
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-brand .brand { color: var(--ink); margin-bottom: 12px; }
.footer-brand p { max-width: 32ch; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 0.85rem;
}
.footer-bottom .legal-note { max-width: 62ch; opacity: 0.85; }

/* ---------- Guide-specific ---------- */
.tested-on {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  background: var(--primary-soft);
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: var(--primary-ink);
  font-size: 0.93rem;
  font-weight: 700;
}
.tested-on svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.tested-on span { display: inline-flex; align-items: center; }

.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 0.9rem; align-items: center; }
.byline strong { color: var(--ink); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.2em; }
.prose .table-wrap { margin: 1.4em 0; }
/* Registered-company block in the legal documents */
.legal-address {
  font-style: normal;
  margin: 1em 0 1.2em;
  padding-left: 16px;
  border-left: 2px solid var(--line-strong);
  color: var(--ink);
  line-height: 1.75;
}
.prose figure { margin: 1.4em 0; }
.prose figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

.callout {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--primary-2);
  background: var(--surface), var(--card);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin: 1.2em 0;
}
.callout--warn { border-left-color: var(--amber); background: #1c170a; }
.callout--tip { border-left-color: var(--teal); }

/* ---------- Screenshot / media frames ---------- */
.shot {
  border-radius: var(--r-lg);
  border: 1.5px solid var(--line);
  background: var(--card-2);
  overflow: hidden;
}
.shot svg { width: 100%; height: auto; display: block; }
/* Horizontally scrollable screenshot rail: apps have more screens than fit on
   one row, so the row scrolls and snaps instead of wrapping. */
.shot-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.shot-row > figure { margin: 0; scroll-snap-align: start; }
.shot-row::-webkit-scrollbar { height: 8px; }
.shot-row::-webkit-scrollbar-track { background: var(--bg-soft); border-radius: 4px; }
.shot-row::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.shot-row::-webkit-scrollbar-thumb:hover { background: var(--primary); }
.shot-row:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 4px; border-radius: var(--r-md); }
.shot-row__hint { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
@media (max-width: 800px) { .shot-row { grid-auto-columns: 76%; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; max-width: 560px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--card-2);
  border: 1.5px solid var(--line-field);
  border-radius: var(--r-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 5px; }

/* ---------- Utility ---------- */
.on-dark { color: var(--d-text); }
.text-muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.center { text-align: center; }
.center .section-head, .center .btn-row { margin-left: auto; margin-right: auto; justify-content: center; }

.anchor-offset { scroll-margin-top: 90px; }

/* 404 */
.error-hero { padding: 90px 0; text-align: center; }
.error-hero .pixel-404 { margin: 0 auto 26px; width: 220px; }

@media print {
  .site-header, .nav-toggle, .site-footer, .disclaimer { display: none; }
}
