:root {
  color-scheme: light;
  --ink: #3e302e;
  --muted: #8d7771;
  --rose: #bd6f70;
  --paper: #fffaf5;
  --background: #f7eee7;
  --green: #536f5a;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 9%, #fff8f1 0, transparent 32rem),
    radial-gradient(ellipse at 90% 75%, #eddfd5 0, transparent 30rem),
    var(--background);
  font-family: "DM Sans", sans-serif;
}

button {
  font: inherit;
}

.page {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 66px 0 34px;
}

.intro {
  margin-bottom: 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
.surprise h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  line-height: 1.03;
}

h1 span {
  color: var(--rose);
  font-style: italic;
}

.subtitle {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.calendar {
  position: relative;
  overflow: hidden;
  padding: 24px clamp(18px, 5vw, 44px) 25px;
  border: 1px solid #e8d8cc;
  border-radius: 24px;
  background: rgb(255 250 245 / 88%);
  box-shadow: 0 20px 55px rgb(95 61 48 / 10%);
}

.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--green);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.12rem;
  font-style: italic;
}

.heading-heart {
  color: var(--rose);
  font-family: sans-serif;
  font-size: 0.8rem;
}

.doors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.door {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid #e8d2c4;
  border-radius: 14px;
  color: var(--ink);
  background: #f4e4d8;
  box-shadow: 0 4px 0 #e7d2c4;
  cursor: pointer;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.door:nth-child(3n + 1) {
  background: #e8eee4;
  border-color: #d3ddce;
  box-shadow: 0 4px 0 #d3ddce;
}

.door:nth-child(4n + 2) {
  background: #f0e5e9;
  border-color: #e2d3d9;
  box-shadow: 0 4px 0 #e2d3d9;
}

.door:hover {
  z-index: 1;
  transform: translateY(-3px) rotate(-2deg);
}

.door:focus-visible,
.close-button:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

.door.is-opened {
  color: white;
  background: var(--rose);
  border-color: var(--rose);
  box-shadow: 0 4px 0 #a85e60;
}

.calendar-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

footer {
  margin-top: 23px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: center;
}

footer span {
  padding: 0 7px;
  color: var(--rose);
}

.surprise {
  width: min(90vw, 400px);
  padding: 37px 32px 32px;
  border: 1px solid #ead9cd;
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 70px rgb(54 35 29 / 25%);
  text-align: center;
}

.surprise::backdrop {
  background: rgb(49 38 36 / 48%);
  backdrop-filter: blur(3px);
}

.surprise form {
  position: absolute;
  top: 12px;
  right: 14px;
}

.close-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f3e8e1;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.surprise-day {
  margin: 0;
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.surprise h2 {
  margin: 10px 0;
  font-size: 1.9rem;
}

.surprise-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.surprise-heart {
  display: inline-block;
  margin-top: 22px;
  color: var(--rose);
  font-size: 1.3rem;
}

@media (max-width: 520px) {
  .page {
    padding-top: 46px;
  }

  .intro {
    margin-bottom: 26px;
  }

  .subtitle {
    max-width: 300px;
    margin-right: auto;
    margin-left: auto;
    line-height: 1.55;
  }

  .calendar {
    padding: 21px 16px 22px;
    border-radius: 19px;
  }

  .doors {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .door {
    min-height: 66px;
    border-radius: 12px;
    font-size: 1.35rem;
  }
}

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