/* ───────────────────────────────────────────────────────────
   Michelle wird 30 — Einladung
   Design tokens + base styles. Theme variants live at the bottom.
   ─────────────────────────────────────────────────────────── */

:root {
  /* Palette — warm paper + bold deep blue (from the card) */
  --paper:      #EAE7E1;   /* warm light gray */
  --paper-2:    #F2EFEA;   /* lighter card surface */
  --paper-3:    #E1DDD5;   /* slightly deeper */
  --ink:        #16181D;   /* near-black */
  --ink-soft:   #4A4D55;
  --ink-faint:  #8A8C90;
  --line:       rgba(22,24,29,.14);
  --line-soft:  rgba(22,24,29,.08);

  --blue:       #1C3F94;   /* kräftiges, dunkleres Blau */
  --blue-deep:  #142C68;
  --blue-bright:#234FB8;
  --blue-tint:  rgba(28,63,148,.08);

  --shadow-sm: 0 1px 2px rgba(20,24,40,.06), 0 2px 8px rgba(20,24,40,.05);
  --shadow-md: 0 8px 30px rgba(20,24,40,.10), 0 2px 8px rgba(20,24,40,.06);
  --shadow-lg: 0 24px 70px rgba(20,24,40,.16), 0 6px 18px rgba(20,24,40,.08);

  /* Type */
  --f-script: "Pinyon Script", cursive;
  --f-serif:  "Cormorant Garamond", Georgia, serif;
  --f-mono:   "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--f-serif);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

/* Subtle paper grain on the page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.012) 1px, transparent 1px);
  background-size: 4px 4px, 7px 7px;
  background-position: 0 0, 2px 3px;
}

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

a { color: var(--blue); text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }

/* ── Shared type helpers ───────────────────────────────────── */
.mono {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72em;
}
.eyebrow {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: 12px;
  color: var(--blue);
  font-weight: 700;
}
.script { font-family: var(--f-script); font-weight: 400; line-height: .9; }

/* ── Section rhythm ────────────────────────────────────────── */
section { position: relative; z-index: 1; }
.section-pad { padding: clamp(56px, 9vw, 120px) 0; }

.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(34px, 5.5vw, 56px);
  letter-spacing: .005em;
  margin: 14px 0 0;
  line-height: 1.05;
}
.section-head .script-accent {
  font-family: var(--f-script);
  color: var(--blue);
  font-size: clamp(40px, 6.5vw, 66px);
}

/* ───────────────────────────────────────────────────────────
   HERO
   ─────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(40px, 7vh, 90px) var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
}

.hero__photo { display: flex; justify-content: center; }

/* Polaroid */
.polaroid {
  background: #fdfdfb;
  padding: 16px 16px 64px;
  box-shadow: var(--shadow-lg);
  transform: rotate(var(--polaroid-rot, -4deg));
  position: relative;
  width: min(420px, 80vw);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
  border-radius: 2px;
}
.polaroid:hover { transform: rotate(-1.5deg) scale(1.015); }
.polaroid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #111; }
.polaroid figcaption {
  font-family: var(--f-script);
  font-size: 40px;
  text-align: center;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1;
}
/* tape */
.polaroid::before {
  content: "";
  position: absolute;
  top: -16px; left: 50%;
  width: 120px; height: 34px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(220,210,180,.42);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  backdrop-filter: blur(.5px);
}

.hero__text { max-width: 560px; }
.hero__kicker {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.hero__title { position: relative; margin: 0; padding-bottom: .04em; }
.hero__title .b-script {
  display: block;
  font-family: var(--f-script);
  color: var(--ink);
  font-size: clamp(72px, 13vw, 150px);
  line-height: .8;
}
.hero__title .b-party {
  display: block;
  font-family: var(--f-serif);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: clamp(46px, 8.5vw, 104px);
  line-height: .95;
  margin-top: -.06em;
  margin-left: .12em;
}
.hero__30 {
  position: absolute;
  bottom: -.34em; right: -.06em;
  font-family: var(--f-script);
  color: var(--blue);
  font-size: clamp(54px, 9vw, 120px);
  line-height: 1;
  transform: rotate(-8deg);
  pointer-events: none;
}
.hero__sub {
  margin: 28px 0 0;
  font-size: clamp(19px, 2.4vw, 24px);
  color: var(--ink-soft);
  max-width: 44ch;
}
.hero__meta {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 14px;
  color: var(--ink);
}
.hero__meta b { color: var(--blue); font-weight: 700; }
.hero__cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 700;
  padding: 16px 30px;
  border-radius: 2px;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--blue-deep); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }

/* ── Countdown ─────────────────────────────────────────────── */
.countdown {
  display: flex;
  gap: clamp(14px, 3vw, 40px);
  justify-content: center;
  flex-wrap: wrap;
}
.cd-unit { text-align: center; min-width: 76px; }
.cd-unit .num {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 84px);
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.cd-unit .lbl {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.cd-sep { font-family: var(--f-serif); font-size: clamp(40px,7vw,72px); color: var(--line); align-self: flex-start; }

/* ───────────────────────────────────────────────────────────
   DETAILS
   ─────────────────────────────────────────────────────────── */
.details { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(28px, 3.5vw, 40px);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.detail-card .ico {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  color: var(--blue);
}
.detail-card .ico svg { width: 100%; height: 100%; }
.detail-card h3 {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0 0 10px;
  font-weight: 700;
}
.detail-card .big {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
  color: var(--ink);
}
.detail-card .small { font-size: 16px; color: var(--ink-soft); margin-top: 6px; }

.catering-note {
  text-align: center;
  margin-top: clamp(32px, 4vw, 48px);
  font-family: var(--f-script);
  font-size: clamp(34px, 5vw, 52px);
  color: var(--blue);
  line-height: 1;
}
.welcome-note {
  text-align: center;
  margin: 14px 0 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink-soft);
}

/* ── Map ───────────────────────────────────────────────────── */
.map-wrap {
  margin-top: clamp(32px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--paper-3);
}
.map-wrap iframe { width: 100%; height: clamp(280px, 42vh, 440px); border: 0; display: block; filter: grayscale(.25) contrast(1.02); }
.map-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.map-bar .addr { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--ink); }

/* ───────────────────────────────────────────────────────────
   RSVP
   ─────────────────────────────────────────────────────────── */
.rsvp { background: var(--paper); }
.rsvp-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.rsvp-deadline {
  text-align: center;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 8px;
  font-weight: 700;
}

.field { margin-bottom: 24px; }
.field > label {
  display: block;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.field .req { color: var(--blue); }
.input, .textarea {
  width: 100%;
  font-family: var(--f-serif);
  font-size: 19px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
  background: #fff;
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

/* Attendance segmented choice */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice label {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all .18s ease;
  user-select: none;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:hover { border-color: var(--ink-faint); }
.choice .yes input:checked + .mark,
.choice .no input:checked + .mark { display: none; }
.choice label .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); transition: all .18s; display: grid; place-items: center; }
.choice .yes input:checked ~ * { }
.choice label.is-on--yes { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.choice label.is-on--yes .dot { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--paper); }
.choice label.is-on--no { border-color: var(--ink); background: rgba(22,24,29,.05); color: var(--ink); }
.choice label.is-on--no .dot { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--paper); }

/* companion block reveals when "Ja" — grid-rows trick expands to content height */
.companion { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s ease, opacity .35s ease, margin .35s ease; opacity: 0; }
.companion[hidden] { display: grid !important; grid-template-rows: 0fr; opacity: 0; margin: 0; }
.companion:not([hidden]) { grid-template-rows: 1fr; opacity: 1; }
.companion__inner { overflow: hidden; min-height: 0; }
/* first field keeps a little breathing room from the choice above when open */
.companion:not([hidden]) .companion__inner > .field:first-child { margin-top: 4px; }

.form-actions { margin-top: 32px; text-align: center; }
.form-actions .btn { width: 100%; justify-content: center; padding: 20px; font-size: 14px; }
.form-note { margin-top: 16px; font-size: 14px; color: var(--ink-faint); text-align: center; font-family: var(--f-serif); }

/* success / error states */
.form-status { display: none; text-align: center; }
.form-status.show { display: block; animation: fadeUp .5s ease both; }
.form-status .check {
  width: 76px; height: 76px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center;
}
.form-status .check svg { width: 38px; height: 38px; }
.form-status h3 { font-family: var(--f-script); font-size: clamp(44px,6vw,64px); color: var(--blue); margin: 0 0 8px; font-weight: 400; }
.form-status p { color: var(--ink-soft); margin: 0 auto; max-width: 40ch; }
.form-status.is-error .check { background: #9a2c2c; }
.form-status.is-error h3 { color: #9a2c2c; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px);} to {opacity:1; transform:none;} }

/* ───────────────────────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────────────────────── */
.footer { text-align: center; padding: clamp(56px, 8vw, 96px) var(--gutter); }
.footer .sig { font-family: var(--f-script); font-size: clamp(58px, 9vw, 96px); color: var(--ink); line-height: 1; }
.footer .sig .thirty { color: var(--blue); }
.footer .by { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .2em; font-size: 12px; color: var(--ink-faint); margin-top: 20px; }
.footer .heart { color: var(--blue); }

/* ── Reveal on scroll ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ───────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  body { font-size: 18px; }

  /* Hero: exakt ein Screen, kein Scrollen */
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    text-align: center;
    height: 100svh;
    min-height: auto;
    overflow: hidden;
    padding: clamp(28px, 4.5vh, 56px) var(--gutter);
    gap: clamp(28px, 4vh, 44px);
  }
  .hero__photo {
    order: -1;
    display: flex;
    justify-content: center;
    min-height: 0;
  }
  .hero__text  { margin: 0 auto; }
  .hero__title { display: inline-block; }
  .hero__30    { right: -.3em; }
  .hero__meta  { align-items: center; }

  /* CTAs: untereinander stapeln */
  .hero__cta {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
  }
  .hero__cta .btn { width: 100%; max-width: 300px; justify-content: center; }

  /* Kicker: weniger letter-spacing */
  .hero__kicker { letter-spacing: .10em; margin-bottom: 14px; }

  /* Kalender-Button im Hero ausblenden */
  .hero__cta .btn--ghost { display: none; }

  /* Subline: kompakter */
  .hero__sub { font-size: clamp(15px, 4vw, 19px); margin-top: 12px; }

  /* Polaroid: kleiner skalieren, Rotation reduzieren */
  .polaroid            { width: min(260px, 64vw); padding-bottom: 48px; transform: rotate(-1.5deg); }
  .polaroid:hover      { transform: rotate(0deg) scale(1.015); }
  .polaroid figcaption { font-size: 30px; }

  /* Titel: etwas kompakter */
  .hero__title .b-script { font-size: clamp(52px, 14vw, 80px); }
  .hero__title .b-party  { font-size: clamp(34px, 9.5vw, 52px); }
  .hero__30              { font-size: clamp(38px, 11vw, 60px); }

  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .choice { grid-template-columns: 1fr; }
  .choice label { justify-content: flex-start; }
  .map-bar { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ───────────────────────────────────────────────────────────
   THEME VARIANTS (toggled via data-theme on <html>)
   ─────────────────────────────────────────────────────────── */

/* — TIEFBLAU: blue-dominant, dramatic — */
html[data-theme="tiefblau"] {
  --paper:   #131C33;
  --paper-2: #1B2845;
  --paper-3: #0E1528;
  --ink:     #F1EFE9;
  --ink-soft:#B9C2D6;
  --ink-faint:#7E89A3;
  --line:    rgba(255,255,255,.16);
  --line-soft: rgba(255,255,255,.08);
  --blue:    #9FB8FF;
  --blue-deep:#7E9BF0;
  --blue-bright:#BFD0FF;
  --blue-tint: rgba(159,184,255,.14);
}
html[data-theme="tiefblau"] body::before { opacity: .25; }
html[data-theme="tiefblau"] .polaroid { background: #f3f1ec; }
html[data-theme="tiefblau"] .polaroid figcaption,
html[data-theme="tiefblau"] .polaroid img { color: #16181D; }
html[data-theme="tiefblau"] .btn--primary { background: var(--blue); color: #131C33; }
html[data-theme="tiefblau"] .btn--primary:hover { background: var(--blue-bright); }
html[data-theme="tiefblau"] .btn--ghost { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
html[data-theme="tiefblau"] .btn--ghost:hover { background: var(--ink); color: var(--paper); }
html[data-theme="tiefblau"] .input:focus, html[data-theme="tiefblau"] .textarea:focus { background: rgba(255,255,255,.06); }
html[data-theme="tiefblau"] .map-wrap iframe { filter: grayscale(.3) contrast(1.05) invert(.9) hue-rotate(180deg); }
html[data-theme="tiefblau"] .form-status .check { color: #131C33; }

/* — MINIMAL: clean off-white, sparse, thin rules — */
html[data-theme="minimal"] {
  --paper:   #F6F4EF;
  --paper-2: #FBFAF7;
  --paper-3: #EFEDE7;
  --ink:     #1A1B1E;
  --ink-soft:#5A5C61;
  --line:    rgba(22,24,29,.10);
  --blue:    #1C3F94;
  --shadow-lg: 0 12px 40px rgba(20,24,40,.08);
  --shadow-md: 0 4px 16px rgba(20,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(20,24,40,.04);
}
html[data-theme="minimal"] body::before { opacity: 0; }
html[data-theme="minimal"] .polaroid { box-shadow: var(--shadow-md); transform: rotate(0deg); padding: 12px 12px 48px; }
html[data-theme="minimal"] .polaroid::before { display: none; }
html[data-theme="minimal"] .detail-card { box-shadow: none; background: transparent; border-color: var(--line); }
html[data-theme="minimal"] .hero__30 { color: var(--blue); }
html[data-theme="minimal"] .rsvp-card { box-shadow: var(--shadow-md); }
html[data-theme="minimal"] .map-wrap iframe { filter: grayscale(.6) contrast(1.03); }
