:root {
  --navy: #02003f;
  --navy-deep: #010026;
  --purple: #2e1456;
  --gold: #e7cc68;
  --gold-soft: #f3e2a4;
  --ivory: #fffaf0;
  --text: rgba(255,255,255,.80);
  --line: rgba(231,204,104,.55);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--navy-deep);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 82% 16%, rgba(46,20,86,.34), transparent 34rem),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  font-family: "Montserrat", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .84;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:
    calc(12px + env(safe-area-inset-top))
    max(18px, calc((100vw - 1040px) / 2))
    10px;
  background: linear-gradient(180deg, rgba(2,0,63,.96), rgba(2,0,63,.66), transparent);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.monogram {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .08em;
}

.monogram i {
  font-family: serif;
  font-size: 11px;
  font-style: normal;
}

.save-top {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 17px;
  color: rgba(255,255,255,.95);
  font-size: 14px;
  background: rgba(8,5,52,.42);
}

main, footer {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  place-items: start center;
  padding:
    calc(88px + env(safe-area-inset-top))
    18px
    18px;
}

.hero-inner {
  width: min(610px, 100%);
  text-align: center;
  animation: reveal .9s ease both;
}

.eyebrow,
.marry,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: .38em;
  text-indent: .38em;
  font-weight: 500;
}

h1 {
  margin: 18px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  line-height: .80;
}

h1 span {
  font-size: clamp(58px, 8.4vw, 92px);
  letter-spacing: -.04em;
  text-shadow: 0 4px 18px rgba(0,0,0,.18);
}

h1 b {
  display: block;
  margin: 10px 0 9px;
  color: var(--gold);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  font-style: italic;
  line-height: .55;
}

.ornament {
  width: min(310px, 62%);
  margin: 15px auto 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: var(--gold);
}

.ornament span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament i {
  font-size: 11px;
  font-style: normal;
}

.date-card {
  margin-top: 22px;
  padding: 21px 24px 20px;
  border: 1px solid rgba(231,204,104,.60);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(46,20,86,.16), rgba(2,0,63,.40));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 48px rgba(0,0,0,.14);
}

.date-card time {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

.date-card > p {
  margin: 7px 0 19px;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 3vw, 33px);
  font-style: italic;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.countdown div {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid rgba(231,204,104,.42);
}

.countdown div:first-child { border-left: 0; }

.countdown strong {
  display: block;
  color: var(--gold-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 3.8vw, 43px);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

.countdown strong.changing {
  opacity: 0;
  transform: translateY(-7px) scale(.97);
  filter: blur(1.5px);
}

.countdown strong.entering {
  animation: digitIn .32s ease both;
}

.countdown small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.70);
  font-size: clamp(7px, .9vw, 10px);
  letter-spacing: .08em;
}

.scroll-hint {
  position: relative !important;
  inset: auto !important;
  width: 74px;
  min-height: 54px;
  margin: 14px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: .88;
  transition: opacity .3s ease, transform .3s ease;
}

.scroll-hint.hidden {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

.scroll-label {
  color: rgba(231,204,104,.72);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .28em;
  text-indent: .28em;
}

.scroll-chevron {
  width: 15px;
  height: 15px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: hintArrow 1.9s ease-in-out infinite;
  filter: drop-shadow(0 0 7px rgba(231,204,104,.20));
}

.message,
.calendar {
  width: min(700px, calc(100% - 36px));
  margin: 0 auto;
  text-align: center;
}

.message {
  min-height: 52svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 52px;
}

.heart {
  margin-bottom: 26px;
  color: var(--gold);
  font-family: serif;
  font-size: 52px;
  line-height: 1;
  animation: heartbeat 3s ease-in-out infinite;
}

.message p {
  margin: 0 auto 16px;
  max-width: 700px;
  color: var(--text);
  font-size: clamp(16px, 2.1vw, 21px);
  font-weight: 300;
  line-height: 1.62;
}

.calendar {
  padding: 56px 0 84px;
  scroll-margin-top: 76px;
}

.calendar h2 {
  margin: 13px 0 28px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(38px, 4.9vw, 56px);
  font-weight: 400;
}

.calendar-actions {
  display: grid;
  gap: 14px;
  width: min(600px, 100%);
  margin: auto;
}

.button {
  width: 100%;
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--gold);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 13px;
  font-weight: 600;
}

.button-primary {
  color: #080630;
  background: linear-gradient(120deg, #f5e4a7, #cfad50);
}

.button-secondary {
  color: var(--ivory);
  background: rgba(10,6,54,.50);
}

.calendar-note {
  margin-top: 21px;
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

footer {
  padding: 30px 20px calc(26px + env(safe-area-inset-bottom));
  color: rgba(255,255,255,.35);
  text-align: center;
  font-size: 11px;
  letter-spacing: .28em;
}

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

@keyframes hintArrow {
  0%, 100% { transform: rotate(45deg) translate(-2px,-2px); opacity: .42; }
  50% { transform: rotate(45deg) translate(4px,4px); opacity: 1; }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); opacity: .88; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes digitIn {
  from { opacity: 0; transform: translateY(7px) scale(.97); filter: blur(1.5px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (max-width: 620px) {
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .monogram { font-size: 24px; }

  .save-top {
    padding: 9px 15px;
    font-size: 13px;
  }

  .hero {
    padding-top: calc(82px + env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .hero-inner {
    width: min(520px, 100%);
  }

  .eyebrow { margin-top: 4px; }

  h1 {
    margin-top: 16px;
    margin-bottom: 10px;
  }

  h1 span {
    font-size: clamp(58px, 17.5vw, 78px);
  }

  h1 b {
    margin: 9px 0 8px;
    font-size: clamp(39px, 11vw, 49px);
  }

  .ornament {
    margin-top: 13px;
    margin-bottom: 14px;
    width: min(270px, 60%);
  }

  .marry { font-size: 10px; }

  .date-card {
    margin-top: 19px;
    padding: 18px 7px 18px;
    border-radius: 22px;
  }

  .date-card time {
    font-size: clamp(33px, 9.8vw, 44px);
  }

  .date-card > p {
    margin-bottom: 17px;
    font-size: 26px;
  }

  .countdown div { padding: 0 4px; }

  .countdown strong {
    font-size: clamp(28px, 8vw, 35px);
  }

  .countdown small {
    font-size: 7px;
    letter-spacing: .03em;
  }

  .scroll-hint {
    margin-top: 12px;
  }

  .message {
    min-height: 54svh;
    padding: 42px 0 50px;
  }

  .heart {
    margin-bottom: 24px;
    font-size: 48px;
  }

  .calendar {
    padding-top: 56px;
  }
}

@media (max-width: 390px) {
  h1 span {
    font-size: clamp(54px, 16.5vw, 68px);
  }

  .date-card time {
    font-size: 31px;
  }

  .date-card > p {
    font-size: 24px;
  }

  .countdown strong {
    font-size: 27px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding-top: 84px;
    padding-bottom: 10px;
  }

  .hero-inner {
    width: min(560px, 100%);
  }

  h1 span {
    font-size: 84px;
  }

  .date-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .message {
    min-height: 44svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* V6: verhindert zuverlässig großen Leerraum aus älteren Browser-Caches/Regeln */
.hero {
  min-height: auto !important;
  height: auto !important;
}

.hero-inner {
  min-height: 0 !important;
}

@media (max-width: 620px) {
  .hero {
    min-height: auto !important;
    height: auto !important;
    padding-bottom: 4px;
  }
}
