:root {
  color-scheme: light dark;
  --page: #f5f7f3;
  --surface: #e9eee8;
  --text: #263a31;
  --muted: #596c62;
  --accent: #8b4d59;
  --accent-hover: #713c47;
  --line: #cbd5cd;
  --white: #fff;
  --radius: 12px;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.page-width {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  width: min(1360px, calc(100% - 64px));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  text-decoration: none;
}

.wordmark-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  letter-spacing: -0.07em;
}

.wordmark-mark span {
  padding-inline: 0.14em;
  color: var(--accent);
  font-size: 0.8em;
}

.main-nav {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
}

.main-nav a,
.back-to-top {
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.main-nav a:hover,
.back-to-top:hover {
  color: var(--accent);
}

.hero {
  min-height: min(790px, calc(100dvh - 76px));
  padding-block: 35px 70px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(44px, 8vw, 120px);
}

.hero-copy {
  padding-block: 12px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1,
h2,
.footer-names {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 640px;
  margin-bottom: 24px;
  font-size: clamp(4.2rem, 7.4vw, 7.25rem);
  letter-spacing: -0.075em;
  line-height: 0.93;
}

.ampersand {
  color: var(--accent);
  font-size: 0.74em;
  font-style: italic;
  letter-spacing: -0.08em;
}

.hero-description {
  max-width: 410px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.button {
  min-height: 50px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.hero-image {
  position: relative;
  height: clamp(420px, 58vw, 650px);
  margin: 0;
}

.hero-image img,
.gift-image img {
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.hero-image img {
  object-position: 54% 50%;
}

.hero-image figcaption {
  position: absolute;
  right: 0;
  bottom: -34px;
  color: var(--muted);
  font-size: 0.77rem;
}

.countdown-band {
  background: var(--surface);
}

.countdown-inner {
  width: min(1240px, calc(100% - 64px));
  min-height: 164px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.countdown-heading {
  max-width: 230px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.25;
}

.countdown {
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 70px);
}

.countdown-unit {
  min-width: 58px;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.countdown-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4.5vw, 3.7rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  color: var(--muted);
  font-size: 0.76rem;
}

.countdown-divider {
  width: 1px;
  height: 42px;
  background: var(--line);
}

.day-section {
  padding-block: clamp(92px, 12vw, 156px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: end;
  gap: clamp(50px, 10vw, 150px);
}

.section-intro h2,
.gift-copy h2 {
  max-width: 530px;
  margin-bottom: 18px;
  font-size: clamp(2.75rem, 5vw, 4.65rem);
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.section-intro > p:last-child,
.gift-copy > p:not(.eyebrow) {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
}

.day-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.detail-block {
  min-height: 138px;
  padding-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.detail-index {
  color: var(--accent);
  font-size: 0.73rem;
  font-variant-numeric: tabular-nums;
}

.detail-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 650;
}

.detail-block p {
  max-width: 180px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.gift-section {
  padding-bottom: clamp(90px, 12vw, 148px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(48px, 10vw, 140px);
}

.gift-image {
  height: clamp(350px, 44vw, 540px);
}

.gift-image img {
  object-position: 50% 56%;
}

.gift-copy {
  max-width: 520px;
  padding-block: 24px;
}

.gift-copy h2 {
  margin-bottom: 22px;
}

.gift-copy > p:not(.eyebrow) {
  margin-bottom: 30px;
  line-height: 1.75;
}

.site-footer {
  min-height: 126px;
  padding: 28px max(32px, calc((100% - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.footer-names {
  font-size: 1.35rem;
  text-decoration: none;
}

.footer-names span {
  color: var(--accent);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.back-to-top {
  white-space: nowrap;
}

.back-to-top span {
  padding-left: 5px;
  color: var(--accent);
}

.gift-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--text);
  box-shadow: 0 22px 70px rgb(22 37 29 / 22%);
}

.gift-dialog::backdrop {
  background: rgb(17 28 22 / 54%);
  backdrop-filter: blur(3px);
}

.gift-dialog form {
  position: relative;
}

.dialog-close {
  position: absolute;
  top: -21px;
  right: -17px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
}

.gift-dialog .eyebrow {
  margin-bottom: 14px;
}

.gift-dialog h2 {
  margin-bottom: 12px;
  font-size: 2.5rem;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.gift-dialog p:not(.eyebrow) {
  color: var(--muted);
}

.gift-dialog .dialog-note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.dialog-done {
  margin-top: 6px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .hero-copy {
  animation: arrive 700ms both;
}

.js .hero-image {
  animation: arrive 850ms 100ms both;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --page: #18251f;
    --surface: #22332a;
    --text: #edf2ed;
    --muted: #b6c4ba;
    --accent: #d29aa3;
    --accent-hover: #bd7e89;
    --line: #405248;
  }

  .button-primary {
    color: #18251f;
  }
}

@media (max-width: 820px) {
  .page-width,
  .countdown-inner,
  .site-header {
    width: min(100% - 40px, 620px);
  }

  .hero {
    min-height: auto;
    padding-block: 34px 72px;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-copy {
    padding-top: 18px;
  }

  h1 {
    font-size: clamp(4rem, 12vw, 6.1rem);
  }

  .hero-image {
    height: min(112vw, 560px);
  }

  .countdown-inner {
    min-height: 150px;
  }

  .day-section {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .gift-section {
    grid-template-columns: 1fr 0.9fr;
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .page-width,
  .countdown-inner,
  .site-header {
    width: calc(100% - 40px);
  }

  .site-header {
    min-height: 68px;
  }

  .wordmark-mark {
    font-size: 1.12rem;
    letter-spacing: -0.045em;
    white-space: nowrap;
  }

  .main-nav {
    gap: 14px;
  }

  .main-nav a {
    font-size: 0.76rem;
  }

  .hero {
    padding-top: 30px;
    gap: 36px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 0.68rem;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(3.7rem, 15vw, 5.3rem);
  }

  .hero-description {
    max-width: 370px;
    margin-bottom: 24px;
    font-size: 0.97rem;
  }

  .hero-image {
    height: 108vw;
    max-height: 470px;
  }

  .countdown-inner {
    padding-block: 30px;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .countdown-heading {
    max-width: none;
    font-size: 1.24rem;
  }

  .countdown {
    width: 100%;
    justify-content: space-between;
    gap: 15px;
  }

  .countdown-unit {
    min-width: 52px;
  }

  .countdown-number {
    font-size: 2.3rem;
  }

  .countdown-divider {
    height: 34px;
  }

  .day-section {
    padding-block: 88px;
    gap: 36px;
  }

  .section-intro h2,
  .gift-copy h2 {
    font-size: clamp(2.8rem, 11vw, 3.8rem);
  }

  .day-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-block {
    min-height: 112px;
  }

  .gift-section {
    padding-bottom: 86px;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .gift-image {
    height: 78vw;
    max-height: 390px;
  }

  .gift-copy {
    padding-block: 0;
  }

  .site-footer {
    padding: 26px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-footer p {
    font-size: 0.8rem;
  }

  .back-to-top {
    margin-top: 6px;
  }

  .gift-dialog {
    padding: 30px 24px;
  }

  .dialog-close {
    right: -10px;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
