/* ---------------------------------------------------------
   Sophie & Kevin & Milo — Umzugs-Countdown
   Warme, ruhige Zuhause-Ästhetik: Creme, Terrakotta, Fraunces.
--------------------------------------------------------- */

:root {
  --cream: #f7efe2;
  --cream-deep: #efe2cd;
  --clay: #bd5a37;
  --clay-deep: #9c4327;
  --ink: #3a2b21;
  --ink-soft: rgba(58, 43, 33, 0.62);
  --line: rgba(58, 43, 33, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layered warm gradient mesh, evoking soft evening light through a window */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(38rem 30rem at 12% -6%, rgba(189, 90, 55, 0.24), transparent 60%),
    radial-gradient(34rem 28rem at 108% 8%, rgba(239, 199, 155, 0.55), transparent 55%),
    radial-gradient(46rem 40rem at 50% 118%, rgba(189, 90, 55, 0.16), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}

/* Fixed grain overlay for texture — never on scrolling content */
.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 3vw, 1.4rem);
  padding: max(1.75rem, env(safe-area-inset-top)) 1.25rem max(2.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay-deep);
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.names {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35em;
  font-size: clamp(2.1rem, 8.5vw, 4rem);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: -0.01em;
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.names .amp {
  font-style: italic;
  font-weight: 500;
  color: var(--clay);
  font-size: 0.7em;
}

.lede {
  margin: 0;
  max-width: 26rem;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.4rem, 2vw, 0.9rem);
  margin-top: clamp(0.75rem, 3vw, 1.5rem);
  padding: clamp(1.1rem, 4vw, 1.75rem) clamp(1rem, 4vw, 2.25rem);
  border-radius: 1.4rem;
  background: rgba(255, 250, 242, 0.55);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 3rem -1.75rem rgba(58, 43, 33, 0.55);
  backdrop-filter: blur(6px);
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 3.6rem;
}

.value {
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  font-weight: 560;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--ink);
}

.value.tick {
  animation: tick 0.4s ease-out;
}

.label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sep {
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--clay);
  opacity: 0.55;
  transform: translateY(-0.55em);
}

.target {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(0.5rem, 2vw, 1rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.target strong {
  color: var(--clay-deep);
  font-weight: 700;
}

.key-icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--clay);
  flex-shrink: 0;
}

.page.arrived .countdown {
  background: rgba(189, 90, 55, 0.12);
}

.page.arrived .lede {
  color: var(--clay-deep);
  font-style: normal;
  font-weight: 500;
}

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

@keyframes tick {
  from {
    opacity: 0.4;
    transform: translateY(-0.12em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 380px) {
  .sep {
    display: none;
  }
  .countdown {
    gap: 1.1rem 1.4rem;
  }
  .unit {
    min-width: 3.1rem;
  }
}
