/* Kalel v2, secondary pages: legal texts and the 404. Same tokens as kalel-v2.css,
   without the home page's drawing, calculator and motion. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #1a1e21;
  --panel: #22272b;
  --ink: #e3e0d8;
  --ink-2: #b4b8b5;
  --muted: #9aa3a8;
  --line: rgba(227, 224, 216, 0.14);
  --line-strong: rgba(227, 224, 216, 0.32);
  --accent: #4fa3ff;
  --accent-hover: #6db4ff;
  --accent-ink: #0b1622;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --nav-h: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --fs-h1: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  --fs-note: 0.75rem;

  /* cookie banner (assets/js/consent.js) */
  --cc-bg: var(--panel);
  --cc-ink: var(--ink);
  --cc-line: var(--line-strong);
  --cc-btn-line: var(--line-strong);
  --cc-btn-hover: rgba(227, 224, 216, 0.08);
  --cc-focus: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif; font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; font-weight: 500; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.note { font-size: var(--fs-note); font-stretch: 125%; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 0;
  font: inherit; font-size: 1rem; font-weight: 560; font-stretch: 108%; white-space: nowrap; text-decoration: none; cursor: pointer;
  touch-action: manipulation; transition: transform 140ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--ghost:hover { border-color: var(--ink); }
}

/* ------------------------------------------------------------ Header */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.site-header .wrap { height: var(--nav-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; font-stretch: 125%; font-weight: 600; font-size: 1rem; letter-spacing: 0.2em; }
.brand svg { width: 28px; height: 28px; }
.lang { display: inline-flex; border: 1px solid var(--line); }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: var(--fs-note); font-stretch: 125%; font-weight: 600; letter-spacing: 0.08em;
  min-width: 44px; min-height: 44px; padding: 0 10px; cursor: pointer; touch-action: manipulation;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
@media (max-width: 479px) { .site-header .btn--small { display: none; } }

/* ------------------------------------------------------------ Legal texts */

main { flex: 1; }
.doc { padding-block: clamp(48px, 8vw, 96px) clamp(64px, 10vw, 120px); }
.doc article { max-width: 46rem; }
.doc h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; line-height: 1.08; }
.doc .updated { margin-top: 16px; }
.doc .lede { margin-top: 24px; font-size: 1.125rem; color: var(--ink); }
.doc h2 { margin-top: 48px; font-size: 1.375rem; font-stretch: 104%; line-height: 1.25; }
.doc p, .doc li { color: var(--ink-2); margin-top: 14px; }
.doc ul { padding-left: 1.2em; margin: 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .pending { color: var(--accent-ink); background: var(--accent); padding: 0 6px; font-weight: 600; }
.doc .table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line-strong); }
.doc table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; background: var(--panel); }
.doc tr:last-child td { border-bottom: 0; }
.doc code { font-size: 0.875em; color: var(--ink); }
.doc .actions { margin-top: 24px; }

/* ------------------------------------------------------------ 404 */

.lost { padding-block: clamp(56px, 10vw, 140px); }
.lost__grid { display: grid; gap: clamp(32px, 6vw, 72px); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .lost__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.lost h1 { margin-top: 16px; font-size: var(--fs-h1); letter-spacing: -0.02em; line-height: 1.05; }
.lost p { margin-top: 20px; color: var(--ink-2); max-width: 34rem; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lost__links { margin: 32px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.lost__links a { color: var(--ink-2); }
.lost__plan { border: 1px solid var(--line-strong); aspect-ratio: 4 / 3; }
.lost__plan svg { width: 100%; height: 100%; }
.lost__plan .l { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.lost__plan .m { stroke: var(--muted); stroke-width: 1; fill: none; stroke-dasharray: 4 6; }
.lost__plan .a { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.lost__plan text { fill: var(--muted); font-family: "Archivo", sans-serif; font-size: 11px; font-stretch: 125%; letter-spacing: 0.09em; }

/* ------------------------------------------------------------ Service pages (SEO) */

.svc { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 10vw, 120px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); }

.svc-hero { padding-block: clamp(32px, 6vw, 72px) clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.svc-hero h1 { max-width: 18ch; font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem); font-stretch: 112%; letter-spacing: -0.025em; line-height: 1.02; }
.svc-hero .lede { max-width: 40rem; margin-top: 24px; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-2); }
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

.svc-block { display: grid; gap: 24px clamp(32px, 6vw, 96px); grid-template-columns: minmax(0, 1fr); padding-block: clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  .svc-block { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .svc-block > header { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
}
.svc-block h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); letter-spacing: -0.015em; line-height: 1.12; }
.svc-block header p { margin-top: 16px; color: var(--ink-2); max-width: 30rem; }
.svc-block .prose p { color: var(--ink-2); max-width: 42rem; }
.svc-block .prose p + p { margin-top: 16px; }
.svc-block .prose strong { color: var(--ink); font-weight: 600; }

.specs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); counter-reset: spec; }
.specs li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0 16px; padding-block: 22px; border-bottom: 1px solid var(--line); counter-increment: spec; }
.specs li::before { content: counter(spec, decimal-leading-zero); grid-row: span 2; font-size: var(--fs-note); font-stretch: 125%; font-weight: 600; letter-spacing: 0.09em; color: var(--accent); padding-top: 0.35em; }
.specs h3 { font-size: 1.125rem; font-weight: 560; font-stretch: 104%; line-height: 1.3; margin: 0; }
.specs p { margin-top: 6px; color: var(--ink-2); }

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 20px; cursor: pointer; list-style: none; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.0625rem; font-weight: 560; line-height: 1.4; }
.faq summary::after { content: "+"; flex: none; font-size: 1.25rem; line-height: 1; color: var(--accent); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -4px 0 0; padding-bottom: 22px; color: var(--ink-2); max-width: 42rem; }

.svc-cta { display: grid; gap: 20px; align-items: end; margin-top: clamp(48px, 7vw, 96px); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--line-strong); background: var(--panel); }
@media (min-width: 900px) { .svc-cta { grid-template-columns: minmax(0, 1fr) auto; } }
.svc-cta h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); letter-spacing: -0.015em; line-height: 1.15; }
.svc-cta p { margin-top: 12px; color: var(--ink-2); max-width: 36rem; }
.svc-cta .svc-actions { margin-top: 0; }

.related { margin-top: clamp(48px, 7vw, 80px); }
.related ul { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } .related li + li { border-left: 1px solid var(--line); } }
.related li { border-bottom: 1px solid var(--line); }
.related a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 20px 22px 0; text-decoration: none; }
@media (min-width: 760px) { .related li + li a { padding-left: 20px; } }
.related a strong { font-weight: 560; font-size: 1.0625rem; }
.related a span { color: var(--muted); font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) { .related a:hover strong { color: var(--accent); } }

/* ------------------------------------------------------------ Footer */

.site-footer { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-links button { color: var(--ink-2); }
.linklike { appearance: none; border: 0; background: none; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
