@import url("fonts/fonts.css");

/* ============================================================================
   LENA KRAUSS · Personal brand — design system build
   Direction: Editorial (Monocle / FT magazine) — paper + ink, serif display,
   hairline borders, no shadows, one athletic accent.

   Token names are the canonical build contract:
     --color-bg  --color-surface  --color-text  --color-muted  --color-accent
     --font-sans  --font-display  --radius-card  --spacing-section
   Never introduce a raw hex value outside this :root block. Contrast fixes are
   made here, never as one-off overrides inside components.
   ==========================================================================*/

:root {
  /* ---- colour ----------------------------------------------------------
     Contrast notes (WCAG 2.1, sRGB):
       --color-text  on --color-bg ............... 17.1:1  (AAA)
       --color-muted on --color-bg ...............  6.2:1  (AA)
       --color-on-accent on --color-accent .......  6.1:1  (AA)
       --color-accent on --color-bg ..............  5.7:1  (AA)
       --color-error on --color-bg ...............  5.8:1  (AA)
       --color-success on --color-bg .............  5.3:1  (AA)
       --color-border-strong (control boundaries).  3.6:1  (AA non-text) */
  --color-bg:             oklch(98% 0.004 95);   /* page — warm paper */
  --color-surface:        oklch(100% 0 0);       /* cards, modals, inputs */
  --color-surface-raised: oklch(97% 0.004 95);   /* inset panels */
  --color-text:           oklch(20% 0.018 70);   /* ink */
  --color-muted:          oklch(48% 0.012 70);   /* captions, secondary */
  --color-border:         oklch(90% 0.006 95);   /* decorative hairlines */
  --color-border-strong:  oklch(62% 0.010 70);   /* interactive boundaries */
  --color-accent:         oklch(52% 0.19 30);    /* signal vermilion */
  --color-accent-hover:   oklch(46% 0.19 30);
  --color-on-accent:      oklch(100% 0 0);
  --color-accent-soft:    color-mix(in oklch, var(--color-accent) 11%, var(--color-bg));
  --color-hover:          oklch(95.5% 0.005 95); /* row / nav hover surface */
  --color-focus:          oklch(52% 0.19 30);    /* focus ring */
  --color-success:        oklch(50% 0.13 150);
  --color-success-soft:   color-mix(in oklch, var(--color-success) 12%, var(--color-bg));
  --color-error:          oklch(52% 0.20 27);
  --color-error-soft:     color-mix(in oklch, var(--color-error) 12%, var(--color-bg));

  /* ---- type -----------------------------------------------------------
     Self-hosted only. Sil Open Font License 1.1 — see index.html.
     Files live in /fonts; fallbacks below render until they are dropped in. */
  --font-display: "Bodoni Moda", "Playfair Display", "Times New Roman", Georgia, serif;
  --font-sans:    "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(40px, 7.4vw, 92px);
  --fs-h1:      clamp(34px, 5vw, 60px);
  --fs-h2:      clamp(27px, 3.4vw, 42px);
  --fs-h3:      21px;
  --fs-lead:    19px;
  --fs-body:    16px;
  --fs-ui:      15px;
  --fs-meta:    12px;

  /* ---- shape ---------------------------------------------------------- */
  --radius-card:    0px;   /* editorial: no rounded cards — borders do the work */
  --radius-control: 2px;
  --radius-pill:    999px;

  /* ---- space ---------------------------------------------------------- */
  --space-2xs: 4px;
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  20px;
  --space-lg:  32px;
  --space-xl:  56px;
  --space-2xl: 88px;
  --spacing-section: clamp(64px, 9vw, 132px);

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 68ch;

  /* ---- motion --------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
}

/* ============================================================================
   Reset & base
   ==========================================================================*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
p { text-wrap: pretty; margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

/* Keyboard focus — visible on every interactive element, never colour-only */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}
/* Never remove the ring; only hide it for pointer users */
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 100;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 10px 16px;
  font-size: var(--fs-ui);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-md); }

.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;
}

/* ============================================================================
   Layout primitives
   ==========================================================================*/
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 760px; }
.section { padding-block: var(--spacing-section); }
.section--tight { padding-block: calc(var(--spacing-section) * 0.6); }
.section + .section { border-top: 1px solid var(--color-border); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--space-md); }
.row { display: flex; align-items: center; gap: var(--space-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-xl); align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-xl); align-items: start; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.divider { border-top: 1px solid var(--color-border); }

/* ============================================================================
   Type
   ==========================================================================*/
.display, .h1, h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.display { font-size: var(--fs-display); letter-spacing: -0.02em; }
.h2, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.005em;
}
.h3, h3 { font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; }
.h4, h4 { font-weight: 600; font-size: 17px; line-height: 1.35; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--color-muted); max-width: 58ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow--fc { color: var(--color-text); }
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--color-muted); letter-spacing: 0.02em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.prose p { margin-top: var(--space-md); max-width: var(--measure); }
.prose p:first-child { margin-top: 0; }
.prose h2 { margin-top: var(--space-xl); }
.prose h3 { margin-top: var(--space-lg); }
.hyphenate { hyphens: auto; overflow-wrap: break-word; }

/* Text link with underline that survives long German words */
.tlink {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  overflow-wrap: break-word;
}
.tlink:hover { text-decoration-color: var(--color-text); }
.tlink--accent { color: var(--color-accent); text-decoration-color: color-mix(in oklch, var(--color-accent) 40%, transparent); }
.tlink--accent:hover { text-decoration-color: var(--color-accent); }

/* ============================================================================
   Site chrome — header, nav, language switcher
   ==========================================================================*/
.skip-anchor { display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklch, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 66px;
}
.brand { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.brand__tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--color-muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: var(--space-lg); }
.nav__link {
  position: relative;
  font-size: var(--fs-ui);
  color: var(--color-muted);
  padding-block: 6px;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { color: var(--color-text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--color-text); font-weight: 600; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.lang { display: inline-flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-control); overflow: hidden; }
.lang__btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  color: var(--color-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lang__btn + .lang__btn { border-left: 1px solid var(--color-border-strong); }
.lang__btn:hover { background: var(--color-hover); color: var(--color-text); }
.lang__btn[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); }

.nav-toggle { display: none; align-items: center; gap: 8px; font-size: var(--fs-ui); color: var(--color-text); }
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle__bars span { height: 1.5px; background: currentColor; }

@media (max-width: 860px) {
  .nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch;
         gap: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border);
         padding: var(--space-sm) var(--gutter) var(--space-lg); transform: translateY(-8px);
         opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding-block: 14px; font-size: 18px; border-bottom: 1px solid var(--color-border); }
  .nav__link::after { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ============================================================================
   Buttons
   ==========================================================================*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: 0.005em;
  text-align: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; transform: none; }

.btn--primary { background: var(--color-accent); color: var(--color-on-accent); border-color: var(--color-accent); }
.btn--primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn--primary:disabled { background: color-mix(in oklch, var(--color-accent) 38%, var(--color-bg)); border-color: transparent; color: color-mix(in oklch, var(--color-bg) 82%, var(--color-accent)); }

.btn--secondary { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn--secondary:hover { background: var(--color-text); color: var(--color-bg); }

.btn--ghost { background: transparent; color: var(--color-text); border-color: transparent; padding-inline: 0; min-height: 44px; }
.btn--ghost:hover { color: var(--color-accent); }
.btn--ghost:disabled { color: var(--color-muted); }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }

.btn-arrow::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-arrow--back::before { content: "\2190"; margin-right: 2px; }

/* ============================================================================
   Surfaces
   ==========================================================================*/
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-lg); }
.card--inset { background: var(--color-surface-raised); }
.card-flat { background: transparent; border: 0; padding: 0; }
.card-rule { border-top: 1px solid var(--color-text); padding-top: var(--space-md); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ============================================================================
   Image scaffolding & real images
   ==========================================================================*/
.ph-img {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklch, var(--color-text) 5%, transparent) 0 12px,
      transparent 12px 24px),
    var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-md);
  text-align: center;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
}
.ph-img__ratio { color: var(--color-text); font-size: 12px; }
.ph-img__note { max-width: 30ch; line-height: 1.5; text-transform: none; letter-spacing: 0.02em; }
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-tall     { aspect-ratio: 3 / 4; }
.ratio-square   { aspect-ratio: 1 / 1; }
.ratio-landscape{ aspect-ratio: 3 / 2; }
.ratio-wide     { aspect-ratio: 16 / 9; }
.ratio-cinema   { aspect-ratio: 21 / 9; }

.content-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  border-radius: var(--radius-card);
  background: var(--color-surface-raised);
}

/* ============================================================================
   Page hero
   ==========================================================================*/
.page-hero { padding-block: clamp(48px, 7vw, 96px) var(--space-xl); }
.page-hero--home { padding-block: clamp(56px, 9vw, 120px); }
.page-hero__top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; }
.page-hero .lead { margin-top: var(--space-md); }
.breadcrumb { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================================================
   Home — hero split, events teaser
   ==========================================================================*/
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-xl); align-items: end; }
.hero-split__copy .display { max-width: 12ch; }
.hero-cta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-lg); }

/* ============================================================================
   Gallery grid + lightbox
   ==========================================================================*/
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: none;
  transition: border-color var(--dur) var(--ease);
}
.gallery-item .ph-img { border: 0; border-radius: 0; width: 100%; }
.gallery-item:hover { border-color: var(--color-text); }
.gallery-item:hover .ph-img { background-color: var(--color-hover); }
.gallery-item:focus-visible { outline-offset: 3px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: color-mix(in oklch, var(--color-text) 94%, black);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--space-md);
}
.lightbox[hidden] { display: none; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); color: var(--color-bg); }
.lightbox__count { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.08em; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; }
.lightbox__stage .ph-img {
  border-color: color-mix(in oklch, var(--color-bg) 30%, transparent);
  background: color-mix(in oklch, var(--color-bg) 8%, transparent);
  color: color-mix(in oklch, var(--color-bg) 72%, transparent);
  max-height: 72vh;
  width: min(90vw, 760px);
}
.lightbox__stage .ph-img .ph-img__ratio { color: var(--color-bg); }
.lightbox__caption { color: color-mix(in oklch, var(--color-bg) 78%, transparent); text-align: center; }
.lightbox__controls { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); }
.lb-btn {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in oklch, var(--color-bg) 40%, transparent);
  border-radius: var(--radius-control);
  color: var(--color-bg);
  font-size: 18px;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lb-btn:hover { background: color-mix(in oklch, var(--color-bg) 16%, transparent); border-color: var(--color-bg); }
.lb-btn:focus-visible { outline: 2px solid var(--color-bg); outline-offset: 2px; }
.lb-btn--close { margin-left: auto; }
body.lb-open { overflow: hidden; }

/* ============================================================================
   Services
   ==========================================================================*/
.service-category { padding-block: var(--spacing-section); border-top: 1px solid var(--color-border); }
.service-category:first-of-type { border-top: 0; }
.category-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-xl); align-items: end; margin-bottom: var(--space-lg); }
.category-media { margin-bottom: var(--space-xl); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--color-border); }
.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding-inline: var(--space-lg);
}
.service-grid .service-card:first-child { padding-left: 0; }
.service-grid .service-card:nth-child(3n) { border-right: 0; padding-right: 0; }
.service-card__price { font-family: var(--font-mono); font-size: 13px; color: var(--color-text); }
.service-card__desc { color: var(--color-muted); font-size: var(--fs-ui); }
.service-card__foot { margin-top: auto; padding-top: var(--space-sm); }
@media (max-width: 920px) {
  .category-head { grid-template-columns: 1fr; gap: var(--space-md); }
  .service-grid { grid-template-columns: 1fr; }
  .service-card, .service-grid .service-card:first-child { padding-inline: 0; border-right: 0; }
}

/* ============================================================================
   Schedule
   ==========================================================================*/
.event-list { border-top: 1px solid var(--color-text); }
.event {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
  transition: background var(--dur) var(--ease);
}
.event:hover { background: var(--color-hover); }
.event__date { display: flex; flex-direction: column; gap: 2px; }
.event__day { font-family: var(--font-display); font-size: 34px; line-height: 1; font-weight: 600; }
.event__meta { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.event__loc { margin-top: 6px; }
.event__note { margin-top: 6px; color: var(--color-muted); font-size: var(--fs-ui); max-width: 56ch; }
.event__side { text-align: right; }
.event--past { opacity: 0.62; }
@media (max-width: 720px) {
  .event { grid-template-columns: 1fr; gap: var(--space-sm); }
  .event__side { text-align: left; }
}

.empty-state {
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-text);
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.empty-state__mark { color: var(--color-muted); }

/* ============================================================================
   Forms
   ==========================================================================*/
.form { display: grid; gap: var(--space-lg); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 14px; font-weight: 500; }
.field__hint { font-size: var(--fs-meta); color: var(--color-muted); }
.field__req { color: var(--color-accent); }
.input, .textarea, .select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  font-size: var(--fs-ui);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: color-mix(in oklch, var(--color-muted) 78%, var(--color-bg)); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--color-text); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

/* Error is never colour alone: red border + ring + icon + message text */
.field--error .input,
.field--error .textarea { border-color: var(--color-error); }
.field--error .input:focus,
.field--error .textarea:focus { box-shadow: 0 0 0 3px var(--color-error-soft); }
.field__error { display: flex; align-items: flex-start; gap: 6px; color: var(--color-error); font-size: 13px; }
.field__error svg { flex: none; margin-top: 2px; }

.check { display: flex; align-items: flex-start; gap: 10px; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--color-accent); }
.check label { font-size: 14px; line-height: 1.5; }
.field--error .check input { outline: 2px solid var(--color-error); outline-offset: 2px; }

.form-status {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid;
  border-radius: var(--radius-control);
  font-size: 14px;
}
.form-status--success { border-color: var(--color-success); background: var(--color-success-soft); color: var(--color-text); }
.form-status--error { border-color: var(--color-error); background: var(--color-error-soft); color: var(--color-text); }
.form-status svg { flex: none; margin-top: 1px; }

.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in oklch, var(--color-on-accent) 45%, transparent); border-top-color: var(--color-on-accent); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-aside { display: flex; flex-direction: column; gap: var(--space-md); }
.contact-line { display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-border); }
.contact-line__label { font-family: var(--font-mono); font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); }

/* ============================================================================
   Footer
   ==========================================================================*/
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-xl); margin-top: var(--spacing-section); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-lg); }
.site-footer h2, .site-footer .h4 { font-family: var(--font-mono); font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 500; margin-bottom: var(--space-sm); }
.site-footer ul { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { font-size: 14px; color: var(--color-muted); transition: color var(--dur-fast) var(--ease); }
.site-footer a:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--color-border); }
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-lg); } }

/* ============================================================================
   Legal pages — Impressum / Datenschutz
   ==========================================================================*/
.legal-note {
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  padding: var(--space-md) var(--space-lg);
  font-size: 14px;
  line-height: 1.6;
  max-width: var(--measure);
}
.legal-note strong { font-weight: 600; }

.prose ul, .prose ol { margin-top: var(--space-md); max-width: var(--measure); padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--color-muted); }
.prose a {
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease);
  overflow-wrap: break-word;
}
.prose a:hover { text-decoration-color: var(--color-text); }

.legal-dl { margin-top: var(--space-lg); border-top: 1px solid var(--color-text); max-width: var(--measure); }
.legal-dl > div { border-bottom: 1px solid var(--color-border); padding-block: var(--space-md); }
.legal-dl dt { font-family: var(--font-mono); font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); }
.legal-dl dd { margin: 6px 0 0; }
.legal-toc { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); margin-top: var(--space-md); }
.legal-toc a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--color-muted); text-decoration: underline; text-decoration-color: var(--color-border-strong); text-underline-offset: 3px; }
.legal-toc a:hover { color: var(--color-text); text-decoration-color: var(--color-text); }

/* ============================================================================
   Design-system documentation helpers (index.html only)
   ==========================================================================*/
.ds-section { padding-block: var(--space-xl); border-top: 1px solid var(--color-border); }
.ds-section:first-of-type { border-top: 0; }
.ds-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.ds-head h2 { font-size: var(--fs-h2); }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-md); }
.swatch { border: 1px solid var(--color-border); }
.swatch__chip { height: 92px; border-bottom: 1px solid var(--color-border); }
.swatch__body { padding: var(--space-sm) var(--space-md) var(--space-md); display: flex; flex-direction: column; gap: 4px; }
.swatch__name { font-family: var(--font-mono); font-size: 12px; }
.swatch__val { font-family: var(--font-mono); font-size: 11px; color: var(--color-muted); }
.swatch__use { font-size: 12px; color: var(--color-muted); }

.spec { border: 1px solid var(--color-border); padding: var(--space-lg); }
.spec + .spec { border-top: 0; }
.spec__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-md); }
.spec__row { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.spec__row + .spec__row { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px dashed var(--color-border); }
.spec__notes { margin-top: var(--space-md); font-size: 13px; color: var(--color-muted); max-width: 70ch; }

.widths { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.widths > figure { border: 1px solid var(--color-border); padding: var(--space-md); }
.widths figcaption { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); margin-bottom: var(--space-md); }
.mobile-frame { max-width: 390px; }
.mobile-frame .site-header__inner { min-height: 56px; }
@media (max-width: 760px) { .widths { grid-template-columns: 1fr; } }

.ratio-demo { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-md); }
.code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  overflow-x: auto;
  white-space: pre;
  color: var(--color-text);
  border-radius: var(--radius-control);
}
.contrast-table td.num, .contrast-table th.num { text-align: right; }
.badge-pass { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text); }
.badge-pass svg { color: var(--color-success); }

table.ds-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ds-table th, .ds-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.ds-table th { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); font-weight: 500; }
.ds-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap-scroll { overflow-x: auto; }

/* Forced-state previews for the handover spec sheet (index.html only) */
.is-hover.btn--primary { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.is-hover.btn--secondary { background: var(--color-text); color: var(--color-bg); }
.is-hover.btn--ghost { color: var(--color-accent); }
.is-focus { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.is-active { transform: translateY(1px); }
.is-hover.tlink { text-decoration-color: var(--color-text); }
.is-hover.tlink--accent { text-decoration-color: var(--color-accent); }
.is-hover.nav__link { color: var(--color-text); }
.is-hover.nav__link::after { transform: scaleX(1); }
.is-hover.lang__btn { background: var(--color-hover); color: var(--color-text); }
.is-hover.gallery-item { border-color: var(--color-text); }
.input.is-focus, .textarea.is-focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); outline: none; }
.state-caption { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 8px; }
.state-cell { display: flex; flex-direction: column; }

/* ============================================================================
   Reveal (gated: JS only adds .reveal behaviour when motion is allowed)
   ==========================================================================*/
/* Scoped to .js so the content stays visible if JavaScript never runs. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================================
   Responsive collapse
   ==========================================================================*/
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2, .split, .hero-split, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; align-items: stretch; }
}

/* ============================================================================
   Reduced motion — animation becomes an instant state change
   ==========================================================================*/
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn-arrow:hover::after { transform: none; }
}

/* ============================================================================
   Print — legal documents
   ==========================================================================*/
@media print {
  .site-header, .site-footer, .lang, .nav-toggle { display: none; }
  body { font-size: 12pt; background: var(--color-surface); }
  .prose p { max-width: none; }
}
