/* Reuse the bundled variable fonts without changing other calendar pages. */
@font-face {
  font-family: "Nunito Letter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito Letter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --cream: #fff0d2;
  --ink: #405c26;
  --muted: #866a4c;
  --rose: #b76563;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  touch-action: pan-x pan-y;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: var(--cream); }
html, body { overflow-x: clip; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 95% 15%, #efd0ab66, transparent 55%),
    radial-gradient(ellipse at 0% 85%, #f6dbbe77, transparent 60%);
}
.entrance-page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
}
html[data-access-stage="welcome"] #access-page,
html[data-access-stage="ready"] .entrance-page,
html:not([data-access-stage="welcome"]) #welcome-page { display: none; }
.secret-card, .welcome-letter { width: 100%; max-width: 350px; text-align: center; animation: appear 600ms ease both; }
.eyebrow { margin: 0 0 24px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.envelope {
  position: relative;
  perspective: 600px;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 136px;
  height: 94px;
  margin: 42px auto 36px;
  border: 1px solid #c9ab7f;
  border-radius: 9px;
  background: linear-gradient(145deg, #fff8e9, #f3dfb9);
  box-shadow: 0 14px 26px #886b4220, 0 2px 3px #886b4210;
  transform: rotate(-7deg);
}
.envelope-letter {
  position: absolute;
  z-index: 1;
  inset: 8px 12px 10px;
  border: 1px solid #e4d3b3;
  border-radius: 5px;
  background: #fffaf0;
}
.envelope-letter::before {
  content: "♥";
  display: block;
  margin-top: 8px;
  color: var(--rose);
  font-size: 15px;
}
.envelope-letter::after {
  content: "";
  position: absolute;
  inset: 35px 18px 10px;
  background: repeating-linear-gradient(to bottom, #d5bd9466 0 1px, transparent 1px 9px);
}
.envelope-front {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff4de, #f3dfb9);
  clip-path: polygon(0 0, 50% 49%, 100% 0, 100% 100%, 0 100%);
}
.envelope-flap {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  height: 60px;
  background: linear-gradient(160deg, #fff8e9, #efdab4);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: center top;
}
.envelope-seal {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff0d2;
  font-size: 20px;
  box-shadow: 0 2px 4px #864b3a25;
}
.is-opening .envelope { animation: envelope-lift 650ms ease both; }
.is-opening .envelope-seal { animation: seal-release 180ms ease both; }
.is-opening .envelope-flap { animation: flap-open 400ms 90ms ease both; }
.is-opening .envelope-letter { animation: paper-rise 420ms 250ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.secret-card.is-opening { animation: secret-away 150ms 630ms ease both; }
.secret-card.is-opening > .eyebrow { animation: secret-away 120ms ease both; }
.little-note { margin: 0 0 12px; color: var(--rose); font-size: 12px; font-weight: 700; }
h1 { margin: 0; font-size: 40px; font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
h1 em { font-style: normal; color: var(--rose); }
.secret-copy { margin: 22px 0 26px; font-size: 15px; line-height: 1.65; color: var(--muted); }
form { text-align: left; }
label { display: block; margin: 0 0 8px 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
input { width: 100%; min-height: 50px; border: 1px solid #cbb48e; border-radius: 15px; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--ink); background: #fffbf1bb; outline: none; }
input::placeholder { color: #9c866a; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px #405c2614; }
input[aria-invalid="true"] { border-color: var(--rose); }
.access-error { min-height: 28px; margin: 6px 3px 4px; color: #a34a4a; font-size: 12px; line-height: 1.3; }
button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; border: 1px solid #344d20; border-radius: 16px; padding: 12px 16px; background: var(--ink); color: #fff8e8; font: inherit; font-size: 16px; font-weight: 800; box-shadow: 0 6px 14px #405c261a; cursor: pointer; transition: transform 160ms ease, background 160ms ease; }
button:active { transform: scale(0.98); background: #344d20; }
button:focus-visible { outline: 3px solid var(--rose); outline-offset: 4px; }
.secret-footer { margin: 28px auto 0; max-width: 240px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.secret-footer span { color: var(--rose); }
.welcome-letter { padding: 28px 20px 22px; background: #fff9ebbb; border: 1px solid #d5bd9466; border-radius: 80px 80px 24px 24px; box-shadow: 0 12px 44px #886b420c; }
.letter-ornament { margin-bottom: 22px; font-size: 20px; color: #bb9c6d; }
.letter-ornament span { margin: 0 14px; color: var(--rose); }
.welcome-letter .eyebrow { margin-bottom: 18px; font-size: 10px; }
.welcome-letter h1 { font-size: 42px; outline: none; }
.letter-copy {
  margin: 24px 0 22px;
  font-family: "Nunito Letter", "Nunito", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: #66503a;
}
.letter-copy p { margin: 0 0 16px; }
.letter-copy p:last-child { margin-bottom: 0; }
.letter-signature { margin: 0 0 26px; color: var(--rose); font-size: 22px; font-weight: 800; }
.letter-signature span { font-size: 16px; }
.welcome-letter button { font-size: 15px; }
.letter-postscript { margin: 16px auto 0; max-width: 220px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.no-script { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px; background: var(--cream); text-align: center; }
@keyframes appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes envelope-lift {
  from { transform: rotate(-7deg); }
  to { transform: translateY(-4px) rotate(0); }
}
@keyframes seal-release {
  to { opacity: 0; transform: translateY(-4px) scale(1.2); }
}
@keyframes flap-open {
  0% { transform: rotateX(0); z-index: 4; }
  50% { z-index: 4; }
  51%, 100% { z-index: 0; }
  100% { transform: rotateX(175deg); }
}
@keyframes paper-rise {
  to { transform: translateY(-55px) rotate(2deg); }
}
@keyframes secret-away { to { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
