:root {
  color-scheme: dark;
  --ink: #f7f1e8;
  --muted: #aab2c2;
  --night: #08101e;
  --night-soft: #0f1a2d;
  --gold: #e8bf7a;
  --gold-soft: #c99950;
  --rose: #ca7480;
  --line: rgba(232, 191, 122, 0.24);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 16%, rgba(91, 119, 166, 0.16), transparent 30rem),
    radial-gradient(circle at 8% 74%, rgba(202, 116, 128, 0.10), transparent 28rem),
    var(--night);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 20;
}

.page-shell { overflow: hidden; }

.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--night);
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.76rem;
  box-shadow: 0 0 0 5px rgba(232, 191, 122, 0.08);
}

.date-pill {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.hero {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100svh - 90px);
  margin: 0 auto;
  padding: 78px 0 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 76px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow span { width: 32px; height: 1px; background: var(--gold); }

h1, h2, .love-note p {
  margin: 0;
  font-family: "Italiana", serif;
  font-weight: 400;
}

h1 {
  max-width: 730px;
  font-size: clamp(4.2rem, 8vw, 7.8rem);
  line-height: 0.84;
  letter-spacing: -0.045em;
}

h1 em { color: var(--gold); font-style: italic; }

.intro {
  max-width: 570px;
  margin: 34px 0 42px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.75;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 11px;
  max-width: 600px;
  position: relative;
}

.separator { display: none; }

.time-card {
  min-width: 0;
  padding: 20px 10px 17px;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px rgba(255,255,255,0.04), 0 18px 60px rgba(0,0,0,0.18);
}

.time-card strong {
  display: block;
  font-family: "Italiana", serif;
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.target-date {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.target-date svg { width: 16px; fill: var(--rose); }

.hero-photo {
  position: relative;
  justify-self: end;
  width: min(100%, 450px);
  transform: rotate(2deg);
}

.photo-frame {
  position: relative;
  aspect-ratio: 0.74;
  padding: 13px;
  background: #e9e4db;
  box-shadow: 0 38px 90px rgba(0,0,0,0.38), -24px 20px 70px rgba(202,116,128,0.07);
  z-index: 2;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255,255,255,0.25);
  pointer-events: none;
}

.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: saturate(0.92) contrast(1.02); }

.handwritten {
  position: relative;
  width: max-content;
  margin: -3px 17px 0 auto;
  padding: 9px 17px 12px;
  color: #202329;
  background: #e9e4db;
  font-family: "Italiana", serif;
  font-size: 1rem;
  font-style: italic;
  transform: rotate(-3deg);
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
  z-index: 3;
}

.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; z-index: 0; }
.orbit-one { width: 130px; height: 130px; right: -49px; top: -46px; }
.orbit-two { width: 82px; height: 82px; left: -48px; bottom: 20px; border-color: rgba(202,116,128,0.28); }

.memory-section {
  padding: 110px max(24px, calc((100% - 1180px) / 2)) 128px;
  background: rgba(255,255,255,0.018);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 74px; }
.section-heading h2 { max-width: 780px; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 1.02; letter-spacing: -0.03em; }
.section-heading .eyebrow { align-self: flex-start; flex-shrink: 0; margin-right: 30px; }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 11px;
  align-items: center;
}

.memory-card {
  appearance: none;
  display: block;
  padding: 8px 8px 33px;
  color: #26262a;
  background: #eee9e1;
  border: 0;
  box-shadow: 0 24px 48px rgba(0,0,0,0.3);
  cursor: zoom-in;
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.memory-card:hover, .memory-card:focus-visible { transform: translateY(-12px) rotate(0deg); box-shadow: 0 34px 64px rgba(0,0,0,0.42); outline: 2px solid var(--gold); outline-offset: 5px; z-index: 5; }
.memory-card img { display: block; width: 100%; aspect-ratio: 0.79; object-fit: cover; }
.memory-card span { display: block; margin-top: 10px; font-family: "Italiana", serif; font-size: 0.96rem; font-style: italic; text-align: center; }
.tilt-left { transform: rotate(-4deg); }
.tilt-right { transform: rotate(4deg); }
.lift { transform: translateY(16px) rotate(1deg); }
.featured { transform: translateY(-12px) rotate(-1deg); }

.love-note {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 140px 0 132px;
  text-align: center;
}

.arrival-message {
  grid-column: 1 / -1;
  padding: 24px 28px;
  color: var(--gold);
  border: 1px solid var(--line);
  font-family: "Italiana", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.arrival-message span { color: var(--rose); }

.note-rule { width: 1px; height: 58px; margin: 0 auto; background: linear-gradient(transparent, var(--gold)); }
.note-rule:last-child { background: linear-gradient(var(--gold), transparent); }
.note-heart { width: 24px; margin: 30px 0 26px; fill: var(--rose); filter: drop-shadow(0 0 12px rgba(202,116,128,0.25)); }
.love-note p { font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: 1.05; letter-spacing: -0.025em; }
.love-note em { color: var(--gold); font-style: italic; }

footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footer-heart { color: var(--rose); }

.lightbox {
  width: min(90vw, 760px);
  max-height: 90vh;
  padding: 12px;
  background: #eee9e1;
  border: 0;
  box-shadow: 0 36px 110px rgba(0,0,0,0.75);
}

.lightbox::backdrop { background: rgba(3,7,14,0.88); backdrop-filter: blur(10px); }
.lightbox img { display: block; width: 100%; max-height: calc(90vh - 24px); object-fit: contain; }
.close-lightbox { position: fixed; top: 18px; right: 22px; width: 46px; height: 46px; padding: 0; color: white; background: rgba(8,16,30,0.72); border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 62px; }
  .hero-photo { justify-self: center; width: min(78vw, 430px); margin-right: 2vw; }
  .section-heading { display: block; }
  .section-heading .eyebrow { margin-bottom: 24px; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); row-gap: 44px; }
  .photo-strip .memory-card:nth-child(n+4) { display: none; }
}

@media (max-width: 600px) {
  .topbar, .hero, footer, .love-note { width: min(100% - 32px, 1180px); }
  .topbar { height: 72px; }
  .brand { font-size: 0; gap: 0; }
  .brand-mark { font-size: 0.76rem; }
  .hero { min-height: auto; padding: 54px 0 72px; gap: 50px; }
  h1 { font-size: clamp(3.65rem, 18vw, 5.6rem); }
  .intro { margin: 28px 0 34px; }
  .countdown { gap: 7px; }
  .time-card { padding: 16px 5px 14px; }
  .time-card strong { font-size: clamp(2rem, 10vw, 3.4rem); }
  .time-card span { font-size: 0.56rem; letter-spacing: 0.1em; }
  .target-date { font-size: 0.78rem; }
  .hero-photo { width: min(82vw, 380px); }
  .memory-section { padding: 82px 16px 92px; }
  .section-heading { margin-bottom: 50px; }
  .section-heading h2 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .photo-strip { display: flex; gap: 14px; overflow-x: auto; padding: 20px 12vw 44px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .photo-strip::-webkit-scrollbar { display: none; }
  .memory-card, .photo-strip .memory-card:nth-child(n+4) { display: block; flex: 0 0 62vw; scroll-snap-align: center; transform: rotate(0); }
  .love-note { padding: 100px 0 96px; }
  .love-note p { font-size: clamp(2.45rem, 12vw, 4rem); }
  footer { flex-wrap: wrap; padding-bottom: 30px; font-size: 0.63rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
