/* Film progress tracker — warm, cinematic, package-tracker layout */
:root {
  --bg: #f3eee6;
  --bg-2: #e8e0d4;
  --card: #faf7f1;
  --ink: #1e1914;
  --ink-soft: #5a5248;
  --muted: #7a7166;
  --line: #d8cfc3;
  --gold: #b08a4a;
  --gold-deep: #8d6b34;
  --gold-soft: rgba(176, 138, 74, 0.22);
  --done: #2a241e;
  --upcoming: #cfc6b8;
  --upcoming-text: #8a8176;
  --shadow: 0 18px 50px rgba(30, 25, 20, 0.08);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -10%, #fffdf8 0%, transparent 60%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 40%, var(--bg-2) 100%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.brand {
  text-align: center;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gold-deep);
  margin-bottom: 28px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(42, 36, 30, 0.06);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 32px 32px;
}

@media (max-width: 640px) {
  .card { padding: 28px 20px 24px; border-radius: 16px; }
  .page { padding-top: 24px; }
}

.couple-names {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.05rem);
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.02em;
}

.wedding-date {
  text-align: center;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto 26px;
  border: 0;
}

.status-kicker {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.status-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.7rem, 5.4vw, 2.45rem);
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
}

.step-meta {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  margin: 14px 0 28px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.step-meta .pct {
  color: var(--gold-deep);
}

/* Horizontal tracker (desktop / tablet) */
.tracker {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 8px 0 8px;
  padding: 0;
}

.step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--upcoming);
  z-index: 0;
}

.step.is-complete:not(:last-child)::after,
.step.is-current:not(:last-child)::after {
  background: var(--gold);
}

.step.is-current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--gold) 0 50%, var(--upcoming) 50% 100%);
}

.icon-wrap {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe8dc;
  border: 2px solid var(--upcoming);
  color: var(--upcoming-text);
}

.step.is-complete .icon-wrap {
  background: var(--done);
  border-color: var(--done);
  color: #f7f1e8;
}

.step.is-current .icon-wrap {
  background: var(--card);
  border-color: var(--gold);
  color: var(--gold-deep);
  box-shadow: 0 0 0 0 var(--gold-soft);
  animation: pulse 2.2s ease-out infinite;
}

.icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-label {
  margin-top: 10px;
  font-size: 0.68rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--upcoming-text);
  max-width: 6.8rem;
  font-weight: 500;
}

.step.is-complete .step-label { color: var(--ink); }
.step.is-current .step-label {
  color: var(--gold-deep);
  font-weight: 600;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(176, 138, 74, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(176, 138, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(176, 138, 74, 0); }
}

.delivery {
  margin: 32px 16px 0;
  text-align: center;
  padding: 22px 16px 6px;
  border-top: 1px solid var(--line);
}

.delivery-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.delivery-date {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.note {
  margin: 28px 0 0;
  background: #f3eee4;
  border-radius: 14px;
  padding: 18px 20px;
}

.note-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: 6px;
}

.note p {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.foot {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.foot a { color: var(--gold-deep); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Not found / loading */
.loading-msg {
  text-align: center;
  color: var(--ink-soft);
  margin-top: 80px;
  font-size: 1rem;
}
.muted {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

.not-found {
  text-align: center;
  padding: 56px 20px;
}

.not-found-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  margin: 10px 0 12px;
}

/* Vertical tracker on narrow phones */
@media (max-width: 640px) {
  .tracker {
    flex-direction: column;
    gap: 0;
    margin: 4px 8px 8px 12px;
  }
  .step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 6px 0 6px 0;
    min-height: 56px;
  }
  .step:not(:last-child)::after {
    top: 50px;
    left: 21px;
    right: auto;
    width: 2px;
    height: calc(100% - 16px);
    background: var(--upcoming);
  }
  .step.is-complete:not(:last-child)::after,
  .step.is-current:not(:last-child)::after {
    background: var(--gold);
  }
  .step.is-current:not(:last-child)::after {
    background: linear-gradient(180deg, var(--gold) 0 45%, var(--upcoming) 45% 100%);
  }
  .step-label {
    margin-top: 0;
    margin-left: 14px;
    max-width: none;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
  }
  .delivery { margin-left: 0; margin-right: 0; }
}
