/* &ai Stiftung — Layout & Components (etai-website-2)
   Ernst-von-Siemens-artig: Ruhe, Typo, Foto; dunkles Petrol; Pistazie selten. */

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

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg-lh);
  font-weight: 400;
  color: var(--color-on-surface);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-on-surface);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--duration) var(--ease-out);
}

a:hover {
  color: var(--color-pistachio);
}

:focus-visible {
  outline: 1px solid var(--color-pistachio);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-pistachio);
  color: var(--color-on-secondary);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ---------- Type ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-on-surface);
  margin: 0 0 var(--space-md);
  letter-spacing: var(--text-xl-ls);
}

.page-hero h1 {
  color: #f4f7f8;
  max-width: 18ch;
  font-weight: 500;
}

h1 {
  font-size: var(--text-2xl);
  line-height: var(--text-2xl-lh);
  letter-spacing: var(--text-2xl-ls);
}

h2 {
  font-size: var(--text-xl);
  line-height: var(--text-xl-lh);
}

h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg-lh);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-md);
  line-height: var(--text-md-lh);
}

p {
  margin: 0 0 var(--space-md);
  max-width: 68ch;
}

.lead,
.prose > p:first-of-type {
  font-size: var(--text-body-xl);
  line-height: var(--text-body-xl-lh);
  color: var(--color-on-surface);
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

.page-hero > .label {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: var(--text-label-lg);
  color: var(--color-pistachio);
  font-weight: 500;
}

/* ---------- Shell ---------- */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
}

.container {
  width: min(100% - (var(--margin) * 2), var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - (var(--margin) * 2), var(--content-width));
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(3, 26, 32, 0.88);
  border-bottom: 1px solid var(--color-hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: var(--header-height);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  color: var(--color-on-surface);
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.brand__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

/* Header: as tall as the bar allows, never crop — scale down via max-* only */
.site-header .brand {
  margin-inline-start: 0;
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  height: auto;
  max-height: 100%;
}

.site-header .brand__logo {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--header-height) - 0.25rem);
}

.brand--footer {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow: visible;
}

.brand--footer .brand__logo {
  /* Match header size; max-width:none avoids 0×0 collapse with fit-content parent */
  width: auto;
  height: calc(var(--header-height) - 0.25rem);
  max-width: none;
  max-height: none;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--color-hairline);
  background: transparent;
  color: var(--color-on-surface);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--color-pistachio);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.25rem;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--color-on-surface-variant);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--color-on-surface);
  border-bottom-color: var(--color-pistachio);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.1rem;
  padding: 0 0.6rem;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius);
  color: var(--color-on-surface);
  text-decoration: none;
  font-size: var(--text-label-md);
  font-weight: 700;
  letter-spacing: 0.08em;
  background: transparent;
}

.lang-switch:hover {
  border-color: var(--color-pistachio);
  color: var(--color-pistachio);
}

/* ---------- Main ---------- */
.site-main {
  flex: 1;
  padding-block: 0 var(--space-xl);
}

.site-main > .container {
  padding-block: var(--space-2xl) 0;
}

.site-main.page--home > .container {
  padding-block: 0;
}

/* Full-bleed photo hero (EVS-like image presence) */
.hero-photo {
  position: relative;
  isolation: isolate;
  min-height: clamp(22rem, 62vh, 36rem);
  display: flex;
  align-items: flex-end;
  margin: 0;
  background-color: var(--color-petrol-deep);
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center 42%;
  border-bottom: 0;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      105deg,
      rgba(2, 20, 24, 0.88) 0%,
      rgba(2, 20, 24, 0.62) 45%,
      rgba(2, 20, 24, 0.28) 100%
    ),
    linear-gradient(to top, rgba(2, 20, 24, 0.75) 0%, transparent 42%);
  pointer-events: none;
}

.hero-photo > .hero-photo__inner {
  position: relative;
  z-index: 1;
  width: min(100% - (var(--margin) * 2), var(--max-width));
  margin-inline: auto;
  padding: var(--space-2xl) 0 var(--space-xl);
  animation: rise 700ms var(--ease-out) both;
}

/* Quiet photographer credit — readable on hover/focus, otherwise barely there */
.hero-photo__credit {
  position: absolute;
  z-index: 2;
  right: var(--margin);
  bottom: 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: rgba(244, 247, 248, 0.38);
  text-decoration: none;
}

.hero-photo__credit:hover,
.hero-photo__credit:focus-visible {
  color: rgba(244, 247, 248, 0.38); /* override global a:hover pistachio */
  text-decoration: underline;
  outline: none;
}

.hero-photo .page-hero {
  margin: 0;
  padding: 0;
  border: 0;
}

.hero-photo .page-hero h1 {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  max-width: none;
}

.hero-photo .hero-line {
  display: block;
  color: #f4f7f8;
  white-space: nowrap;
}

.hero-photo .hero-line--accent {
  color: var(--color-pistachio-bright);
}

@media (max-width: 767px) {
  .hero-photo .hero-line {
    white-space: normal;
  }
}

.hero-photo .page-hero::after {
  background: var(--color-pistachio);
  width: 3.5rem;
  opacity: 0.85;
}

.page-hero {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-hairline);
  animation: rise 700ms var(--ease-out) both;
}

.page-hero .label {
  display: inline-block;
  margin-bottom: var(--space-md);
}

.page-hero h1 {
  margin-bottom: var(--space-md);
}

.page-hero p {
  color: rgba(232, 238, 240, 0.88);
  font-size: var(--text-body-xl);
  line-height: var(--text-body-xl-lh);
  max-width: 58ch;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes filament {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Prose ---------- */
.prose {
  animation: rise 800ms var(--ease-out) 80ms both;
  padding-bottom: var(--space-xl);
}

.page--home .prose {
  padding-top: var(--space-xl);
}

/* Name feature — &ai explanation with large circle mark + staff lines */
.name-feature {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  margin: var(--space-md) 0 var(--space-2xl);
  padding: var(--space-xl) var(--space-lg);
  background:
    radial-gradient(ellipse 75% 90% at 12% 50%, rgba(28, 74, 82, 0.65), transparent 72%),
    linear-gradient(180deg, rgba(10, 47, 58, 0.7), rgba(5, 32, 40, 0.4));
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
}

@media (min-width: 768px) {
  .name-feature {
    grid-template-columns: minmax(16rem, 1.05fr) minmax(0, 1fr);
    gap: clamp(var(--space-xl), 5vw, 4rem);
    padding: clamp(var(--space-xl), 5vw, 4.5rem) clamp(var(--space-lg), 4vw, 3rem);
  }
}

.name-feature__mark {
  display: grid;
  grid-template-columns: minmax(3rem, 1fr) auto minmax(3rem, 1fr);
  align-items: center;
  justify-items: stretch;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.name-feature__logo {
  width: clamp(12rem, 34vw, 19rem);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 14px 32px rgba(2, 20, 24, 0.5));
}

.name-feature__staff {
  display: block;
  height: clamp(7rem, 22vw, 11.5rem);
  width: 100%;
  /* Five staff lines, spaced like the lockup */
  background-image:
    linear-gradient(rgba(238, 244, 205, 0.92), rgba(238, 244, 205, 0.92)),
    linear-gradient(rgba(238, 244, 205, 0.92), rgba(238, 244, 205, 0.92)),
    linear-gradient(rgba(238, 244, 205, 0.92), rgba(238, 244, 205, 0.92)),
    linear-gradient(rgba(238, 244, 205, 0.92), rgba(238, 244, 205, 0.92)),
    linear-gradient(rgba(238, 244, 205, 0.92), rgba(238, 244, 205, 0.92));
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position:
    center 8%,
    center 29%,
    center 50%,
    center 71%,
    center 92%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 60%);
  mask-image: linear-gradient(to right, transparent, #000 60%);
}

.name-feature__staff--end {
  -webkit-mask-image: linear-gradient(to left, transparent, #000 60%);
  mask-image: linear-gradient(to left, transparent, #000 60%);
}

.name-feature__body {
  max-width: 34ch;
}

.name-feature__body > p {
  margin: 0;
  max-width: none;
}

.name-feature__kicker {
  font-family: var(--font-body);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  margin-bottom: var(--space-sm);
}

.name-feature__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: #f4f7f8;
  margin: 0 0 var(--space-md);
}

.name-feature__title .amp {
  color: var(--color-pistachio);
}

.name-feature__text {
  font-family: var(--font-body) !important;
  font-size: var(--text-body-lg);
  line-height: var(--text-body-lg-lh);
  font-style: normal !important;
  font-weight: 400;
  color: var(--color-on-surface);
  margin: 0 0 var(--space-md);
}

.name-feature__say {
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm-lh);
  letter-spacing: 0.04em;
  font-style: normal;
  color: var(--color-on-surface-variant);
  margin: 0;
}

.name-feature__say span {
  color: var(--color-on-surface);
  font-weight: 500;
}

/* Let the name feature breathe across the home container */
.page--home .prose > div > .name-feature,
.page--home .prose > .name-feature {
  width: 100%;
  max-width: none;
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose h2 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-hairline);
  font-weight: 500;
}

/* Avoid a double rule when the page hero already draws the separator */
.prose > h2:first-child,
.prose > div:first-child > h2:first-child,
.prose > div:first-child > div:first-child > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: var(--space-xl);
  color: var(--color-primary);
  font-size: var(--text-md);
  line-height: var(--text-md-lh);
  font-weight: 500;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 var(--space-md);
  max-width: 68ch;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--color-pistachio);
  background: rgba(10, 47, 58, 0.45);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-on-surface);
}

.prose blockquote h3 {
  margin-top: 0;
  font-style: normal;
  color: var(--color-pistachio);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose figure {
  margin: var(--space-xl) 0;
}

.prose figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-body-sm);
  color: var(--color-on-surface-variant);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--color-hairline);
  margin: var(--space-xl) 0;
}

.prose a:not(.btn):not(.card-link):not([href$="contact.html"]):not([href$="kontakt.html"]):not([href*="paypal"]):not([href$="donate-contribute.html"]):not([href$="spenden-mitmachen.html"]) {
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 210, 138, 0.45);
  color: var(--color-on-surface);
}

.prose a:not(.btn):not(.card-link):not([href$="contact.html"]):not([href$="kontakt.html"]):not([href*="paypal"]):not([href$="donate-contribute.html"]):not([href$="spenden-mitmachen.html"]):hover {
  color: var(--color-pistachio);
  border-bottom-color: var(--color-pistachio);
}

/* Home funding categories — quiet panels, not glass cards */
.page--home .prose h3 {
  margin-top: 0;
  color: var(--color-on-surface);
  font-size: var(--text-md);
  line-height: var(--text-md-lh);
}

.page--home .prose > div > div:has(h3) {
  display: grid;
  gap: var(--gutter);
  margin: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .page--home .prose > div > div:has(h3) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page--home .prose > div > div:has(h3) > div {
  /* Petrol nudged toward pistachio — slightly lighter than page ground */
  background: #1a3f42;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}

.page--home .prose > div > div:has(h3) > div:hover {
  border-color: var(--color-card-border-hover);
}

/* Ethical framework — centered copy + belief boxes */
.page--framework .page-hero {
  text-align: center;
}

.page--framework .page-hero h1 {
  margin-inline: auto;
}

.page--framework .page-hero p {
  margin-inline: auto;
}

.page--framework .prose {
  text-align: center;
}

.page--framework .prose > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page--framework .prose p,
.page--framework .prose h2,
.page--framework .prose h3 {
  max-width: 62ch;
  margin-inline: auto;
}

.page--framework .prose blockquote {
  width: min(100%, 42rem);
  margin-inline: auto;
  border-left: 0;
  border-top: 0;
  border-radius: var(--radius-md);
  text-align: center;
}

.page--framework .prose blockquote h3,
.page--framework .prose blockquote p {
  max-width: none;
}

.page--framework .prose > div > div:has(a[href$="contact.html"]),
.page--framework .prose > div > div:has(a[href$="kontakt.html"]) {
  width: min(100%, 42rem);
  margin-inline: auto;
  text-align: center;
}

/* Board / people */
.page--people .prose > div {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

@media (min-width: 900px) {
  .page--people .prose > div > div {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-hairline);
  }

  .page--people .prose figure img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    filter: grayscale(15%);
  }
}

@media (max-width: 899px) {
  .page--people .prose > div > div {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-hairline);
  }

  .page--people .prose figure {
    margin: 0 0 var(--space-md);
    max-width: 200px;
  }

  .page--people .prose figure img {
    border-radius: var(--radius);
  }
}

/* ---------- Buttons — pistachio only on primary CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}

.btn--primary {
  background: var(--color-pistachio);
  color: var(--color-on-secondary);
}

.btn--primary:hover {
  background: var(--color-pistachio-bright);
  color: var(--color-on-secondary);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-hairline);
  color: var(--color-on-surface);
}

.btn--ghost:hover {
  border-color: var(--color-pistachio);
  color: var(--color-pistachio);
}

.btn--link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--color-pistachio);
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
}

.btn--link::after {
  content: "→";
  display: inline-block;
  transition: transform var(--duration) var(--ease-out);
}

.btn--link:hover::after {
  transform: translateX(4px);
}

.prose .btn,
.prose a.btn {
  margin-top: var(--space-sm);
  border-bottom: 0;
}

.prose div > a[href$="kontakt.html"],
.prose div > a[href$="contact.html"],
.prose div > a[href*="paypal"],
.prose div > a[href$="spenden-mitmachen.html"],
.prose div > a[href$="donate-contribute.html"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-sm);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  background: var(--color-pistachio);
  color: var(--color-on-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 0;
}

.prose div > a[href$="kontakt.html"]:hover,
.prose div > a[href$="contact.html"]:hover,
.prose div > a[href*="paypal"]:hover,
.prose div > a[href$="spenden-mitmachen.html"]:hover,
.prose div > a[href$="donate-contribute.html"]:hover {
  background: var(--color-pistachio-bright);
  color: var(--color-on-secondary);
}

.prose div > a[href$="kontakt.html"]:visited,
.prose div > a[href$="contact.html"]:visited,
.prose div > a[href*="paypal"]:visited,
.prose div > a[href$="spenden-mitmachen.html"]:visited,
.prose div > a[href$="donate-contribute.html"]:visited {
  color: var(--color-on-secondary);
}

/* ---------- Forms ---------- */
.prose form,
.prose .wpcf7,
form.contact-form {
  position: relative;
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  background: var(--color-surface-low);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius);
  max-width: 40rem;
}

.prose label,
form label {
  display: block;
  margin: var(--space-md) 0 var(--space-xs);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

.prose input[type="text"],
.prose input[type="email"],
.prose input[type="tel"],
.prose input[type="url"],
.prose textarea,
.prose select,
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea,
form select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-abyss);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius);
  color: var(--color-on-surface);
  font: inherit;
}

.prose input:focus,
.prose textarea:focus,
.prose select:focus,
form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--color-pistachio);
}

.prose input[type="submit"],
.prose button[type="submit"],
form button[type="submit"] {
  appearance: none;
  margin-top: var(--space-lg);
  padding: 0.9rem 1.5rem;
  background: var(--color-pistachio);
  color: var(--color-on-secondary);
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.prose input[type="submit"]:hover,
.prose button[type="submit"]:hover,
form button[type="submit"]:hover {
  background: var(--color-pistachio-bright);
}

.prose input[type="checkbox"],
.prose input[type="radio"],
form input[type="checkbox"],
form input[type="radio"] {
  accent-color: var(--color-pistachio);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.2em;
}

.prose label:has(input[type="checkbox"]),
.prose label:has(input[type="radio"]),
form label:has(input[type="checkbox"]),
form label:has(input[type="radio"]) {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: var(--text-body-md);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-on-surface);
  line-height: 1.45;
}

.prose .wpcf7-list-item,
form .wpcf7-list-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0.65rem 0;
}

.form-note {
  margin-top: var(--space-md);
  font-size: var(--text-body-md);
  color: var(--color-on-surface-variant);
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: var(--space-md);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: var(--text-body-md);
  line-height: 1.45;
}

.form-status--ok {
  background: color-mix(in srgb, var(--color-pistachio) 18%, transparent);
  border: 1px solid var(--color-pistachio);
  color: var(--color-on-surface);
}

.form-status--error {
  background: color-mix(in srgb, #c45c5c 18%, transparent);
  border: 1px solid #c45c5c;
  color: var(--color-on-surface);
}

form.contact-form button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.page--contact .prose img[src*="qr"],
.page--contact .prose img[src*="qrcode"] {
  width: min(180px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--color-panel-border);
  background: #fff;
  padding: var(--space-sm);
}

/* ---------- Blog — editorial list with images ---------- */
.page--blog .page-hero {
  /* subtle photo wash behind blog index title */
  position: relative;
}

.blog-list {
  display: grid;
  gap: 0;
  margin-top: var(--space-xl);
  animation: rise 800ms var(--ease-out) 80ms both;
}

.blog-card {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-hairline);
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--duration) var(--ease-out);
}

.blog-card:hover {
  color: inherit;
  opacity: 0.92;
}

@media (min-width: 768px) {
  .blog-card--media {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    align-items: center;
  }
}

.blog-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-high);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.92);
  transition: transform 600ms var(--ease-out), filter 600ms var(--ease-out);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.03);
  filter: saturate(0.95) brightness(1);
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
}

.blog-card__date {
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

.blog-card h2 {
  font-size: var(--text-lg);
  line-height: var(--text-lg-lh);
  margin: 0 0 var(--space-sm);
  color: var(--color-on-surface);
  font-weight: 500;
}

.blog-card p {
  margin: 0;
  color: var(--color-on-surface-variant);
  font-size: var(--text-body-md);
  line-height: var(--text-body-md-lh);
}

.blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: var(--space-md);
  color: var(--color-pistachio);
  font-family: var(--font-display);
  font-size: var(--text-body-md);
}

.blog-card:hover .blog-card__more {
  gap: 0.55rem;
}

.article-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-hairline);
  animation: rise 700ms var(--ease-out) both;
}

.article-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: var(--space-lg);
  color: var(--color-on-surface-variant);
  text-decoration: none;
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-header__back:hover {
  color: var(--color-pistachio);
}

.article-header time {
  display: inline-block;
  margin-bottom: var(--space-md);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
}

.article-body img {
  border-radius: var(--radius);
  margin: var(--space-lg) 0;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-hairline);
  background: var(--color-abyss);
  padding: var(--space-xl) 0 var(--space-lg);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-xl);
  min-width: 0;
}

@media (min-width: 768px) {
  .site-footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(var(--space-xl), 5vw, 3.5rem);
  }

  .site-footer__brand {
    flex: 0 1 auto;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
  max-width: 100%;
}

.site-footer__brand .brand {
  align-self: start;
  height: auto;
}

.site-footer h3 {
  font-family: var(--font-body);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-pistachio);
  margin-bottom: var(--space-md);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.site-footer a {
  color: var(--color-on-surface-variant);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-pistachio);
}

.site-footer__copy {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-hairline);
  font-size: var(--text-body-sm);
  color: var(--color-outline);
}

/* Thin pistachio filament — rare accent */
.page-hero::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: var(--space-lg);
  background: var(--color-pistachio);
  opacity: 0.8;
  transform-origin: left;
  animation: filament 900ms var(--ease-out) 200ms both;
}

/* Mobile: fit width; height follows aspect ratio — never crop the circle */
@media (max-width: 767px) {
  .site-header .brand__logo {
    width: auto;
    height: auto;
    max-width: calc(100vw - 7rem);
    max-height: calc(var(--header-height) - 0.25rem);
  }

  .brand--footer .brand__logo {
    width: auto;
    height: calc(var(--header-height) - 0.25rem);
    max-width: calc(100vw - (var(--margin) * 2));
    max-height: none;
  }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 1180px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-lg) var(--margin) var(--space-xl);
    background: rgba(3, 26, 32, 0.98);
    border-bottom: 1px solid var(--color-hairline);
    backdrop-filter: blur(18px);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-hairline);
    font-size: var(--text-body-lg);
    white-space: normal;
  }

  .lang-switch {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
