/* vaiev.com page layout. Loaded after the design-system tokens and components; layout only.
   Starts from design-system/example/index.html; its inline styles live here because the edge CSP forbids inline CSS. */

/* Skip link: hidden until focused (components.css only provides .vv-sr-only). */
.skip-link:focus-visible {
  position: fixed; z-index: 100; top: var(--vv-space-2); left: var(--vv-space-2);
  width: auto; height: auto; clip: auto; overflow: visible; white-space: normal;
  padding: var(--vv-space-3) var(--vv-space-5); border-radius: 999px;
  background: var(--vv-color-surface-container-highest); color: var(--vv-color-on-surface);
}

/* Landing: one stage holding the compact header pill, symbol and claim, and the footer. */
.landing__stage {
  --landing-margin: var(--vv-space-2);
  /* The stage is always dark (spec 9.2): every light-dark() token inside it (muted text, footer, focus ring) resolves to its
     dark value in both schemes. */
  color-scheme: dark;
  margin: var(--landing-margin); min-height: calc(100svh - 2 * var(--landing-margin));
  display: grid; grid-template-rows: auto 1fr auto;
  /* Neutral top glow (spec 7.1): glass on pure black shows nothing, the lift makes the pill's edge readable. No colour. */
  background: radial-gradient(60% 140px at 50% 0, #191B22, transparent), var(--vv-color-stage);
}

/* Header (spec 8.1): the same compact pill on both pages, wordmark left, GitHub right; fixed widths, set statically. */
.nav--compact .vv-nav__bar { max-width: 300px; }
/* Product link (founder 2026-10-20): sidged.com as a text pill between the wordmark and GitHub; 48 px touch target. */
.nav__product { display: inline-flex; align-items: center; min-height: var(--vv-touch-target); padding: 0 var(--vv-space-4);
  margin-left: auto; border-radius: var(--vv-shape-full); position: relative;
  font: 500 var(--vv-type-label)/1 var(--vv-font-sans); color: var(--vv-color-on-surface-variant); text-decoration: none; }
.nav__product::before { content: ""; position: absolute; inset: 4px 0; border-radius: inherit; background: currentColor; opacity: 0;
  transition: opacity var(--vv-motion-short) var(--vv-ease-standard); }
.nav__product:hover::before { opacity: var(--vv-state-hover); }
.nav__product:active::before { opacity: var(--vv-state-pressed); }
.nav--compact .vv-nav__brand { min-width: var(--vv-touch-target); justify-content: center; }
/* Stroke colour = one master's colour: wordmark.svg (#FFFFFF) on the stage and dark, wordmark-ink.svg (#12141A) light. */
.nav__wordmark { display: block; width: 84px; height: 24px; stroke: #12141A; }
.landing .nav__wordmark { stroke: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav__wordmark { stroke: #FFFFFF; } }
[data-theme="dark"] .nav__wordmark { stroke: #FFFFFF; }
/* Legal page (spec 9.1): wider pill read as a breadcrumb «VAIEV / Privacy», 12 px steps, GitHub at the right end.
   The component's left inset stays, so the wordmark sits where it sits on the landing pill. */
.nav--page .vv-nav__bar { max-width: 400px; gap: var(--vv-space-3); }
.nav--page .nav__product { margin-left: 0; }
.nav__page { display: flex; align-items: center; gap: var(--vv-space-3); margin-right: auto;
  font: 500 var(--vv-type-label)/1 var(--vv-font-sans); color: var(--vv-color-on-surface-variant); white-space: nowrap; }
.nav__sep { font-weight: 400; }

/* Hero (spec 8.2): the symbol alone, the claim as h1. Height cap keeps 640 x 360 inside the stage. */
.hero { --hero-mark: min(64vw, 320px, 45svh); display: grid; place-items: center; }
.hero__inner { display: grid; justify-items: center; gap: calc(var(--hero-mark) / 5); padding: var(--vv-space-12) var(--vv-space-4); text-align: center; position: relative; z-index: 1; }
.hero__symbol { width: var(--hero-mark); height: auto; }
.hero__claim { color: var(--vv-color-on-stage); margin: 0; }
/* Claim (spec 9.2): two block lines instead of <br>, so text-wrap: balance works per line; the second one quieter. */
.hero__line { display: block; }
.hero__line--2 { font-weight: 400; }

/* Footer (spec 9.4): flat, one centred row, copy · seal · link with equal gaps on both sides of the seal. */
.footer { padding-block: var(--vv-space-6) max(var(--vv-space-8), env(safe-area-inset-bottom)); padding-inline: var(--vv-layout-margin); }
.footer__row { display: flex; justify-content: center; align-items: center; gap: var(--vv-space-4); white-space: nowrap; }
.footer__mark { opacity: 0.75; }
.footer__links { display: flex; }
.footer a { color: var(--vv-color-on-surface-variant); }
/* Footer links are small text: keep the touch target at 48 px. */
.footer__links a { display: inline-flex; align-items: center; min-height: 48px; }

/* Landing intro (spec 7.4, 8.3): plays once, CSS only. Fill mode "backwards" only, so nothing stays applied afterwards
   (no lasting clip-path on the pill's shadow or focus rings). Strokes are drawn with pathLength="1"; the gap (2) is
   longer than the path, so the hidden part has no zero-length dash and shows no round-cap dot. */
.mark { stroke-dasharray: 1 2; }
@keyframes intro-bar { from { clip-path: inset(0 calc(50% - 32px) round 999px); } to { clip-path: inset(0 round 999px); } }
@keyframes intro-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.landing .nav--compact .vv-nav__bar { animation: intro-bar 400ms var(--vv-ease-spring) 0ms backwards; }
.landing .nav__wordmark .mark { animation: intro-draw 300ms var(--vv-ease-decelerate) 150ms backwards; }
.landing .nav__wordmark .mark--a { animation-delay: 230ms; }
.landing .nav__wordmark .mark--i { animation-delay: 310ms; }
.landing .nav__wordmark .mark--e { animation-delay: 390ms; }
.landing .nav__wordmark .mark--v2 { animation-delay: 470ms; }
.landing .nav--compact :is(.vv-icon-btn svg, .nav__product) { animation: intro-fade 150ms var(--vv-ease-standard) 400ms backwards; }
.landing .hero__symbol .mark--first { animation: intro-draw 450ms var(--vv-ease-decelerate) 300ms backwards; }
.landing .hero__symbol .mark--second { animation: intro-draw 550ms var(--vv-ease-decelerate) 450ms backwards; }
.landing .hero__line { animation: intro-rise 400ms var(--vv-ease-decelerate) 850ms backwards; }
.landing .hero__line--2 { animation-delay: 970ms; }
/* No intro under reduced motion (the component CSS only shortens durations and keeps delays) and none when the page
   arrives through the cross-page morph (html.vt-arrived, set by assets/js/intro.js): the final state shows at once. */
.vt-arrived .landing :is(.nav--compact .vv-nav__bar, .nav__wordmark .mark, .nav--compact .vv-icon-btn svg, .nav__product, .hero__symbol .mark, .hero__line) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .landing :is(.nav--compact .vv-nav__bar, .nav__wordmark .mark, .nav--compact .vv-icon-btn svg, .nav__product, .hero__symbol .mark, .hero__line) { animation: none; }
}

/* Cross-page morph (spec 8.4): cross-document view transitions, progressive enhancement, off under reduced motion.
   The pill opens from the centre (220 -> 320 px) or closes; its snapshots are not stretched, the group clips them round. */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
.vv-nav__bar { view-transition-name: vt-nav; }
.nav__wordmark { view-transition-name: vt-wordmark; }
.vv-nav .vv-icon-btn { view-transition-name: vt-github; }
.nav__product { view-transition-name: vt-product; }
.nav__page { view-transition-name: vt-page; }
::view-transition-group(vt-nav), ::view-transition-group(vt-wordmark), ::view-transition-group(vt-github), ::view-transition-group(vt-product) {
  animation-duration: 400ms; animation-timing-function: var(--vv-ease-spring);
}
::view-transition-group(vt-nav) { border-radius: 999px; overflow: clip; }
::view-transition-old(vt-nav), ::view-transition-new(vt-nav) { height: 100%; object-fit: none; }
::view-transition-new(vt-page) { animation: intro-fade 150ms var(--vv-ease-standard) 150ms backwards; }
::view-transition-old(vt-page) { animation: vt-fade-out 150ms var(--vv-ease-standard) both; }
::view-transition-old(root) { animation: vt-fade-out 150ms var(--vv-ease-standard) both; }
::view-transition-new(root) { animation: intro-rise 250ms var(--vv-ease-decelerate) both; }

.lockup-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup-light { display: none; }
  :root:not([data-theme="light"]) .lockup-dark { display: block; }
}
[data-theme="dark"] .lockup-light { display: none; }
[data-theme="dark"] .lockup-dark { display: block; }

/* Text page: imprint and privacy (spec 9.5): quiet body text, full-contrast headings, «In short» as a flat tonal card. */
.page { padding-block: var(--vv-space-10) var(--vv-space-16); }
.prose { display: grid; gap: var(--vv-space-4); max-width: 42em; color: var(--vv-color-on-surface-variant); }
.prose :is(h1, h2) { color: var(--vv-color-on-surface); }
.prose h1 { margin-bottom: var(--vv-space-4); }
.prose h2 { margin-top: var(--vv-space-8); }
.prose ul { display: grid; gap: var(--vv-space-2); padding-left: 1.25em; }
.prose a { color: var(--vv-color-primary); text-underline-offset: 0.22em; }
.prose__card { display: grid; gap: var(--vv-space-4); margin-top: var(--vv-space-8); padding: var(--vv-space-6);
  border-radius: var(--vv-shape-md); background: var(--vv-color-surface-container-low); }
.prose__card h2 { margin-top: 0; }

@media (min-width: 840px) {
  .landing__stage { --landing-margin: var(--vv-space-3); }
  .page { padding-top: var(--vv-space-16); }
}
