/* ============================================================
   KAI KARL — Samtgemeindebürgermeister Suderburg
   Static one-page campaign site. Design tokens translated from
   the source design system (tokens/colors.css, typography.css,
   spacing.css) and extended with fluid type, motion and a
   distinct poster-inspired hero built from the print flyer's
   own device: full-bleed blue field, bleeding cutout portrait,
   oversized wordmark, rotated tagline ribbon.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/HankenGrotesk-400.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/HankenGrotesk-500.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/HankenGrotesk-600.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/HankenGrotesk-700.woff2') format('woff2'); }
@font-face { font-family:'Hanken Grotesk'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/HankenGrotesk-800.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  /* Brand blue ramp — sampled from the print flyer's background panel */
  --blue-900:#0a2c66;
  --blue-800:#0d3780;
  --blue-700:#11459d;
  --blue-600:#1a53b5;
  --blue-500:#2c6bd6;
  --blue-100:#dce6f7;
  --blue-50:#f0f4fc;

  --ink-900:#12151a;
  --ink-700:#333844;
  --ink-500:#5b6270;
  --ink-300:#9aa1ad;
  --line-200:#dde1e8;
  --line-100:#eceef2;
  --surface-0:#ffffff;
  --surface-50:#f7f8fa;
  --white:#ffffff;

  --color-primary:var(--blue-700);
  --color-primary-hover:var(--blue-800);
  --color-primary-active:var(--blue-900);
  --color-primary-tint:var(--blue-50);
  --color-on-primary:var(--white);

  --text-heading:var(--ink-900);
  --text-body:var(--ink-700);
  --text-muted:var(--ink-500);
  --text-faint:var(--ink-300);

  --surface-page:var(--surface-50);
  --surface-card:var(--surface-0);
  --border-default:var(--line-200);
  --border-subtle:var(--line-100);
  --focus-ring:var(--blue-500);

  /* Type */
  --font-body:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,sans-serif;

  --fw-regular:400; --fw-medium:500; --fw-semibold:600; --fw-bold:700; --fw-black:800;

  --fs-caption:13px;
  --fs-body-s:15px;
  --fs-body:17px;
  --fs-body-l:19px;
  --fs-h3: clamp(20px, 1.6vw + 14px, 24px);
  --fs-h2: clamp(28px, 2.6vw + 16px, 42px);
  --fs-h1: clamp(34px, 3.2vw + 16px, 54px);
  --fs-quote: clamp(24px, 2.2vw + 16px, 38px);
  --fs-mission: clamp(23px, 1.6vw + 16px, 33px);
  --fs-wordmark-lg: clamp(88px, 13.5vw, 208px);
  --fs-wordmark-sm: clamp(30px, 4.6vw, 60px);
  --fs-contact-cta: clamp(32px, 3.6vw, 52px);

  --lh-tight:1.04;
  --lh-snug:1.2;
  --lh-normal:1.45;
  --lh-relaxed:1.62;

  --ls-tight:-0.02em;
  --ls-normal:0;
  --ls-wide:0.09em;

  /* Space */
  --space-1:4px;  --space-2:8px;  --space-3:12px; --space-4:16px; --space-5:24px;
  --space-6:32px; --space-7:48px; --space-8:64px; --space-9:96px; --space-10:128px;

  --radius-s:4px; --radius-m:8px; --radius-l:20px; --radius-full:999px;

  --shadow-card:0 1px 2px rgba(18,21,26,0.06), 0 4px 16px rgba(18,21,26,0.08);
  --shadow-raised:0 8px 32px rgba(10,44,102,0.18);
  --shadow-nav: 0 1px 0 rgba(18,21,26,0.06), 0 8px 24px rgba(18,21,26,0.04);

  --container-max:1160px;

  --ease-standard:cubic-bezier(.4,0,.2,1);
  --ease-out:cubic-bezier(.16,1,.3,1);
  --duration-fast:140ms;
  --duration-base:220ms;
  --duration-slow:640ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--blue-700); color: var(--white); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-6); }

.eyebrow {
  display: inline-block;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 var(--space-3);
}
.eyebrow--on-dark { color: var(--blue-100); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  white-space: nowrap;
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-raised); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--inverse { background: var(--white); color: var(--color-primary); }
.btn--inverse:hover { background: var(--blue-50); box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.btn--s { padding: 10px 20px; font-size: var(--fs-body-s); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.badge--tint { background: var(--color-primary-tint); color: var(--color-primary); }
.badge--outline { background: transparent; color: var(--text-body); border: 1px solid var(--border-default); }
.badge--inverse { background: rgba(255,255,255,0.15); color: var(--white); backdrop-filter: blur(6px); }

/* ---------- Ribbon (tagline device, lifted from the print flyer) ---------- */
.ribbon {
  display: inline-block;
  background: var(--white);
  color: var(--blue-700);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  line-height: 1.15;
  padding: 10px 22px;
  border-radius: var(--radius-s);
  transform: rotate(-2.2deg);
  box-shadow: var(--shadow-raised);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(247,248,250,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard),
              padding var(--duration-base) var(--ease-standard);
}
.nav.is-scrolled {
  background: rgba(255,255,255,0.92);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-nav);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.nav__brand { font-weight: var(--fw-bold); font-size: 20px; letter-spacing: var(--ls-tight); color: var(--text-heading); }
.nav__links { display: flex; align-items: center; gap: var(--space-7); }
.nav__link {
  font-weight: var(--fw-medium); font-size: var(--fs-body-s); color: var(--text-body);
  position: relative; padding-bottom: 3px;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--color-primary);
  transition: right var(--duration-base) var(--ease-out);
}
.nav__link:hover { color: var(--text-heading); }
.nav__link:hover::after { right: 0; }
.nav__cta { display: none; }
@media (min-width: 720px) { .nav__cta { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue-700);
  color: var(--white);
  padding: clamp(56px, 8vw, 96px) var(--space-6) 0;
  min-height: min(780px, 100vh);
  display: flex; flex-direction: column;
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container-max); margin: 0 auto;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-8);
  flex: 1;
}
.hero__content { max-width: 620px; padding-bottom: var(--space-8); }
.hero__badge { margin-bottom: var(--space-6); opacity: 0; animation: heroRise var(--duration-slow) var(--ease-out) 80ms both; }
.hero__name {
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--space-5);
}
.hero__name-line { display: block; overflow: hidden; }
.hero__name-line span { display: block; opacity: 0; transform: translateY(100%); animation: heroNameRise 820ms var(--ease-out) both; }
.hero__name-small { font-size: var(--fs-wordmark-sm); line-height: 1; }
.hero__name-small span { animation-delay: 60ms; }
.hero__name-big { font-size: var(--fs-wordmark-lg); line-height: 0.92; }
.hero__name-big span { animation-delay: 180ms; }

.hero__tagline-row { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; margin-bottom: var(--space-6); opacity: 0; animation: heroRise var(--duration-slow) var(--ease-out) 420ms both; }
.hero__sub { font-weight: var(--fw-medium); font-size: var(--fs-body-l); color: var(--blue-100); }

.hero__lead {
  font-size: var(--fs-body-l); line-height: var(--lh-relaxed); color: var(--blue-100);
  max-width: 46ch; margin-bottom: var(--space-7);
  opacity: 0; animation: heroRise var(--duration-slow) var(--ease-out) 520ms both;
}
.hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; opacity: 0; animation: heroRise var(--duration-slow) var(--ease-out) 620ms both; }

.hero__portrait {
  position: relative; z-index: 1;
  flex-shrink: 0;
  align-self: center;
  width: min(30vw, 360px);
  transform: rotate(1.6deg);
  opacity: 0; animation: heroPortraitRise 900ms var(--ease-out) 260ms both;
}
.hero__portrait img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  display: block;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-raised);
}

.hero__scrollcue {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 auto var(--space-6);
  color: var(--blue-100);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  opacity: 0; animation: heroRise var(--duration-slow) var(--ease-out) 900ms both;
}
.hero__scrollcue-arrow {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  animation: bounceY 2.2s var(--ease-standard) infinite;
}

@keyframes heroRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroNameRise { to { opacity: 1; transform: translateY(0); } }
@keyframes heroPortraitRise { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bounceY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Reveal-on-scroll (generic) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-group > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* ---------- Mission statement ---------- */
.mission { padding: var(--space-9) var(--space-6); background: var(--surface-0); }
.mission__inner { max-width: 880px; margin: 0 auto; text-align: center; }
.mission__text {
  font-size: var(--fs-mission); line-height: 1.4; letter-spacing: var(--ls-tight);
  color: var(--text-heading); font-weight: var(--fw-medium);
}
.mission__text strong { color: var(--color-primary); font-weight: var(--fw-bold); }

/* ---------- About ---------- */
.about { padding: var(--space-9) var(--space-6); background: var(--surface-page); }
.about__inner {
  max-width: var(--container-max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: var(--space-9);
  align-items: center;
}
.about__media { position: relative; }
.about__media img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.about__heading { font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); color: var(--text-heading); margin-bottom: var(--space-6); }
.about__body p { font-size: var(--fs-body); line-height: var(--lh-relaxed); color: var(--text-body); max-width: 58ch; }
.about__body p + p { margin-top: var(--space-4); }
.about__badges { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }

/* ---------- Audiences ---------- */
.audiences { padding: var(--space-9) var(--space-6); background: var(--blue-900); color: var(--white); }
.audiences__head { max-width: 640px; margin: 0 auto var(--space-8); text-align: left; }
.audiences__heading { font-weight: var(--fw-bold); font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); color: var(--white); }
.audiences__grid {
  max-width: var(--container-max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
}
.audiences__grid > :nth-child(4) { grid-column: 1 / span 1; }
.card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-m);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  transition: background var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-out);
}
.card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); transform: translateY(-4px); }
.card__title { font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--fs-h3); color: var(--white); }
.card__text { font-size: var(--fs-body-s); line-height: var(--lh-normal); color: var(--blue-100); }

/* ---------- Principles band ---------- */
.principles { padding: var(--space-9) var(--space-6); background: var(--surface-0); }
.principles__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.principles__text { font-size: var(--fs-body-l); line-height: var(--lh-relaxed); color: var(--text-body); }

/* ---------- Quote ---------- */
.quote { padding: var(--space-8) var(--space-6) var(--space-9); background: var(--surface-page); }
.quote__inner {
  max-width: 760px; margin: 0 auto;
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-6);
}
.quote__text { font-size: var(--fs-quote); line-height: var(--lh-snug); letter-spacing: var(--ls-tight); font-weight: var(--fw-semibold); color: var(--text-heading); }
.quote__cite { display: block; margin-top: var(--space-4); font-size: var(--fs-body-s); font-weight: var(--fw-semibold); color: var(--text-muted); }

/* ---------- Contact / Footer ---------- */
.contact { padding: var(--space-9) var(--space-6) var(--space-8); background: var(--blue-700); color: var(--white); text-align: center; }
.contact__inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.contact__heading { font-weight: var(--fw-bold); font-size: var(--fs-contact-cta); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.contact__links { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--fs-body-l); color: var(--blue-100); }
.contact__links a:hover { color: var(--white); }
.contact__supported { margin-top: var(--space-7); font-size: var(--fs-body-s); color: var(--blue-100); opacity: 0.8; max-width: 46ch; }
.contact__colophon { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,0.16); width: 100%; font-size: var(--fs-caption); color: var(--blue-100); opacity: 0.65; letter-spacing: var(--ls-wide); text-transform: uppercase; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__badge, .hero__name-line span, .hero__tagline-row, .hero__lead, .hero__actions,
  .hero__portrait, .hero__scrollcue, .reveal {
    animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero__scrollcue-arrow { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .about__inner { grid-template-columns: 1fr; gap: var(--space-7); }
  .about__media { max-width: 380px; }
  .audiences__grid { grid-template-columns: repeat(2, 1fr); }
  .audiences__grid > :nth-child(4) { grid-column: auto; }
  .hero__inner { flex-direction: column; gap: var(--space-6); }
  .hero__portrait { align-self: center; width: min(70vw, 380px); }
  .hero__content { max-width: 640px; padding-bottom: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 719px) {
  .container, .nav, .hero, .mission, .about, .audiences, .principles, .quote, .contact { padding-left: var(--space-4); padding-right: var(--space-4); }
  .nav__links { gap: var(--space-4); }
  .nav__link--desktop { display: none; }
  .hero { padding-top: var(--space-6); min-height: auto; }
  .hero__inner { flex-direction: row; align-items: center; gap: var(--space-4); }
  .hero__content { max-width: none; flex: 1 1 auto; min-width: 0; padding-bottom: 0; }
  .hero__portrait { align-self: center; flex-shrink: 0; width: 38vw; max-width: 180px; }
  .hero__name-small { font-size: clamp(16px, 6vw, 22px); }
  .hero__name-big { font-size: clamp(30px, 13vw, 50px); }
  .hero__tagline-row { gap: var(--space-3); }
  .hero__sub { font-size: var(--fs-body-s); }
  .hero__lead { font-size: var(--fs-body-s); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; padding: 12px 16px; font-size: var(--fs-body-s); white-space: normal; }
  .audiences__grid { grid-template-columns: 1fr; }
  .ribbon { font-size: 16px; padding: 8px 14px; }
  .quote__inner { padding-left: var(--space-4); }
}
