/* The public homepage (storyden.io for visitors who aren't signed in). Builds on style.css:
   same paper, ink, indigo and amber, Fraunces and Figtree. Sections change shape as you scroll
   (collage, side by side, timeline, swipe strip, chips) so a phone never sees a stack of boxes. */
.welcome-page { overflow-x: hidden; }
.w { max-width: 1080px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.welcome-page h2 { font: 600 clamp(30px, 7.4vw, 44px)/1.1 var(--serif); letter-spacing: -0.015em; margin: 0 0 14px; }
.welcome-page h3 { font: 600 22px/1.25 var(--serif); margin: 0 0 6px; }
.welcome-page section { margin-top: 84px; }

.w-top { display: flex; align-items: center; justify-content: space-between; padding-top: calc(env(safe-area-inset-top) + 18px); }
.w-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 22px/1 var(--serif); }
.w-signin { color: var(--muted); font-weight: 700; text-decoration: none; padding: 10px 4px; }
.w-signin:hover { color: var(--accent); }

/* Hero: words on one side, a little pile of board notes on the other. */
.welcome-page .w-hero { margin-top: 36px; display: grid; gap: 40px; align-items: center; }
.w-hero h1 { font: 600 clamp(44px, 11vw, 72px)/1.02 var(--serif); letter-spacing: -0.03em; margin: 14px 0 18px; }
.w-lede { font-size: 21px; line-height: 1.55; color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.w-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.w-collage { position: relative; height: 470px; max-width: 520px; width: 100%; margin: 0 auto; }
.w-note {
  position: absolute; margin: 0; width: 74%; border-radius: 22px; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--lift);
}
.w-note img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.w-note figcaption { padding: 14px 18px 16px; }
.w-note q { display: block; font: 500 19px/1.35 var(--serif); quotes: "“" "”"; }
.w-note span { display: block; margin-top: 8px; font: italic 600 18px/1 var(--serif); color: var(--accent); }
.w-note span::before { content: "— "; }
.w-note.n1 { left: 0; top: 0; transform: rotate(-4deg); z-index: 1; }
.w-note.n2 { right: 0; top: 150px; width: 56%; transform: rotate(3deg); z-index: 3; }
.w-note.n3 { left: 10%; bottom: 0; width: 66%; transform: rotate(1.5deg); z-index: 2; background: #fff4e0; }
.w-note.ink { background: var(--ink); color: #fbf6ee; }
.w-note.ink figcaption { padding: 24px 22px 22px; }
.w-note.ink q { font-size: 23px; }
.w-note.ink q::before { color: var(--glow); }
.w-note.ink span { color: var(--glow); }

/* Signed card versus a board. */
.w-section-lede { font-size: 20px; line-height: 1.6; color: var(--muted); max-width: 40em; margin: 0 0 30px; }
.w-versus { display: grid; gap: 22px; }
.w-label { font: 500 14px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 14px; }
.w-card-signed {
  position: relative; padding: 24px 24px 30px; border-radius: 6px; background: #fffdf6; min-height: 250px;
  border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(-1deg);
}
.scrawl { margin: 0; font: 600 30px/1.15 Caveat, "Segoe Print", "Bradley Hand", cursive; color: #6b6478; }
.scrawl.s1 { transform: rotate(-6deg); margin: 8px 0 0 10%; color: #b2443a; }
.scrawl.s2 { transform: rotate(3deg); margin: 18px 0 0 38%; font-size: 26px; }
.scrawl.s3 { transform: rotate(-2deg); margin: 14px 0 0 2%; color: #2f6d4f; }
.scrawl.s4 { transform: rotate(5deg); margin: 16px 0 0 30%; font-size: 25px; color: #3b4fa0; }
.w-card-story {
  padding: 24px 26px 22px; border-radius: 26px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--lift); transform: rotate(0.6deg);
}
.w-story { font-size: 19px; line-height: 1.65; margin: 0 0 14px; }
.w-sig { margin: 0; font: italic 600 22px/1.2 var(--serif); color: var(--accent); }
.w-sig::before { content: "— "; }
.w-sig span { display: block; margin-top: 3px; font: 600 15px/1.3 var(--font); font-style: normal; color: var(--muted); }

/* How it works: a numbered path, not three cards. */
.w-steps ol { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 0; position: relative; }
.w-steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 30px; position: relative; align-content: start; }
.w-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 27px; top: 58px; bottom: 6px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--accent-edge) 0 6px, transparent 6px 12px);
}
.w-num {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glow); color: var(--ink); font: 600 26px/1 var(--serif);
}
.w-steps p { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.55; max-width: 36em; }

/* What they get: a swipe strip on phones, three across on wide screens. */
.w-gets-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 22px -20px 0; padding: 4px 20px 18px;
}
.w-gets-row::-webkit-scrollbar { display: none; }
.w-gets-row article {
  flex: 0 0 80%; scroll-snap-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); padding-bottom: 20px;
}
.w-gets-row article img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 16px; }
.w-gets-row h3, .w-gets-row p { padding: 0 20px; }
.w-gets-row p { margin: 0; color: var(--muted); line-height: 1.55; }
.w-gets-row .voice { background: var(--ink); color: #fbf6ee; }
.w-gets-row .voice p { color: rgba(251, 246, 238, 0.75); }
.w-wave { display: flex; align-items: center; justify-content: center; gap: 7px; aspect-ratio: 3 / 2; margin-bottom: 16px; }
.w-wave i { display: block; width: 9px; border-radius: 6px; background: var(--glow); height: 30%; animation: w-wave 1.4s ease-in-out infinite; }
.w-wave i:nth-child(2n) { height: 55%; animation-delay: -0.3s; }
.w-wave i:nth-child(3n) { height: 72%; animation-delay: -0.6s; }
.w-wave i:nth-child(4n) { height: 42%; animation-delay: -0.9s; }
@keyframes w-wave { 50% { transform: scaleY(0.55); } }

/* Occasions: chips that wrap. */
.w-occasions ul { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.w-occasions li {
  padding: 12px 18px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-edge);
  font-weight: 700; color: var(--ink);
}
.w-occasions li:nth-child(3n + 1) { background: #fff4e0; border-color: #f1cf92; }
.w-occasions li a { color: inherit; text-decoration-color: var(--accent-edge); text-underline-offset: 3px; }

/* Pricing: two plans side by side, the bigger one highlighted. */
.w-plans { display: grid; gap: 16px; margin-top: 8px; }
.w-plan {
  display: flex; flex-direction: column; gap: 4px; padding: 26px 24px; border-radius: 26px; text-decoration: none;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.w-plan:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.w-plan.big { background: var(--ink); color: #fbf6ee; border-color: var(--ink); }
.w-plan.big span { color: rgba(251, 246, 238, 0.78); }
.w-plan .w-price { font: 600 54px/1 var(--serif); letter-spacing: -0.03em; color: inherit; margin-bottom: 8px; }
.w-plan strong { font-size: 22px; font-weight: 800; }
.w-plan span { color: var(--muted); font-size: 18px; }
.w-plan .w-go { margin-top: 14px; font-weight: 800; color: var(--accent); }
.w-plan.big .w-go { color: var(--glow); }
.w-plan.big .w-price { color: #fbf6ee; }
.w-fine { color: var(--muted); margin: 16px 0 0; }

/* Early access. */
.w-early-card {
  padding: 30px 24px; border-radius: 30px; box-shadow: var(--lift); border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 0%, var(--glow-soft) 0%, var(--card) 70%);
}
.w-early-card > p { font-size: 19px; color: var(--muted); margin: 0 0 22px; max-width: 34em; }
.w-form { display: grid; gap: 14px; }
.w-form .field { margin: 0; }
.w-form-row { display: grid; gap: 14px; }
.w-form select, .w-form input[type="date"] { width: 100%; }
.w-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.w-result { margin: 0; font-weight: 700; min-height: 1em; }
.w-result.error { color: var(--danger); }
.w-thanks { font: 500 22px/1.4 var(--serif); margin: 4px 0; }

.w-legacy { padding-top: 34px; padding-bottom: 6px; border-top: 1.5px solid var(--line); }
.w-legacy p { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 38em; margin: 0 0 20px; }
.w-inline { max-width: 560px; }

.w-faq details { border-top: 1.5px solid var(--line); padding: 0 2px; }
.w-faq details:last-of-type { border-bottom: 1.5px solid var(--line); }
/* The whole row is the tap target, not just the line of text. */
.w-faq summary { font: 600 20px/1.35 var(--serif); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; min-height: 64px; }
.w-faq summary::-webkit-details-marker { display: none; }
.w-faq summary::after { content: "+"; color: var(--accent); font: 600 26px/1 var(--font); }
.w-faq details[open] summary::after { content: "–"; }
.w-faq details p { margin: -8px 0 18px; color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 40em; }

.w-foot {
  margin-top: 80px; padding-top: 26px; padding-bottom: calc(env(safe-area-inset-bottom) + 34px);
  border-top: 1.5px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  color: var(--muted); font-weight: 600;
}
.w-foot a:not(.w-brand) { color: var(--muted); font-weight: 700; }

/* Terms and Privacy: a reading page. */
.legal { max-width: 760px; padding-top: 28px; }
.legal h1 { font: 600 clamp(38px, 9vw, 54px)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 8px; }
.legal-date { color: var(--muted); font: 500 16px/1.4 var(--mono); margin: 0 0 28px; }
.legal h2 { font-size: clamp(25px, 6vw, 30px); margin: 44px 0 12px; }
.legal h3 { font-size: 21px; margin: 24px 0 8px; }
.legal p, .legal li { font-size: 19px; line-height: 1.6; max-width: 36em; }
.legal p { margin: 0 0 16px; }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal li { margin-bottom: 10px; }
.legal li::marker { color: var(--accent); }
.welcome-page .legal-short { margin-top: 0; }
.legal-short { padding: 22px 24px 8px; border-radius: 22px; background: var(--glow-soft); margin: 0 0 32px; }
.legal-short h2 { margin-top: 0; font-size: 24px; }
.legal :target { scroll-margin-top: 20px; }
.w-legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Occasion pages (/for/...) and the blog: reasons in a grid, related reading, article furniture. */
.w-reason-grid { display: grid; gap: 22px 32px; margin-top: 22px; }
.w-reason-grid > div { padding-left: 18px; border-left: 2px solid var(--accent-edge); }
.w-reason-grid p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.w-more-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.w-more-links li { padding: 18px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.w-more-links a { font: 600 21px/1.3 var(--serif); color: var(--ink); }
.w-more-links span { display: block; margin-top: 4px; color: var(--muted); }
.crumbs { margin: 0 0 10px; font: 500 15px/1.4 var(--mono); }
.crumbs a { color: var(--accent); text-decoration: none; }
.article-lede { font-size: 21px; line-height: 1.55; color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.toc a { padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; text-decoration: none; }
.legal .lines { padding-left: 30px; margin: 0 0 16px; }
.legal .lines li { padding-left: 4px; }
.legal .lines li::marker { font: 500 15px var(--mono); }
.legal .gifts { padding-left: 34px; margin: 0; }
.legal .gift::marker { font: 600 22px var(--serif); color: var(--accent); }
.legal .gift { margin: 0 0 22px; max-width: none; }
.gift h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; }
.gift .price { font: 500 15px/1.3 var(--mono); color: var(--muted); }
.gift p { margin: 0; }
.gift.ours { padding: 18px 22px; border-radius: 20px; background: var(--glow-soft); }
.article-cta { margin: 44px 0 24px; padding: 26px 26px 28px; border-radius: 24px; background: var(--ink); color: #fbf6ee; }
.legal .article-cta h2 { margin: 0 0 8px; color: #fbf6ee; }
.article-cta p { color: #e4def0; }
.article-next { font-weight: 600; }
.post-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.legal .post-list li { max-width: none; margin: 0; }
.post-list a { display: block; padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.post-list a:hover h2 { color: var(--accent); }
.legal .post-list h2 { margin: 0 0 6px; font-size: 24px; }
.post-list p { margin: 0; color: var(--muted); }

.w-days { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.w-days li { display: grid; gap: 6px 22px; padding: 20px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.w-day { font: 500 15px/1.4 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.w-days p { margin: 0; color: var(--muted); line-height: 1.55; }
.legal .example-card { margin: 8px 0 20px; padding: 22px 24px; border-radius: 20px; background: var(--glow-soft); font: 500 21px/1.5 var(--serif); max-width: 34em; transform: rotate(-0.6deg); }

@media (max-width: 480px) {
  .w-collage { height: 430px; }
  .w-note q { font-size: 17px; }
  .w-note.ink q { font-size: 20px; }
  .w-note.n2 { top: 128px; width: 60%; }
}
@media (min-width: 640px) {
  .w-plans { grid-template-columns: 1fr 1fr; }
  .w-form-row { grid-template-columns: 1fr 1fr; }
  .w-inline { grid-template-columns: 1fr auto; align-items: end; }
  .w-inline .w-result { grid-column: 1 / -1; }
  .w-early-card { padding: 40px 44px; }
  .w-reason-grid { grid-template-columns: 1fr 1fr; }
  .w-days li { grid-template-columns: 130px 1fr; align-items: baseline; }
}
@media (min-width: 900px) {
  .welcome-page .w-hero { grid-template-columns: 1.05fr 1fr; margin-top: 56px; }
  .w-collage { height: 520px; }
  .w-versus { grid-template-columns: 1fr 1.15fr; align-items: center; }
  .w-steps ol { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .w-steps li { grid-template-columns: 1fr; padding-bottom: 0; }
  .w-steps li:not(:last-child)::before { left: 66px; right: -20px; top: 27px; bottom: auto; width: auto; height: 2px;
    background: repeating-linear-gradient(to right, var(--accent-edge) 0 6px, transparent 6px 12px); }
  .w-gets-row { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 22px 0 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .w-wave i { animation: none; }
}
