/* SukuTree landing page. Dark and light from the same tokens; system choice first, the toggle wins. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-normal.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f3ea;
  --bg-2: #efeadc;
  --surface: #fffdf7;
  --surface-2: #f3efe3;
  --ink: #17201a;
  --ink-2: #3c4a40;
  --ink-3: #56645a;
  --line: #d9d2bf;
  --line-strong: #8f9a8f;
  --accent: #2b6a3d;
  --accent-ink: #ffffff;
  --accent-soft: #dfeedd;
  --accent-text: #22603a;
  --glow-1: rgba(84, 160, 94, 0.22);
  --glow-2: rgba(214, 170, 80, 0.16);
  --danger: #a3261c;
  --danger-soft: #fbe9e6;
  --focus: #1f5f9e;
  --shadow: 0 1px 2px rgba(23, 32, 26, 0.06), 0 12px 32px -12px rgba(23, 32, 26, 0.18);
  --radius: 20px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b100d;
    --bg-2: #0f1611;
    --surface: #131b16;
    --surface-2: #18221c;
    --ink: #eef3ec;
    --ink-2: #c9d4ca;
    --ink-3: #a3b1a6;
    --line: #26332b;
    --line-strong: #6b7d70;
    --accent: #8fdca3;
    --accent-ink: #07130b;
    --accent-soft: #173323;
    --accent-text: #9fe6b1;
    --glow-1: rgba(110, 214, 140, 0.16);
    --glow-2: rgba(234, 190, 100, 0.08);
    --danger: #ff9d90;
    --danger-soft: #3a1714;
    --focus: #ffd166;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b100d;
  --bg-2: #0f1611;
  --surface: #131b16;
  --surface-2: #18221c;
  --ink: #eef3ec;
  --ink-2: #c9d4ca;
  --ink-3: #a3b1a6;
  --line: #26332b;
  --line-strong: #6b7d70;
  --accent: #8fdca3;
  --accent-ink: #07130b;
  --accent-soft: #173323;
  --accent-text: #9fe6b1;
  --glow-1: rgba(110, 214, 140, 0.16);
  --glow-2: rgba(234, 190, 100, 0.08);
  --danger: #ff9d90;
  --danger-soft: #3a1714;
  --focus: #ffd166;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

/* Which drawing to show follows the same switch. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: max(16px, min(4vw, 40px));
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 44px; padding: 0.6em 1.2em;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 1.15em; height: 1.15em; transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 10px 30px -8px var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-large { min-height: 54px; padding: 0.8em 1.6em; font-size: 1.08rem; }
.btn-small { min-height: 40px; padding: 0.45em 1em; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .btn, .btn svg { transition: none; } .btn:hover svg { transform: none; } }

/* ----------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .logo { width: 30px; height: 30px; color: var(--accent); }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 550; letter-spacing: -0.01em; white-space: nowrap; }
.header-nav { display: flex; align-items: center; gap: 8px; }

/* The way to each section: links where there is room, a Menu button where there is not. */
/* Below the width where the links fit, the Menu button is the last thing in the header, at the right
   edge, so its list (right: 0) opens inside the screen. `order` moves it past the settings without
   changing the markup, which keeps the wide layout's tab order: brand, sections, settings. */
.section-nav { order: 3; }
.header-nav { margin-left: auto; }
.section-links { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 2px; }
.section-links a, .section-menu summary, .section-menu li a, .lang-menu summary, .lang-menu li a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  color: var(--ink-2); font-size: 0.95rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.section-links a:hover, .section-menu summary:hover, .section-menu li a:hover, .lang-menu summary:hover, .lang-menu li a:hover { background: var(--surface-2); color: var(--ink); }
.section-menu, .lang-menu { position: relative; }
.section-menu summary, .lang-menu summary { gap: 8px; cursor: pointer; list-style: none; border: 1px solid var(--line); }
.section-menu summary::-webkit-details-marker, .lang-menu summary::-webkit-details-marker { display: none; }
.section-menu > ul, .lang-menu > ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; max-width: calc(100vw - 32px);
  list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.section-menu li a, .lang-menu li a { display: flex; min-height: 44px; border-radius: 10px; }
/* The language picker: the same list, narrower, with the language being read marked. */
.lang-menu > ul { min-width: 180px; }
/* The name of the language only where the header has room to spare (the section links in French or Russian
   are long); elsewhere the globe alone, and the name stays for screen readers. */
.lang-menu summary { padding: 0; width: 40px; justify-content: center; }
.lang-menu summary .lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1320px) {
  .lang-menu summary { padding: 0 12px; width: auto; }
  .lang-menu summary .lang-name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
.lang-menu li a[aria-current] { background: var(--surface-2); color: var(--ink); }
.section-links .is-cta { display: none; }
/* The row of links from 1160 px, the Menu button below it: with "Our story" as a fifth link the French row is
   133 px too long at 1020 (measured in all seven languages, 2026-09-21), and the language's name moved up to
   1320 px for the same reason. */
@media (min-width: 1160px) {
  .section-links { display: flex; }
  .section-menu { display: none; }
  .section-nav { order: 0; margin-left: 24px; margin-right: auto; }
  .header-nav { margin-left: 0; }
}
.lang-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: 999px; color: var(--ink-2); font-size: 0.95rem; font-weight: 600; text-decoration: none;
}
.lang-link:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme-toggle svg:last-of-type { display: none; }
.theme-toggle[aria-pressed="true"] svg:first-of-type { display: none; }
.theme-toggle[aria-pressed="true"] svg:last-of-type { display: block; }
.lang-link { white-space: nowrap; }
@media (max-width: 560px) {
  .header-nav .btn { display: none; }
}
@media (max-width: 480px) {
  .section-menu summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .section-menu summary { padding: 0; width: 40px; justify-content: center; }
  .brand-name { font-size: 1.15rem; }
  .header-nav { gap: 4px; }
  .lang-link { padding: 0 8px; font-size: 0.88rem; }
  .btn-small { padding: 0.45em 0.8em; font-size: 0.88rem; }
}

/* ------------------------------------------------------------------- hero */

.hero { position: relative; isolation: isolate; padding-block: clamp(36px, 6vw, 84px) clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 72% 42%, var(--glow-1), transparent 70%),
    radial-gradient(30% 30% at 90% 80%, var(--glow-2), transparent 70%),
    radial-gradient(35% 35% at 10% 10%, color-mix(in srgb, var(--glow-1) 50%, transparent), transparent 70%);
}
.hero-grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: center; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .hero-art { margin-top: 3.4rem; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 0.9rem; font-weight: 650; letter-spacing: 0.01em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }

.hero h1 {
  margin-top: 22px;
  font-size: clamp(3rem, 2.2rem + 4.2vw, 5.6rem);
  font-weight: 450; line-height: 1; letter-spacing: -0.015em;
  font-variation-settings: "opsz" 110;
}
.hero h1 .accent { color: var(--accent-text); font-style: normal; font-weight: 500; display: inline-block; }
/* Fraunces has no Cyrillic, so these two headlines are set in the reader's own serif, which runs wider. */
html:lang(bg) .hero h1, html:lang(ru) .hero h1 { font-size: clamp(2.35rem, 1.75rem + 3.3vw, 4.5rem); letter-spacing: 0; line-height: 1.06; }
/* "generationerna." is the longest last word of the seven: a little smaller on a narrow phone, so it keeps its gutter. */
html:lang(sv) .hero h1 { font-size: clamp(2.7rem, 2.2rem + 4.2vw, 5.6rem); }
/* Beside the tree, a long last word has to stop short of it: "generationerna.", "поколенията.", "põlvkondade.". */
@media (min-width: 960px) {
  html:lang(sv) .hero h1 { font-size: clamp(2.7rem, 0.9rem + 4.4vw, 5.3rem); }
  html:lang(bg) .hero h1 { font-size: clamp(2.35rem, 0.5rem + 4.1vw, 4.5rem); }
  html:lang(et) .hero h1 { font-size: clamp(3rem, 1.75rem + 4.2vw, 5.6rem); }
}
.lead { margin-top: 22px; max-width: 34ch; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.btn-text { display: inline-flex; align-items: center; gap: 0.45em; min-height: 44px; padding: 0 4px; color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.3em; }
.btn-text:hover { text-decoration-color: currentColor; }
.btn-text svg { width: 1.1em; height: 1.1em; transform: rotate(90deg); }

.hero-art { position: relative; margin: 0; }
.art-stage {
  position: relative; aspect-ratio: 1343 / 878; width: 100%;
  border-radius: var(--radius);
}
.art-frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.art-frame.is-active { opacity: 1; }
.art-frame img { width: 100%; height: 100%; object-fit: contain; }
.hand-note {
  position: absolute; right: 0; bottom: 100%; margin-bottom: 0.1em; z-index: 2;
  font-family: var(--hand); font-weight: 500; font-size: clamp(1.35rem, 1rem + 1.2vw, 2rem); line-height: 1.05;
  color: var(--ink-3); transform: rotate(-7deg); text-align: center; pointer-events: none;
}
@media (max-width: 959px) {
  .hand-note { position: static; transform: rotate(-3deg); margin: 0 0 6px auto; width: max-content; text-align: right; }
}
.art-caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 14px; font-size: 0.92rem; color: var(--ink-3);
}
.art-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip svg { width: 14px; height: 14px; }
.chip-pause .i-play { display: none; }
.chip-pause.is-paused .i-play { display: block; }
.chip-pause.is-paused .i-pause { display: none; }

/* The tree grows up out of the ground the first time it is seen. */
@keyframes grow {
  from { clip-path: inset(100% -5% 0 -5%); transform: translateY(18px); filter: saturate(0.4); }
  to { clip-path: inset(-10% -5% 0 -5%); transform: none; filter: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .art-stage { animation: grow 1.9s cubic-bezier(0.2, 0.7, 0.1, 1) 0.15s both; }
.js .hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hand-note { animation: rise 0.9s ease 1.4s both; }

/* ---------------------------------------------------------------- sections */

.section { padding-block: clamp(48px, 6vw, 80px); scroll-margin-top: 72px; }
.section-title { font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem); font-weight: 450; letter-spacing: -0.025em; }
.section-title-small { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem); }
.section-intro { margin-top: 14px; max-width: 52ch; color: var(--ink-2); font-size: 1.12rem; }

.tiles { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile-wide { grid-column: 1 / -1; } }
.tile {
  position: relative; overflow: hidden;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile-wide { display: grid; gap: 24px; align-items: center; }
@media (min-width: 960px) { .tile-wide { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.tile-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-text);
}
.tile-icon svg { width: 24px; height: 24px; }
.tile h3 { margin-top: 18px; font-size: 1.45rem; font-weight: 550; }
.tile p { margin-top: 10px; color: var(--ink-2); }
.tile-art { border-radius: 14px; background: var(--surface-2); padding: 10px; }
.tile-art img { width: 100%; height: auto; }
.tile-shot { padding: 0; overflow: hidden; border: 1px solid var(--line); background: #0d1017; }
.tile-shot img { border-radius: 13px; }

.strip { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); font-weight: 600; }
.strip li { display: inline-flex; align-items: center; gap: 8px; }
.strip svg { width: 20px; height: 20px; color: var(--accent-text); }

.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .art-stage, .js .hero-copy > *, .js .hand-note { animation: none; }
  .art-frame { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------ video */

/* After the feature boxes (2026-09-24), and on a computer never taller than the window below the header: 16:10 film,
   so its width follows the window's height. */
.video-section { padding-block: 0 clamp(8px, 2vw, 24px); }
.video-frame {
  margin-top: 28px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: #000;
}
@media (min-width: 900px) {
  .video-frame { width: min(100%, calc((100svh - 150px) * 1.6)); margin-inline: auto; }
  .video-section .section-title, .video-note, .video-desc { width: min(100%, calc((100svh - 150px) * 1.6)); margin-inline: auto; }
}
.video-frame video { width: 100%; height: auto; }
.video-note { margin-top: 14px; color: var(--ink-3); font-size: 0.95rem; }
.video-desc { margin-top: 14px; color: var(--ink-2); }
.video-desc summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* -------------------------------------------------------------------- demo */

.demo-stage {
  position: relative; margin-top: 28px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface-2);
}
.demo-section [hidden] { display: none !important; }
.demo-poster { position: relative; }
.demo-poster img { width: 100%; height: auto; opacity: 0.55; }
.demo-open { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.demo-frame { display: block; width: 100%; height: min(78svh, 780px); border: 0; background: var(--surface); }
.demo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; }
.demo-note { flex: 1 1 18rem; color: var(--ink-3); font-size: 0.95rem; }
/* As wide as the film above it, and never taller than the window leaves room for. */
@media (min-width: 900px) {
  .demo-inner { width: min(100%, calc((100svh - 150px) * 1.6)); margin-inline: auto; }
}

/* ----------------------------------------------------------------- request */

.request { position: relative; background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2)); }
.request-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .request-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.steps-title { margin-top: 32px; font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--ink-2); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 700;
}
.steps li { padding-top: 5px; }
.steps li::before { margin-top: -5px; }

.request-card, .contact-card {
  border-radius: calc(var(--radius) + 4px); padding: clamp(22px, 3.2vw, 36px);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------- forms */

.lform { display: grid; gap: 18px; }
.required-note { font-size: 0.92rem; color: var(--ink-3); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; }
.optional { font-weight: 400; color: var(--ink-3); }
.hint { font-size: 0.92rem; color: var(--ink-3); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border-radius: 12px; border: 1.5px solid var(--line-strong);
  background: var(--bg); color: var(--ink);
  font: inherit; line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 110px; }
.field-short input { max-width: 8rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--ink-2); }
.has-error input, .has-error textarea { border-color: var(--danger); }
.field-error { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-weight: 600; font-size: 0.95rem; }
.field-error svg { width: 18px; height: 18px; margin-top: 3px; }
.field-error[hidden] { display: none; }
.form-privacy { font-size: 0.92rem; color: var(--ink-3); }
.lform .btn-primary { justify-self: start; }
.form-alert { padding: 14px 16px; border-radius: 12px; background: var(--danger-soft); color: var(--ink); border: 1px solid var(--danger); }
.form-alert[hidden] { display: none; }
.form-alert ul { margin: 6px 0 0; padding-left: 1.2em; }
.form-alert a { color: var(--ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-done { display: grid; justify-items: start; gap: 8px; padding: 8px 0; }
.form-done[hidden] { display: none; }
.done-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.done-icon svg { width: 28px; height: 28px; }
.done-title { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.2; margin-top: 6px; }

/* ------------------------------------------------------------------- about */

.about { background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2)); }
.request + .about { background: var(--bg-2); padding-top: 0; }
.about-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) { .about-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: clamp(28px, 5vw, 64px); } }
.about-text { display: grid; gap: 14px; max-width: 62ch; color: var(--ink-2); font-size: 1.08rem; }
/* The two of us, like a print on the shelf: rounded, a paper edge, a shadow and the slightest tilt. */
.about-side { display: grid; gap: 22px; align-content: start; }
.about-photo { margin: 6px 0 8px; max-width: 520px; }
.about-photo img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  border: 7px solid var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(-1.6deg);
}
@media (prefers-reduced-motion: no-preference) {
  .about-photo img { transition: transform 0.4s ease; }
  .about-photo img:hover { transform: rotate(0deg) scale(1.01); }
}
.about-sign { margin-top: 4px; font-family: var(--hand); font-size: 1.9rem; line-height: 1.1; color: var(--ink); }

/* ----------------------------------------------------------------- contact */

.contact { background: var(--bg-2); padding-top: 0; }
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 64px); }
@media (min-width: 900px) { .contact-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: clamp(28px, 5vw, 64px); } }
.contact-copy p { margin-top: 8px; color: var(--ink-2); }
.contact-details summary { list-style: none; width: max-content; max-width: 100%; }
.contact-details summary::-webkit-details-marker { display: none; }
.contact-details[open] summary { margin-bottom: 18px; }

/* ------------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 28px 36px; font-size: 0.95rem; color: var(--ink-3); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--ink-2); display: inline-block; padding-block: 4px; }

/* ------------------------------------------------------------------- legal */

.legal-main { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 96px); }
.legal-wrap { max-width: 820px; }
.back-link { display: inline-block; padding-block: 6px; font-weight: 600; }
.legal { margin-top: 18px; }
.legal h1 { font-size: clamp(2.2rem, 1.8rem + 2vw, 3.2rem); font-weight: 450; letter-spacing: -0.025em; }
.legal h2 { margin-top: 40px; font-size: 1.6rem; }
.legal h3 { margin-top: 24px; font-family: var(--sans); font-size: 1.08rem; font-weight: 700; }
.legal p, .legal ul, .legal table { margin-top: 12px; }
.legal ul { padding-left: 1.3em; }
.legal li + li { margin-top: 4px; }
.legal-updated { color: var(--ink-3); }
.legal-note { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.callout { margin-top: 24px; padding: 18px 20px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.legal table { width: 100%; border-collapse: collapse; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-size: 0.95rem; color: var(--ink-2); }
@media (max-width: 560px) {
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { position: absolute; left: -10000px; }
  .legal td:first-child { font-weight: 700; border-bottom: 0; padding-bottom: 0; }
}

@media print {
  .site-header, .hero-glow, .art-controls, .skip { display: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .btn, .chip, .theme-toggle, .field input, .field textarea { border: 1px solid ButtonText; }
  .chip[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* ======================================================= apps.aj-group.net */

/* AJ-Group's own palette, as on aj-group.net. */
body.aj {
  --bg: #f4f8fb; --bg-2: #e9f1f7; --surface: #ffffff; --surface-2: #eef4f8;
  --ink: #0d1f2b; --ink-2: #33505f; --ink-3: #536d7c;
  --line: #dbe6ee; --line-strong: #8aa2b1;
  --accent: #1d75a0; --accent-ink: #ffffff; --accent-soft: #e0eef6; --accent-text: #14607f;
  --glow-1: rgba(29, 117, 160, 0.16); --glow-2: rgba(42, 167, 155, 0.14);
  --focus: #0b5a86;
  --shadow: 0 4px 12px -4px rgba(13, 31, 43, .10), 0 18px 40px -22px rgba(13, 31, 43, .35);
  background: var(--bg); color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.aj {
    --bg: #08151e; --bg-2: #0b1b27; --surface: #0e2130; --surface-2: #132b3c;
    --ink: #e9f2f8; --ink-2: #b3c9d7; --ink-3: #8ea8b8;
    --line: #1e3a4d; --line-strong: #4d7188;
    --accent: #52a9d4; --accent-ink: #04141d; --accent-soft: #12304a; --accent-text: #81bddb;
    --glow-1: rgba(82, 169, 212, 0.16); --glow-2: rgba(79, 208, 190, 0.10);
    --focus: #ffd166;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] body.aj {
  --bg: #08151e; --bg-2: #0b1b27; --surface: #0e2130; --surface-2: #132b3c;
  --ink: #e9f2f8; --ink-2: #b3c9d7; --ink-3: #8ea8b8;
  --line: #1e3a4d; --line-strong: #4d7188;
  --accent: #52a9d4; --accent-ink: #04141d; --accent-soft: #12304a; --accent-text: #81bddb;
  --glow-1: rgba(82, 169, 212, 0.16); --glow-2: rgba(79, 208, 190, 0.10);
  --focus: #ffd166;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
}

/* aj-group.net sets its headings in the system sans, heavy. */
body.aj h1, body.aj h2, body.aj h3 { font-family: var(--sans); font-weight: 750; letter-spacing: -0.025em; }
body.aj .hero h1 { font-size: clamp(2.6rem, 1.9rem + 3.6vw, 4.6rem); line-height: 1.02; font-variation-settings: normal; }
body.aj .eyebrow { background: transparent; padding: 0; color: var(--ink-2); text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.08em; }
body.aj .eyebrow .dot { color: var(--accent); }
body.aj .section-title { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.8rem); }

.aj-logo { height: 34px; width: auto; }
.hub-hero { padding-bottom: clamp(32px, 5vw, 56px); }
.hub-hero .lead { max-width: 46ch; }

/* The SukuTree card keeps its own colours whatever the page around it wears. */
.tree-card {
  --tree-bg: #0b100d; --tree-ink: #eef3ec; --tree-ink-2: #c9d4ca; --tree-accent: #8fdca3; --tree-accent-ink: #07130b; --tree-soft: #173323;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 8px; align-items: center;
  margin-top: clamp(32px, 5vw, 56px); padding: clamp(24px, 4vw, 44px);
  border-radius: calc(var(--radius) + 8px);
  background: radial-gradient(60% 80% at 80% 40%, rgba(110, 214, 140, 0.16), transparent 70%), var(--tree-bg);
  color: var(--tree-ink); box-shadow: var(--shadow); border: 1px solid rgba(143, 220, 163, 0.18);
}
:root:not([data-theme="dark"]) body.aj .tree-card { --tree-bg: #f6f3ea; --tree-ink: #17201a; --tree-ink-2: #3c4a40; --tree-accent: #2b6a3d; --tree-accent-ink: #fff; --tree-soft: #dfeedd;
  background: radial-gradient(60% 80% at 80% 40%, rgba(84, 160, 94, 0.2), transparent 70%), var(--tree-bg); border-color: #d9d2bf; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.aj .tree-card { --tree-bg: #0b100d; --tree-ink: #eef3ec; --tree-ink-2: #c9d4ca; --tree-accent: #8fdca3; --tree-accent-ink: #07130b; --tree-soft: #173323;
    background: radial-gradient(60% 80% at 80% 40%, rgba(110, 214, 140, 0.16), transparent 70%), var(--tree-bg); border-color: rgba(143, 220, 163, 0.18); }
}
@media (min-width: 900px) { .tree-card { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; } }
.tree-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--tree-soft); color: var(--tree-accent); font-size: 0.88rem; font-weight: 650; }
.tree-chip .dot { color: var(--tree-accent); }
body.aj .tree-name { margin-top: 18px; font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; font-size: clamp(2.6rem, 2rem + 2.6vw, 4rem); line-height: 1; }
.tree-name a, .app-card h3 a { color: inherit; text-decoration: none; }
.tree-text { margin-top: 14px; max-width: 38ch; font-size: 1.1rem; color: var(--tree-ink-2); }
.tree-card .tree-cta { margin-top: 24px; background: var(--tree-accent); color: var(--tree-accent-ink); box-shadow: 0 8px 24px -10px var(--tree-accent); }
.tree-art img { width: 100%; height: auto; }

/* One link per card, stretched over all of it: a big target, one tab stop, one name. */
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.tree-card:focus-within, .app-card:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.tree-card:hover .tree-cta svg, .app-card:hover .app-open svg { transform: translateX(3px); }

.wedding { padding-top: clamp(24px, 4vw, 48px); }
.app-grid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
@media (min-width: 760px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.app-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.app-shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.app-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.app-card:hover .app-shot img { transform: scale(1.03); }
.app-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.app-card h3 { font-size: 1.3rem; }
.app-body > p:not(.app-foot) { color: var(--ink-2); }
.app-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.lock { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 600; }
.lock svg { width: 16px; height: 16px; }
.app-open { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 700; }
.app-open svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
@media (prefers-reduced-motion: reduce) {
  .app-card, .app-shot img, .app-open svg { transition: none; }
  .app-card:hover { transform: none; }
  .app-card:hover .app-shot img { transform: none; }
}
body.aj .hero h1 .accent { font-weight: inherit; }

/* ------------------------------------------------------------------ plans */
.plans { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(22px, 3vw, 30px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan h3 { font-size: 1.6rem; font-weight: 550; }
.plan-price { font-weight: 700; color: var(--ink); }
.plan-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--ink-2); }
.plan-lines li { display: flex; align-items: flex-start; gap: 10px; }
.plan-lines svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--accent-text); }
.plan-foot { font-size: 0.92rem; color: var(--ink-3); }
.plan-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; }
.plans-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.plans-legal { margin-top: 22px; font-size: 0.95rem; color: var(--ink-2); }

/* ------------------------------------------------------- legal pages, gate */
.legal-others { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-back { margin-top: 28px; }
.gate-wrap { max-width: 460px; display: grid; gap: 16px; }
.gate-wrap h1 { font-size: clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 450; letter-spacing: -0.02em; }
.gate-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.gate-brand .logo { width: 30px; height: 30px; color: var(--accent); }
.gate-form { margin-top: 8px; }
