@font-face {
  font-family: "Cormorant Garamond";
  src: url("./assets/cormorant.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./assets/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #fcf7f2;
  --ink: #442b2b;
  --muted: #735956;
  --wine: #8b3d51;
  --wine-deep: #743043;
  --line: #ead9d0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button { font: inherit; }
a { color: inherit; }
p, h1, h2 { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--wine-deep); outline-offset: 4px; }

.container {
  width: min(1180px, calc(100% - 104px));
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--line); }
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  color: var(--wine-deep);
  font: italic 700 1.7rem/1 var(--serif);
  text-decoration: none;
}
.wordmark span { font: 400 1.55rem/1 Georgia, serif; }
.season, .eyebrow {
  color: var(--wine-deep);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.season {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.season span { color: #a1744d; font-size: .87rem; }

.hero {
  display: grid;
  grid-template-columns: .96fr 1.04fr;
  min-height: 435px;
  margin-top: 32px;
  border: 1px solid #eed7ce;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(ellipse at 12% 12%, #fcf1e9, transparent 78%), #f5e1db;
}
.hero-copy {
  padding: 47px clamp(30px, 5.2vw, 76px);
  align-self: center;
}
.hero .eyebrow { display: flex; align-items: center; gap: .65rem; }
.hero .eyebrow span { color: #a37056; font-size: .9rem; }
.hero h1 {
  margin-top: 19px;
  font: 600 clamp(4rem, 7.2vw, 6.2rem)/.78 var(--serif);
  letter-spacing: -.055em;
}
.hero h1 em { color: var(--wine); font-weight: 600; }
.hero-description {
  max-width: 300px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.54;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 45px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--wine);
  color: #fff9f5;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease;
}
.hero .primary-button { margin-top: 23px; }
.primary-button:hover { background: var(--wine-deep); }
.primary-button span { font: 400 1.1rem/1 var(--sans); }
.hero-picture { position: relative; background: #a05b59; }
.hero-picture img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 51%;
}

.calendar { margin-top: 45px; scroll-margin-top: 24px; }
.calendar-heading {
  display: flex;
  gap: 1.25rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 23px;
}
.calendar h2, .surprise h2:not(.eyebrow) {
  font: 650 clamp(2.55rem, 4.3vw, 3.55rem)/.92 var(--serif);
  letter-spacing: -.044em;
}
.calendar-heading p {
  margin-top: 9px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
}
.progress {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 10px 14px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffaf6;
  color: var(--wine-deep);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.progress-heart { font: 400 1.6rem/1 Georgia, serif; }
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 5px;
  border: 0;
  border-radius: 10px;
  color: var(--wine);
  background: #eedbd3;
}
progress::-webkit-progress-bar { border-radius: 10px; background: #eedbd3; }
progress::-webkit-progress-value { border-radius: 10px; background: var(--wine); }
progress::-moz-progress-bar { border-radius: 10px; background: var(--wine); }
.calendar-status { margin-block: 1rem; color: var(--muted); }

.doors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.door {
  --door-bg: #efc7cc;
  --door-light: #f8d9db;
  --door-ink: #753849;
  --door-line: #ab6f7b8c;
  --door-accent: #9a5665;
  --door-edge: #d6a6ae;
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  min-height: 134px;
  aspect-ratio: 1.03;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 17px 8px 12px;
  border: 1px solid var(--door-edge);
  border-radius: 13px;
  background: radial-gradient(ellipse at 30% 0, var(--door-light), transparent 77%), var(--door-bg);
  color: var(--door-ink);
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.door:hover { transform: translateY(-3px); box-shadow: 0 8px 18px #6b374027; }
.door:active { transform: translateY(0); }
.door[data-theme="cranberry"] {
  --door-bg: #923f54; --door-light: #ad5a6b; --door-ink: #fff4e7;
  --door-line: #ffded285; --door-accent: #ffd8bd; --door-edge: #9b4b5d;
}
.door[data-theme="pine"] {
  --door-bg: #d8dfcd; --door-light: #e8ecdf; --door-ink: #405541;
  --door-line: #687d628c; --door-accent: #5c735b; --door-edge: #b8c6b2;
}
.door[data-theme="cream"] {
  --door-bg: #f7e6cd; --door-light: #fff1db; --door-ink: #795139;
  --door-line: #a7815787; --door-accent: #976746; --door-edge: #ddc3a2;
}
.door[data-theme="mauve"] {
  --door-bg: #e9ced3; --door-light: #f5e0e4; --door-ink: #704252;
  --door-line: #9b647982; --door-accent: #92596d; --door-edge: #cfacb7;
}
.door[data-theme="wine"] {
  --door-bg: #733144; --door-light: #8c4559; --door-ink: #fff4ec;
  --door-line: #f5d5c880; --door-accent: #f2cbb0; --door-edge: #78364a;
}
.door[data-theme="forest"] {
  --door-bg: #526953; --door-light: #667b5e; --door-ink: #fff7e7;
  --door-line: #f0ead18a; --door-accent: #fae2ab; --door-edge: #526c54;
}
.door-frame, .door-frame::after {
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid var(--door-line);
  border-radius: 7px;
  pointer-events: none;
}
.door-frame::after { content: ""; inset: 3px; border-radius: 5px; opacity: .45; }
.door-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--door-accent);
  margin-bottom: 5px;
}
.door-decoration::before, .door-decoration::after {
  content: "";
  width: 15px;
  height: 1px;
  background: var(--door-line);
}
.door-motif { font: 400 1.24rem/1 Georgia, serif; }
.door-number {
  font: 600 clamp(2.8rem, 4.5vw, 4rem)/.82 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: -.04em;
}
.door-label {
  margin-top: 10px;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.door-state {
  position: absolute;
  top: 17px;
  right: 15px;
  display: grid;
  min-width: 19px;
  min-height: 19px;
  place-items: center;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
}
.door[data-state="locked"] .door-state { opacity: .8; }
.door[data-state="available"] .door-state { font-size: 1rem; }
.door[data-state="opened"] .door-state {
  border: 1px solid var(--door-line);
  border-radius: 50%;
  font-size: .75rem;
}
.door[data-state="today"] {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}
.door[data-state="today"] .door-state {
  min-height: 17px;
  padding-inline: 5px;
  border-radius: 3px;
  background: #fff6ee;
  color: var(--wine-deep);
}
.door:focus-visible { outline: 3px solid var(--wine-deep); outline-offset: 4px; }
.lock {
  position: relative;
  display: block;
  width: 10px;
  height: 8px;
  margin-top: 3px;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.lock::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 1px;
  width: 6px;
  height: 5px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.site-footer {
  margin-top: 48px;
  padding-block: 23px 29px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: .82rem;
}
.site-footer span { margin-right: .25rem; color: var(--wine); }

.surprise {
  width: min(490px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid #e6c7c2;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 84px #3e182b46;
  overflow: auto;
}
.surprise::backdrop { background: #3a2026a8; backdrop-filter: blur(3px); }
.surprise-content { position: relative; }
.surprise-close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
}
.surprise-close button {
  display: grid;
  width: 40px;
  height: 40px;
  place-content: center;
  padding: 0;
  border: 1px solid #dbbdb8;
  border-radius: 50%;
  background: var(--paper);
  color: var(--wine-deep);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
.surprise-photo { background: #f1dfd8; }
.surprise-photo img {
  width: 100%;
  height: min(47dvh, 330px);
  object-fit: contain;
  background: #382227;
}
#photo-error { padding: 55px 24px 35px; color: var(--muted); text-align: center; }
.surprise-copy { padding: 29px 30px 32px; text-align: center; }
.surprise h2:not(.eyebrow) { margin-top: 9px; font-size: clamp(2.35rem, 7vw, 3.25rem); }
#surprise-message {
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.surprise-copy .primary-button { margin-top: 23px; }
.surprise-lock {
  display: grid;
  width: 49px;
  height: 49px;
  margin: 4px auto 14px;
  place-items: center;
  border-radius: 50%;
  background: #f2dedb;
  color: var(--wine);
}
.surprise-lock .lock { transform: scale(1.6); }
body:has(.surprise[open]) { overflow: hidden; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
  .hero { min-height: 393px; }
}
@media (max-width: 850px) {
  .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { min-height: 350px; }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 32px); }
  .header-content { min-height: 58px; }
  .hero { grid-template-columns: 1fr; min-height: auto; margin-top: 18px; border-radius: 16px; }
  .hero-copy { padding: 34px 25px; }
  .hero h1 { font-size: clamp(3.9rem, 14vw, 5.25rem); }
  .hero-description { margin-top: 19px; }
  .hero .primary-button { margin-top: 18px; }
  .hero-picture { aspect-ratio: 1.47; }
  .calendar { margin-top: 33px; }
  .calendar-heading { flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 17px; }
  .door-number { font-size: 3.35rem; }
  .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .site-footer { margin-top: 36px; }
}
@media (max-width: 420px) {
  .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .door { aspect-ratio: 1.12; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .door, .primary-button { transition: none; }
  .door:hover { transform: none; }
}
