@font-face {
  font-family: Fraunces;
  src: url('./assets/fraunces.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url('./assets/fraunces-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('./assets/dm-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fcf7f0;
  --ink: #39252e;
  --muted: #6c525d;
  --wine: #8a374d;
  --wine-dark: #6f283b;
  --rose: #f5adc0;
  --border: #ead9d4;
  --serif: Fraunces, Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 18rem; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #b14965; outline-offset: 4px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(100% - 5rem, 72rem); margin-inline: auto; }
.site-header { min-height: 5.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; width: max-content; font: 600 1.32rem/1.1 var(--serif); letter-spacing: -.055em; }
.brand-icon { display: grid; place-items: center; margin-right: .52rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #f8e2e4; color: #a14a64; font: .84rem/1 var(--sans); letter-spacing: 0; }
.wordmark-dot { color: #af5b70; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.55rem); }
.nav-link { background: none; border: 0; padding: .7rem .1rem; color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.nav-link:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .28rem; }
.header-stamp { justify-self: end; color: var(--wine); border: 1px solid #e9ccd0; border-radius: 999px; padding: .54rem .82rem; font-size: .77rem; font-weight: 700; white-space: nowrap; }
.header-stamp span { margin-right: .17rem; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 32.5rem;
  overflow: hidden;
  border-radius: 1.6rem;
  background: radial-gradient(ellipse at 74% 46%, #382336, transparent 60%), #241924;
  color: #fff5eb;
}

.hero::after { position: absolute; z-index: 2; inset: .68rem; border: 1px solid #f5cbd033; border-radius: 1.12rem; pointer-events: none; content: ''; }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 42%; display: grid; place-items: center; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 19%, #000 94%, transparent); }
.hero-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; mask-image: linear-gradient(0deg, transparent, #000 13%, #000 87%, transparent); }
.hero-content { padding: 4.25rem clamp(2.5rem, 6.2vw, 5.6rem); max-width: 42rem; }
.eyebrow { margin: 0; font-size: .79rem; font-weight: 700; letter-spacing: .155em; line-height: 1.4; text-transform: uppercase; }
.hero-kicker { display: flex; gap: .66rem; align-items: center; color: #efc5c8; }
.hero-kicker span { width: 1.55rem; height: 1px; background: #d58b9f; }
.hero h1 { margin: 1.13rem 0 1.12rem; font: 500 clamp(3.45rem, 6.8vw, 6rem)/.99 var(--serif); letter-spacing: -.074em; word-spacing: .045em; }
.hero h1 em { color: var(--rose); font-weight: 500; white-space: nowrap; }
.hero-description { max-width: 24rem; margin: 0 0 1.75rem; font-size: 1.06rem; line-height: 1.65; color: #f5dedf; }

.button { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; gap: .5rem; padding: .66rem 1rem; border: 1px solid transparent; border-radius: .7rem; font-size: .91rem; font-weight: 700; white-space: nowrap; transition: background-color 180ms, color 180ms, transform 180ms, box-shadow 180ms; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.hero-button { padding-inline: 1.27rem; min-height: 3.05rem; background: #f5b4c2; color: #492532; box-shadow: 0 6px 25px #1b131873; }
.hero-button:hover { background: #ffd0d8; }
.hero-button:focus-visible { outline-color: #fff2e4; }
.hero-button span { font-size: .94rem; }
.hero-star { position: absolute; z-index: 1; right: 1.6rem; bottom: 1.35rem; color: #efc1c7; font-size: 1.1rem; }

.focus-section { margin-top: 4.65rem; scroll-margin-top: 2rem; }
.section-heading { text-align: center; margin-bottom: 2.25rem; }
.section-kicker { color: var(--wine); }
.section-kicker span { margin-right: .25rem; }
.section-heading h2 { margin: .62rem 0 .5rem; font: 500 clamp(2.35rem, 4.3vw, 3.6rem)/1.1 var(--serif); letter-spacing: -.071em; }
.section-heading h2 em { color: var(--wine); font-weight: 500; white-space: nowrap; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.room-card { min-width: 0; padding: clamp(1.35rem, 3.35vw, 2.35rem); border: 1px solid var(--border); border-radius: 1.35rem; box-shadow: 0 7px 24px #643e4810; }
.task-card { background: #fffdf8; }
.timer-card { background: #faecee; }
.card-icon { width: 2.45rem; height: 2.45rem; display: grid; place-items: center; flex: none; border-radius: .72rem; background: #fae4e7; color: var(--wine); font-size: 1.18rem; }
.task-icon { margin-bottom: .75rem; }
.room-card h3 { margin: 0; font: 600 clamp(1.42rem, 2.6vw, 1.92rem)/1.14 var(--serif); letter-spacing: -.045em; }
.card-copy { margin: .49rem 0 0; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.task-form { margin-top: 1.08rem; display: flex; align-items: stretch; gap: .6rem; }
.task-form input { flex: 1; min-width: 0; min-height: 2.85rem; padding: .6rem .8rem; color: var(--ink); border: 1px solid #dfc8c9; border-radius: .66rem; background: #fffcf8; font-size: 1rem; }
.task-form input::placeholder { color: #7b626a; }
.primary-button { background: var(--wine); color: #fff9f4; }
.primary-button:hover { background: var(--wine-dark); }
.task-status { margin: .68rem 0 0; min-height: 1.33rem; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.saved-task { display: flex; align-items: center; gap: .72rem; margin-top: 1.08rem; min-height: 2.85rem; padding: .5rem .75rem; border: 1px solid #dfc8c9; border-radius: .66rem; }
.saved-label { display: flex; flex: 1; min-width: 0; align-items: center; gap: .53rem; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.saved-label input { flex: none; margin: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--wine); }
.saved-label input:checked + span { text-decoration: line-through; color: var(--muted); }
.task-actions { display: flex; align-items: center; }
.text-button { padding: .4rem; border: 0; background: transparent; color: var(--wine); font-weight: 700; font-size: .9rem; }
.text-button:hover { text-decoration: underline; }

.timer-heading { display: flex; align-items: center; gap: .8rem; }
.timer-icon { background: #f4dce2; }
.timer-icon span { width: 1.06rem; height: 1.06rem; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.timer-icon span::after { position: absolute; top: .16rem; left: .4rem; width: .25rem; height: .33rem; border: solid currentColor; border-width: 0 0 1.5px 1.5px; content: ''; }
.timer-settings { display: flex; flex-wrap: wrap; gap: .34rem; margin-top: 1.07rem; }
.timer-settings button { min-height: 2.1rem; padding: .25rem .65rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 700; }
.timer-settings button:hover { background: #f3dce1; }
.timer-settings button[aria-pressed='true'] { background: #fff9f5; border-color: #e5c2cb; color: var(--wine-dark); }
.timer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .65rem; }
.timer-value { display: block; font: 500 2.7rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.065em; }
.timer-buttons { display: flex; align-items: center; gap: .45rem; }
.timer-buttons .primary-button { min-width: 7.2rem; }
.icon-button { width: 2.75rem; padding: 0; background: #fff9f5; border-color: #e5c2cb; color: var(--wine); font-size: 1.45rem; }
.icon-button:hover { background: #f8dce1; }
.timer-track { margin-top: .9rem; height: .22rem; background: #e9cad3; border-radius: 2rem; overflow: hidden; }
#timer-progress { width: 100%; height: 100%; background: #a75169; border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform .28s linear; }

.pep-talk { display: flex; align-items: center; gap: 1.3rem; margin-top: 1.2rem; padding: 1.5rem 2rem; min-height: 7.4rem; border-radius: 1.15rem; border: 1px solid #efdfd2; background: #f8ede0; }
.pep-deco { flex: 0 0 3.3rem; height: 2.9rem; position: relative; color: #a76051; }
.pep-deco span { position: absolute; line-height: 1; }
.pep-deco span:nth-child(1) { top: .62rem; left: .08rem; font-size: 2.2rem; }
.pep-deco span:nth-child(2) { top: .12rem; left: 1.8rem; font-size: 1rem; }
.pep-deco span:nth-child(3) { top: 1.6rem; left: 2.2rem; font-size: .85rem; }
.pep-copy { flex: 1; }
.pep-copy h2 { color: var(--wine); }
.pep-copy p { margin: .36rem 0 0; font: italic 500 clamp(1.12rem, 2.3vw, 1.6rem)/1.25 var(--serif); letter-spacing: -.027em; }
.secondary-button { color: var(--wine-dark); background: #fffaf2; border-color: #e9ccc8; }
.secondary-button:hover { background: #f9dedf; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--border); margin-top: 3.25rem; min-height: 5.3rem; }
.footer-mark { font-size: 1.14rem; }
.site-footer p { font-size: .86rem; color: var(--muted); }

.letter-dialog { width: min(100% - 1.65rem, 34rem); max-height: calc(100% - 1.65rem); padding: 0; border: 1px solid #e8cace; border-radius: 1.25rem; background: #fff8ee; color: var(--ink); box-shadow: 0 25px 100px #1c0c1b70; }
.letter-dialog::backdrop { background: #231521b9; backdrop-filter: blur(6px); }
.letter-dialog[open] { animation: unfold .36s cubic-bezier(.2,.7,.3,1) both; }
body:has(.letter-dialog[open]) { overflow: hidden; }
.letter-paper { position: relative; padding: clamp(1.45rem, 5vw, 3rem); }
.letter-close { position: absolute; top: .82rem; right: .82rem; background: #f8e5e5; color: var(--wine); border: 0; border-radius: 50%; width: 2.4rem; height: 2.4rem; font-size: 1.5rem; line-height: 1; }
.letter-close:hover { background: #f2d4da; }
.letter-seal { display: grid; place-items: center; width: 2.55rem; height: 2.55rem; margin-bottom: .8rem; border-radius: 50%; color: #f7b3ca; background: radial-gradient(circle at 34% 24%, #b56375, #8a334a 72%); box-shadow: 0 3px 0 #e9c4c1; }
.letter-kicker { color: var(--wine); }
.letter-paper h2 { margin: .45rem 0 .85rem; font: 500 clamp(2.45rem, 7vw, 3.6rem)/1.04 var(--serif); letter-spacing: -.075em; }
.letter-paper > p:not(.eyebrow, .letter-signature) { color: var(--muted); margin: .72rem 0; font-size: 1rem; line-height: 1.65; }
.letter-signature { margin: .9rem 0 1.1rem; color: var(--wine); font: italic 500 1.7rem/1.1 var(--serif); }
.letter-done { min-height: 2.65rem; }
.celebration { position: fixed; z-index: 5; pointer-events: none; top: var(--y); left: var(--x); color: var(--petal); font-size: 1rem; animation: scatter .85s ease-out both; }

@keyframes unfold { from { opacity: 0; transform: translateY(1rem) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes scatter { from { opacity: 1; transform: translate(-50%, -50%) scale(.55); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--turn)) scale(1.2); } }

@media (max-width: 53rem) {
  .wrap { width: calc(100% - 2.5rem); }
  .hero { min-height: 28rem; }
  .hero-content { padding: 3.5rem 2.55rem; }
  .hero h1 { font-size: clamp(3.02rem, 8vw, 4.6rem); }
  .hero-art { inset-inline-start: 38%; }
  .hero-description { max-width: 19rem; }
  .room-card { padding: 1.3rem; }
}

@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .site-header { min-height: 4.5rem; grid-template-columns: 1fr auto; }
  .site-nav { gap: .7rem; }
  .nav-link { font-size: .8rem; }
  .site-header .wordmark { font-size: 1.16rem; }
  .header-stamp { display: none; }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: auto; }
  .hero-content { padding: 2.3rem 1.45rem 0; text-align: center; }
  .hero-art { position: relative; inset: auto; order: 2; width: 100%; height: clamp(14.5rem, 66vw, 23rem); margin-top: .25rem; mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent); }
  .hero-art img { object-fit: cover; object-position: 50% 51%; }
  .hero-kicker { justify-content: center; font-size: .7rem; }
  .hero h1 { font-size: clamp(2.4rem, 11.1vw, 4.45rem); margin-top: .8rem; }
  .hero-description { margin: 0 auto 1.15rem; font-size: .97rem; }
  .hero-star { right: 1.25rem; bottom: 1rem; }
  .focus-section { margin-top: 3.25rem; }
  .section-heading { margin-bottom: 1.45rem; }
  .room-grid { grid-template-columns: 1fr; gap: .8rem; }
  .pep-talk { display: grid; grid-template-columns: auto 1fr; gap: .85rem; padding: 1.1rem; margin-top: .85rem; }
  .pep-deco { width: 2.9rem; }
  .pep-talk .button { grid-column: 2; justify-self: start; min-height: 2.65rem; }
  .site-footer { margin-top: 2rem; }
}

@media (max-width: 23rem) {
  .site-header .nav-link:first-child { display: none; }
  .task-form { flex-wrap: wrap; }
  .task-form input { flex-basis: 100%; }
  .site-footer .brand-icon { display: none; }
}

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