/* Napkind on the web: the same colour roles as the app (Napkind/Design/Theme.swift). */
@font-face {
  font-family: "Permanent Marker";
  src: url("/assets/PermanentMarker-Regular.ttf") format("truetype");
  font-display: block;
}

:root {
  --sky: #E2EBF5; --paper: #FAF7F1; --raised: #FAF7F1;
  --ink: #16233D; --ink-2: #45556F; --accent: #3557A0; --on-accent: #F6F8FC;
  --shadow: 22, 35, 61; --pen: #1F2E6E; --lunch-pen: #B8382B; --coffee: #9A6538; --emboss-edge: #E6E0D3;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #111A2B; --paper: #E9E4DA; --raised: #1D2940;
    --ink: #E7EDF6; --ink-2: #A4B1C6; --accent: #93B1EC; --on-accent: #111A2B;
    --shadow: 0, 0, 0; --emboss-edge: #D6CFC1;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--sky); color: var(--ink); }
body {
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
.page {
  max-width: 460px; margin: 0 auto; min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.marker { font-family: "Permanent Marker", "Marker Felt", cursive; color: var(--accent); text-transform: uppercase; line-height: 1; }
.wordmark { font-size: 22px; text-decoration: none; display: inline-block; transform: rotate(-3deg); transform-origin: left; }
.who { margin-top: 34px; }
.who .name {
  font-size: clamp(52px, 17vw, 76px); display: block; transform: rotate(-4deg); transform-origin: left;
  white-space: nowrap; overflow: visible;
}
.who .line { margin-top: 10px; font-size: 20px; color: var(--ink-2); }

.napkin-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 26px 4px 20px; }
.napkin {
  position: relative; width: 100%; aspect-ratio: 1 / 1.04; transform: rotate(-2deg);
  filter: drop-shadow(0 1px 0.5px rgba(var(--shadow), 0.10)) drop-shadow(0 10px 9px rgba(var(--shadow), 0.14));
}
.napkin canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.meta { font-size: 16px; color: var(--ink-2); margin: 4px 0 14px; }

.play { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.play button {
  width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; cursor: pointer;
}
.play button svg { width: 22px; height: 22px; fill: currentColor; }
.play .time { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

.write-back {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 18px;
}
.write-back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.small-print { text-align: center; font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }

a { color: var(--accent); }
.missing { margin-top: 60px; color: var(--ink-2); }
.missing h1 { font-weight: 600; font-size: 22px; color: var(--ink); }

.hidden { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade-in 0.6s ease both; }
  @keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }
}

/* MARK: The site (home, privacy, terms, support) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.site { line-height: 1.5; }
.site-header, .site main, .site-footer { max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: 8px;
}
.site-header nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.site-header nav a { color: var(--ink-2); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.site h1, .site h2 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }

.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; margin: 0 0 22px; }
.hero .lede { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.hero-today { margin: 0; }
.hero-date { margin: 0 0 4px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.hero-name { font-size: clamp(56px, 8vw, 84px); margin: 0 0 18px; transform: rotate(-4deg); transform-origin: left; }
.hero-today .napkin { transform: rotate(3deg); max-width: 440px; }
.hero-today figcaption { margin-top: 22px; font-size: 15px; color: var(--ink-2); }

.waitlist { display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; }
.waitlist input[type=email] {
  flex: 1 1 200px; min-width: 0; min-height: 52px; padding: 0 20px; border-radius: 999px; font: inherit; font-size: 17px;
  border: 1.5px solid rgba(var(--shadow), 0.18); background: var(--raised); color: var(--ink);
}
.waitlist input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.waitlist button {
  flex: 0 0 auto; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--on-accent); cursor: pointer;
}
.waitlist button:disabled { opacity: 0.6; }
.waitlist .form-note { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--ink-2); min-height: 0; }
.waitlist .done { margin: 0; font-weight: 600; color: var(--ink); }
.soon { font-size: 15px; color: var(--ink-2); margin: 12px 0 0; }

.day { padding: 40px 0; display: flex; flex-direction: column; gap: 96px; }
.moment { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.moment:nth-child(even) .moment-words { order: 2; }
.moment .time {
  font-family: "Permanent Marker", "Marker Felt", cursive; color: var(--accent); font-size: 22px;
  margin: 0 0 8px; text-transform: uppercase; transform: rotate(-3deg); transform-origin: left; display: inline-block;
}
.moment h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 750; margin: 0 0 14px; }
.moment p { color: var(--ink-2); font-size: 18px; margin: 0; max-width: 30em; }
.screen {
  display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 30px;
  box-shadow: 0 1px 2px rgba(var(--shadow), 0.10), 0 18px 40px rgba(var(--shadow), 0.16);
}
.screens { display: flex; gap: 22px; align-items: flex-start; justify-content: center; }
.screens .screen { max-width: 240px; margin: 0; }

.small-things { padding: 48px 0; }
.small-things h2 { font-size: 30px; margin: 0 0 26px; }
.small-things ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.small-things li { background: var(--raised); border-radius: 16px; padding: 20px 22px; color: var(--ink-2); font-size: 16px; }
.small-things li strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

.closing { padding: 56px 0 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 22px; }
.closing .waitlist { justify-content: center; }

.site-footer { padding-top: 30px; padding-bottom: max(30px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: inherit; }
.site-footer .credits { font-size: 12.5px; opacity: 0.85; }

/* Privacy, terms and support */
.prose { max-width: 680px; padding-top: 30px; padding-bottom: 40px; }
.prose h1 { font-size: clamp(34px, 5vw, 46px); font-weight: 800; margin: 10px 0 6px; }
.prose .updated { color: var(--ink-2); font-size: 15px; margin: 0 0 30px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 17px; margin: 22px 0 6px; color: var(--ink); }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(var(--shadow), 0.12); color: var(--ink-2); }
.prose th { color: var(--ink); font-weight: 600; }
.prose details { background: var(--raised); border-radius: 14px; padding: 16px 20px; margin: 10px 0; }
.prose summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 17px; }
.prose details p { margin: 10px 0 0; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; }
  .hero-today .napkin { max-width: 100%; }
  .moment { grid-template-columns: 1fr; gap: 28px; }
  .moment:nth-child(even) .moment-words { order: 0; }
  .day { gap: 72px; }
  .screen { max-width: 280px; }
  .screens .screen { max-width: 46%; }
  .small-things ul { grid-template-columns: 1fr; }
}
