/* frontend/site/site.css, the public site's foundation: names for the shared tokens, type, buttons,
 * the header, the footer, entrances, page transitions and the shell pages. The site is on the unified
 * look (docs/redesign/unified-ui/PLAN.md, wave 6): every page sets data-look="site", which gives it
 * Onest, the Biser palette in light and dark, the host screens' corners and the kit's capsule, pill
 * and field from frontend/shared/kit.css, and no value here is a literal colour, size, corner or
 * shadow. The home page adds home.css and the envelope adds envelope.css.
 */

:root {
  color-scheme: light;
  --font-body: var(--font-ui);

  /* The names this site's stylesheets read, over the shared tokens. */
  /* One page ground with the home page: its day is --home-day, which is --surface in the light theme, and the dark theme redefines --surface. */
  --bg: var(--surface);
  --bg2: var(--surface-sunken);
  --ink2: var(--ink-muted);
  --muted: color-mix(in srgb, var(--ink-muted) 82%, var(--surface-raised));
  --accent: var(--primary);
  --accent-soft: var(--primary-soft);
  --imgline: color-mix(in srgb, var(--ink) 10%, transparent);
  /* The bar is the home page's band, the page ground at 93 percent behind a blur, and the hairline under it is the shadow colour at 8 percent. */
  --header-glass: color-mix(in srgb, var(--surface) 93%, transparent);
  --header-line: color-mix(in srgb, var(--shadow-color) 8%, transparent);
  /* The home page's type scale for a page's own heading, and for the heading under it, so a page leads with what home leads a section with. */
  --text-4xl: var(--home-fs-clamp-36px-5vw-84px);
  --text-3xl: clamp(2.125rem, 1.4rem + 2.4vw, 3.75rem);
  --menu-bg: var(--surface-raised);
  --menu-hover: var(--kit-wash);

  /* The envelope demo's own paper, which is an invitation and not interface, so it keeps its colours. */
  --paper: #F1E7DB; /* ui-audit: card */
  --paper-deep: #E1D1BF; /* ui-audit: card */
  --paper-flap: #EADCCA; /* ui-audit: card */

  /* Colours that sit on a photograph and so do not change with the theme. */
  --on-photo-soft: color-mix(in srgb, var(--on-photo) 84%, transparent);
  --on-photo-line: color-mix(in srgb, var(--on-photo) 45%, transparent);
  --on-photo-glass: color-mix(in srgb, var(--on-photo) 12%, transparent);

  /* The big soft shadow under a phone or a hero picture. */
  --site-lift: 0 1px 2px color-mix(in srgb, var(--shadow-color) 5%, transparent), 0 50px 90px -45px color-mix(in srgb, var(--shadow-color) 55%, transparent);

  /* Motion. Nothing on the site names a literal curve. */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease-photo: cubic-bezier(.16, 1, .3, 1);
  --dur-press: 160ms;
  --dur-hover: 150ms;
  --dur-ui: 200ms;
  --dur-reveal: 900ms;

  /* The home page's gutters, which are 20px up to a small laptop and then grow with the screen. */
  --gutter: var(--home-gut-l);
  /* The home bar is 8 above and below its 44px brand and a hairline, so subpages stand 61px below it as home does. */
  --header-h: 61px;
  --radius-photo: var(--radius-xs);
}

/* The envelope's paper at night. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #2E2C29; /* ui-audit: card */
    --paper-deep: #242220; /* ui-audit: card */
    --paper-flap: #383532; /* ui-audit: card */
  }
}

:root[data-theme="dark"] {
  --paper: #2E2C29; /* ui-audit: card */
  --paper-deep: #242220; /* ui-audit: card */
  --paper-flap: #383532; /* ui-audit: card */
}

/* The theme swap changes every colour at once, and letting each element's
   own transition run would ripple the page for a moment. */
.theme-switching, .theme-switching * { transition: none !important; }

/* ── Base ──────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* The page itself never scrolls sideways. The body's own clip below is handed
   to the viewport when the root has none, and there it let a face ring drawn
   at 1.6 times before its entrance push the phone home page 19 pixels wide. */
html:has(body.site) { overflow-x: clip; }

body.site {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  /* Home's reading size and rhythm, 17px on 1.5, so a paragraph does not shrink when the visitor leaves the home page. */
  font-size: var(--home-fs-17px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  /* Stefan asked for the public site not to be selectable (27 September
     2026), so a stray drag over a page never highlights its copy. Anything a
     visitor types into stays selectable below. */
  -webkit-user-select: none;
  user-select: none;
}
body.site :is(input, textarea, select, [contenteditable="true"]) {
  -webkit-user-select: text;
  user-select: text;
}

:where(.site) a { color: inherit; text-decoration: none; }
:where(.site) img { display: block; max-width: 100%; }
/* The browser's own default gives every <figure> a 40px inline margin; left
   unreset it shifted each design-tile card-composed 40px right of its grid
   cell, so the last column ran past a narrow viewport (invisibly, since
   overflow-x: clip above hides it) and every row opened with an empty gutter
   the width of that same 40px, found auditing the designs page on a phone. */
:where(.site) figure { margin: 0; }
:where(.site) :is(h1, h2, h3) {
  margin: 0;
  font-family: var(--font-display);
  text-wrap: balance;
}
/* Home sets every heading at 600 and pulls big ones in by 4.5 percent of their size. The kit's own rule for headings is
   800, and the pages that wrote 400 into their own stylesheet set a third weight, so one rule here outranks all of them
   (two classes and an element against the kit's two). */
body.site :is(h1, h2, h3, .display) { font-weight: 600; letter-spacing: -.02em; }
body.site :is(h1, h2) { letter-spacing: -.04em; }
:where(.site) p { margin: 0; text-wrap: pretty; }
:where(.site) button { font: inherit; color: inherit; }
.site :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-xs); }

.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--home-gut-l) var(--home-gut-r);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

.eyebrow {
  font-size: var(--text-2xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display-1 {
  font-size: var(--text-4xl);
  line-height: .98;
  letter-spacing: -.025em;
}

.display-2 {
  font-size: var(--text-3xl);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.lede {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--ink2);
  max-width: 560px;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: 600 16px/1 var(--font-body);
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: scale, background-color, color, box-shadow;
  transition-duration: var(--dur-press);
  transition-timing-function: var(--home-ease);
}
.btn:active { scale: .96; }

/* The two buttons are the home page's: a flat wine capsule that darkens a step on hover, and a ring of the text's own
   colour that takes a grey wash. Both press to .96 and nothing else moves. The kit gives .btn-primary a lit gradient with a
   glow and lifts it on hover; its rules are two classes and, for hover and press, five, so these repeat the same
   :not() chain to outrank them. */
body.site :is(.btn-primary, .btn-secondary) {
  letter-spacing: 0;
  transform: none;
  transition-property: scale, background-color, color, box-shadow;
  transition-duration: var(--dur-press);
  transition-timing-function: var(--home-ease);
}
body.site .btn-primary { background: var(--home-wine); color: var(--home-wine-ink); box-shadow: none; }
body.site .btn-secondary { background: transparent; color: inherit; box-shadow: var(--home-sh-01); }
body.site :is(.btn-primary, .btn-secondary):is(:hover, :active):not(:disabled):not([aria-disabled="true"]) { transform: none; }
body.site .btn-primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--home-c-8d2540); box-shadow: none; }
body.site .btn-secondary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--home-c-rgba-127-127-127-12); }
.btn-light { background: var(--on-photo); color: var(--night); }
.btn-glass { background: var(--on-photo-glass); color: var(--on-photo); box-shadow: inset 0 0 0 1px var(--on-photo-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--chip-line, currentColor);
  -webkit-tap-highlight-color: transparent;
  transition-property: transform, background-color, box-shadow;
  transition-duration: var(--dur-press), var(--dur-hover), var(--dur-hover);
  transition-timing-function: var(--ease-out), ease, ease;
}
.chip:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { background: color-mix(in oklab, currentColor 8%, transparent); }
}

/* The family switch, a question asked in words above the five families, at
   the head of the home page's film and prices and on /pricing/. The options
   sit in one outlined bar with only the chosen one filled, as the approved
   prototype draws it (Stefan, 7 November 2026: "instead of having inside
   circles"). The hero's own switch sits on its photograph and is home.css's. */
.family-switch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.family-switch-label {
  margin: 0;
  color: var(--ink2);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: .01em;
}
.family-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  padding: 5px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 22%, transparent);
}
.family-tab {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: transform, background-color, color;
  transition-duration: var(--dur-press), var(--dur-hover), var(--dur-hover);
  transition-timing-function: var(--ease-out), ease, ease;
}
.family-tab:active { transform: scale(.96); }
.family-tab[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); }
.family-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .family-tab[aria-selected="false"]:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
}
/* On a phone the families fill the width in two rows rather than scroll,
   because a scrolling row hid the last three. A flexible row gave each tab its
   own width, so the two rows broke at different places; six columns give the
   two longest names halves of the first row and the other three thirds of the second. */
@media (max-width: 860px) {
  .family-switch { align-self: stretch; width: 100%; }
  .family-tabs { display: grid; width: 100%; grid-template-columns: repeat(6, 1fr); border-radius: var(--radius-lg); }
  .family-tab { grid-column: span 2; padding-inline: 8px; }
  .family-tab:nth-child(-n+2) { grid-column: span 3; }
}
@media (prefers-reduced-motion: reduce) {
  .family-tab { transition: none; }
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-glass);
  color: var(--ink);
  border-bottom: 1px solid var(--header-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
/* Chips, the language button and the theme button, wear the home language button: a hairline of the text's own colour at
   20 percent, 14px at 500, 36 high. A coarse pointer keeps the 44px floor below. */
:is(.site-header, .site-sheet, .site-footer) { --chip-line: color-mix(in srgb, currentColor 20%, transparent); }
:is(.site-header, .site-sheet, .site-footer) .chip { min-height: 36px; min-width: 36px; padding: 0 13px; font: 500 14px/1 var(--font-body); gap: 8px; }
:is(.site-header, .site-sheet) .site-theme { padding: 0; }
.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}
.site-brand, .site-footer-brand {
  font: 500 24px/1 var(--font-logo);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.site-brand { padding: 10px 16px 10px 0; }
.site-nav { display: none; }
/* Every entry of the bar, the products toggle included, is a home link: 15px at 500 in a 10 by 14 capsule with no
   underline, which takes a grey wash under the pointer. */
.site-nav > a, .site-products-toggle, .site-login {
  font-size: var(--home-fs-15px);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color var(--dur-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .site-nav > a:hover, .site-products-toggle:hover, .site-login:hover { background: var(--menu-hover); }
}
.site-tools { display: flex; align-items: center; gap: 6px; font-size: var(--home-fs-15px); }
.site-tools .site-login, .site-tools .site-start, .site-tools .site-lang, .site-tools .site-theme { display: none; }
/* The start button is the bar's own size on home: 42 high, 20 across, 15px. */
.site-start { min-height: 42px; padding: 0 20px; font-size: var(--home-fs-15px); white-space: nowrap; }

.site-menu-toggle { width: 44px; padding: 0; }
.site-menu-toggle .icon-close, .site-menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.site-menu-toggle[aria-expanded="true"] .icon-close { display: block; animation: menu-in var(--dur-press) var(--ease-out) both; }

@media (min-width: 1280px) {
  /* Home keeps every entry to the right of its brand, so the nav sits beside the tools and not between them and the brand. */
  .site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .site-tools .site-login, .site-tools .site-start { display: inline-flex; }
  .site-tools .site-lang, .site-tools .site-theme { display: inline-flex; }
  .site-menu-toggle { display: none; }
}

/* The language dropdown, in the header on a wide screen and in the menu
   sheet on a phone, and the products dropdown, which only the wide header
   has because the sheet lists the product pages outright. */
.site-lang, .site-products { position: relative; }
.site-lang-list, .site-products-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--home-r-16px);
  background: var(--menu-bg);
  color: var(--ink);
  box-shadow: var(--shadow-lift), 0 0 0 1px var(--line);
  transform-origin: top right;
}
/* The card is 300 wide with rows of 56 (W8-S13), and its corners are the row's radius plus its padding so they stay concentric. */
.site-products-list { right: auto; left: -14px; min-width: 300px; padding: 8px; border-radius: var(--radius-xl); transform-origin: top left; }
.site-products .site-products-list a { min-height: 56px; justify-content: flex-start; gap: 14px; padding-inline: 8px 14px; border-radius: calc(var(--radius-xl) - 8px); }
/* The product's Fluent 3D picture, 40 wide in a 56 row (W8-S13). */
.site-product-pic { width: 40px; height: 40px; flex: none; }
.site-lang-list:not([hidden]), .site-products-list:not([hidden]) { display: flex; flex-direction: column; animation: menu-in var(--dur-press) var(--ease-out) both; }
.site-products-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.site-products-toggle svg { transition: transform var(--dur-press) var(--ease-out); }
.site-products-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-lang-option, .site-products-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--home-r-10px);
  background: transparent;
  font-size: var(--home-fs-15px);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease;
}
/* The chosen language is marked as home marks it, by weight and a wine dot at the row's end. */
.site-lang-option[aria-selected="true"] { font-weight: 600; }
.site-lang-option[aria-selected="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .site-lang-option:hover, .site-products-list a:hover { background: var(--menu-hover); }
}
@keyframes menu-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.site-theme svg { width: 17px; height: 17px; }
.site-theme .icon-sun { display: none; }
:root[data-theme="dark"] .site-theme .icon-sun { display: block; }
:root[data-theme="dark"] .site-theme .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-theme .icon-sun { display: block; }
  :root:not([data-theme="light"]) .site-theme .icon-moon { display: none; }
}

/* The phone menu is a sheet that drops from under the bar. */
.site-sheet {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 49;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) 28px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--header-line), 0 30px 60px -30px color-mix(in srgb, var(--shadow-color) 35%, transparent);
}
.site-sheet:not([hidden]) { animation: sheet-in 320ms var(--ease-drawer) both; }
/* The page holds still under the open sheet; a swipe over it scrolled the page
   behind, which showed through the strip below the sheet (2 October 2026). */
html.is-sheet-open { overflow: hidden; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.site-sheet nav { display: flex; flex-direction: column; }
.site-sheet nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.site-sheet nav a.site-sheet-product { gap: 14px; }
.site-sheet-tools { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
/* Opens upward over the menu's own rows: opened downward it ran past the sheet's bottom edge, which clips it, and the last five languages were out of reach (29 November 2026). */
.site-sheet-tools .site-lang-list { top: auto; bottom: calc(100% + 8px); right: auto; left: 0; transform-origin: bottom left; }
.site-sheet-actions { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 1280px) {
  .site-sheet { display: none !important; }
}

/* Pages without a photograph under the header start below it. */
.site main { display: block; }
.site-page-hero { padding-top: calc(var(--header-h) + clamp(56px, 7vw, 96px)); }

/* ── Footer ────────────────────────────────────────────────────────────── */

/* The home page's footer, which is night in both themes: the brand and its line, the six links, and the address with the
   language button, in three columns that stack below 800px. */
.site-footer {
  background: var(--home-night);
  color: var(--home-c-f3f1e8);
  border-top: 1px solid var(--home-c-rgba-243-241-232-14);
  font-size: var(--home-fs-15px);
}
.site-footer .site-footer-bar {
  display: grid;
  grid-template-columns: 1.2fr 2fr auto;
  gap: 28px 48px;
  align-items: start;
  padding: 44px var(--home-gut-r) calc(env(safe-area-inset-bottom, 0px) + 40px) var(--home-gut-l);
}
.site-footer a { color: inherit; }
@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
}
.site-footer-mark p { margin-top: 10px; max-width: 28ch; opacity: .7; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; padding: 0; list-style: none; }
.site-footer-links a { display: inline-block; padding: 6px 0; }
.site-footer-end { display: grid; gap: 12px; justify-items: end; }
/* The footer's language list opens upward, as home's does, because nothing lies below it. */
.site-footer .site-lang-list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; }
@media (max-width: 800px) {
  .site-footer .site-footer-bar { grid-template-columns: 1fr; }
  .site-footer-end { justify-items: start; }
  .site-footer .site-lang-list { right: auto; left: 0; transform-origin: bottom left; }
}

/* ── Entrances ─────────────────────────────────────────────────────────── */
/* An entrance plays once, when motion.js first sees the section, and never
   again. The hidden state is set only where a script will lift it, so a page
   read without scripts shows everything. Pieces of one section stagger by
   about a tenth of a second, which motion.js writes as --i. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal:not(:has(.reveal-item)), .reveal .reveal-item {
    opacity: 0;
    transform: translateY(26px);
  }
  .reveal.is-revealed:not(:has(.reveal-item)), .reveal.is-revealed .reveal-item {
    opacity: 1;
    transform: none;
    transition-property: opacity, transform;
    transition-duration: var(--dur-reveal);
    transition-timing-function: var(--ease-photo);
    transition-delay: calc(var(--i, 0) * 100ms);
  }
}

/* ── Shell pages ───────────────────────────────────────────────────────── */

.site-page-hero { padding-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.site-page-hero h1 {
  max-width: 16ch;
  font-size: var(--text-4xl);
  line-height: 1;
  letter-spacing: -.022em;
  /* German and Russian legal titles are one long word that is wider than a phone, so fit.js takes the size down until the word fits, and it is never broken inside itself. */
  hyphens: manual;
  overflow-wrap: normal;
}
.site-page-hero .subline {
  margin-top: 22px;
  max-width: 620px;
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--ink2);
}

.site-product { padding-block: clamp(56px, 9vw, 130px); }
.site-product .wrap { display: grid; gap: 36px; align-items: center; }
.site-product h2 { font-size: var(--text-2xl); line-height: 1.04; letter-spacing: -.02em; }
.site-product p { margin-top: 18px; font-size: var(--text-base); line-height: 1.75; color: var(--ink2); max-width: 540px; }
.site-product .eyebrow { display: block; margin-bottom: 18px; }
.site-product .media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-photo);
  outline: 1px solid var(--imgline);
  outline-offset: -1px;
}
.site-product .media img { width: 100%; height: 100%; object-fit: cover; }
.site-product + .site-product { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .site-product .wrap { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 26px; }
  .site-product .wrap > :first-child { grid-column: 1 / span 6; }
  .site-product .media { grid-column: 8 / span 5; }
  .site-product.is-reversed .wrap > :first-child { grid-column: 7 / span 6; grid-row: 1; }
  .site-product.is-reversed .media { grid-column: 1 / span 5; grid-row: 1; }
}

.site-founder { padding-block: clamp(56px, 8vw, 110px); background: var(--bg2); }
.site-founder h2 { font-size: var(--text-2xl); line-height: 1.05; margin-bottom: 22px; }
.site-founder p { max-width: 640px; font-size: var(--text-base); line-height: 1.75; color: var(--ink2); }

.site-closing { padding-block: clamp(64px, 10vw, 140px); text-align: center; }
.site-closing h2 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: var(--text-3xl);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.site-closing .actions { justify-content: center; margin-top: 32px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.site-404 { padding-top: calc(var(--header-h) + clamp(64px, 12vw, 160px)); padding-bottom: clamp(80px, 12vw, 160px); }
.site-404 h1 { font-size: var(--text-4xl); line-height: .98; letter-spacing: -.025em; max-width: 14ch; }
.site-404 .subline { margin-top: 22px; max-width: 540px; font-size: var(--text-md); line-height: 1.7; color: var(--ink2); }
.site-404 .actions { margin-top: 32px; }

/* The accordion every FAQ uses. An answer opens by its row growing from 0fr
   to 1fr, so it slides open at its own height with no measuring. */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 64px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-question .sign {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  /* The plus in the markup is only for a reader without the stylesheet; the two bars below draw it. It is set at no size rather than clipped out of an 18px box, so nothing in the box overflows. */
  font-size: 0;
  line-height: 0;
  transition: transform var(--dur-ui) var(--ease-out);
}
.faq-question .sign::before, .faq-question .sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  border-radius: var(--radius-hair);
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-question .sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .sign { transform: rotate(45deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease-out);
}
.faq-answer > * {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-out);
}
/* The space under an answer belongs to an open answer only: in the collapsed
   row padding cannot shrink, and 22 pixels of it sat under every closed
   question, setting each one off centre in its row. */
.faq-answer p { padding: 0 60px 0 0; font-size: var(--text-sm); line-height: 1.75; color: var(--ink2); transition: padding-bottom 280ms var(--ease-out); }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-item.is-open .faq-answer > * { opacity: 1; }
.faq-item.is-open .faq-answer p { padding-bottom: 22px; }
@media (max-width: 599px) {
  .faq-answer p { padding-right: 0; }
}

.site-faq { padding-block: clamp(40px, 6vw, 80px); }
.site-faq .wrap { max-width: 980px; }
.site-faq .wrap > .faq-item:first-child,
.site-faq .faq-group + .faq-item { border-top: 1px solid var(--line); }
.faq-group { margin: clamp(40px, 5vw, 64px) 0 14px; font-size: var(--text-xl); line-height: 1.1; }
.faq-group:first-child { margin-top: 0; }

/* Contact. */
.site-contact { padding-block: clamp(48px, 7vw, 100px); }
.contact-card {
  max-width: 640px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--line);
}
.contact-card h2 { font-size: var(--text-2xl); line-height: 1.05; }
.contact-card > p { margin-top: 14px; color: var(--ink2); line-height: 1.7; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-copy { min-height: 36px; padding: 0 14px; font-size: var(--text-sm); }
.contact-line:first-of-type { margin-top: 22px; }
.contact-label { min-width: 110px; font-weight: 600; }
.contact-note { max-width: 640px; margin-top: 20px; font-size: var(--text-sm); color: var(--muted); }

/* Privacy, terms and cookies read as a document at a comfortable measure. */
.site-legal { padding-block: clamp(40px, 6vw, 80px); }
.site-legal .wrap { max-width: 820px; }
.site-legal h2 { margin-top: 48px; margin-bottom: 14px; font-size: var(--text-xl); line-height: 1.1; }
.site-legal p, .site-legal li { font-size: var(--text-base); line-height: 1.8; color: var(--ink2); }
.site-legal p + p { margin-top: 14px; }
.legal-list { margin: 14px 0 0; padding-left: 1.2em; }
.legal-list li + li { margin-top: 8px; }
.legal-review-banner {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--text-sm);
}
.legal-review-banner p { color: var(--ink); }
.legal-controller h2 { margin-top: 32px; }
.cookie-table-scroll { margin-top: 18px; overflow-x: auto; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line); }
.cookie-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--text-sm); }
.cookie-table th, .cookie-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.cookie-table thead th { background: var(--bg2); font-weight: 600; }
.cookie-table tbody th { font-weight: 600; white-space: nowrap; }
.cookie-table tr:last-child > * { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .faq-answer, .faq-answer > *, .faq-question .sign { transition: none; }
}

/* ── On a phone ────────────────────────────────────────────────────────── */
/* A phone is read at arm's length and steered with a thumb, so below 700
   pixels no text is smaller than 14 pixels, copy meant to be read is 16, and
   every control is at least 44 pixels each way. The sizes above are the
   prototype's desktop ones and stay as they are. */
@media (max-width: 699px) {
  .eyebrow { font-size: var(--text-sm); letter-spacing: .14em; }
  .chip { font-size: var(--text-sm); }
  .site-brand, .site-footer-brand { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer-links a, .site-footer-end > a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-block: 0; }
  .faq-answer p { font-size: var(--text-base); }
  /* A four column table needs 560 pixels, so on a phone each row becomes a
     card, its name on top and every value under the column's own name,
     rather than a table the visitor has to drag sideways. */
  .cookie-table-scroll { overflow: visible; border-radius: 0; box-shadow: none; }
  .cookie-table, .cookie-table tbody, .cookie-table tr, .cookie-table th, .cookie-table td { display: block; }
  .cookie-table { min-width: 0; font-size: var(--text-base); }
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cookie-table tr { padding: 16px 18px; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line); }
  .cookie-table tr + tr { margin-top: 10px; }
  .cookie-table tbody th, .cookie-table td { padding: 4px 0; border-bottom: 0; white-space: normal; }
  .cookie-table tbody th { font-size: var(--text-md); }
  .cookie-table td::before { content: attr(data-label); display: block; font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
}

/* A phone or a tablet showing the desktop layout is still steered with a
   thumb, so the links it reaches keep the 44 pixel floor wherever the
   pointer is coarse, whatever the width. The text keeps its desktop size,
   because the header's links only just fit its row at 1280 pixels. */
@media (hover: none) and (pointer: coarse) {
  .site-brand, .site-footer-brand { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer-links a { min-width: 44px; }
  .site-nav > a, .site-products-toggle { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  :is(.site-header, .site-sheet, .site-footer) .chip { min-height: 44px; min-width: 44px; }
}

/* ── The action bar ────────────────────────────────────────────────────── */
/* Most visitors arrive on a phone, where the hero's buttons are gone after
   the first swipe. The bar brings the page's one action back at the foot of
   the screen, slides away over the page's own closing call and the footer,
   and stands clear of the home indicator. site.js decides when it shows. */
.action-bar { display: none; }
@media (max-width: 699px) {
  .action-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* 16 from the sides and 12 above the safe area, so the capsule is 358 wide on a 390 screen (W8-S13). */
    padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--header-glass);
    box-shadow: 0 -1px 0 var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    transform: translateY(calc(100% + 2px));
    transition: transform 320ms var(--ease-drawer);
  }
  .action-bar.is-shown { transform: none; }
  .action-bar__button { min-height: 56px; }
  .action-bar__note { font-size: var(--text-sm); line-height: 1.35; text-align: center; color: var(--ink2); }
  /* The page ends the bar's height lower, so nothing is ever left under it,
     and a link or a focused field scrolls to above it. */
  body.site:has(.action-bar) .site-footer .site-footer-bar { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  html:has(.action-bar) { scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .action-bar { transition: none; }
}

/* A composed sample card: a bare painted background under a live text
   layer, read in the page's own language instead of painted only in
   Macedonian (Stefan, 27 September 2026, docs/redesign/prototype/README.md).
   Built by site_products.py's _card_figure_html for the designs and printed
   pages and by frontend/site/card-text.js for the home hero and film, both
   reading the same five positions here so the two never drift apart.
   container-type makes each line's cqw font size track the card's own
   rendered width, so one set of rules fits the design grid's small tile, the
   full-size viewer and the envelope's card slot alike. */
.card-composed {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 640 / 900;
  container-type: inline-size;
}
.card-composed__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-composed__text { position: absolute; inset: 0; }
.card-line {
  position: absolute;
  left: 50%;
  width: 82%;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.15;
  /* The card's own background is a painted scene, not a plain paper, so its
     wording carries a soft shadow to stay readable over a busy corner, dark
     ink and light ink alike, never a hard outline. */
  text-shadow: 0 1px 4px color-mix(in srgb, var(--shadow-color) 22%, transparent);
}
