/* Joy Stories – Store · slow, human, intimate */
:root {
  --paper: #FBFBF9;
  --paper-deep: #F2F2F0;
  --ink: #111111;
  --muted: #6B6B6B;
  --accent: #111111;
  --accent-deep: #111111;
  --line: #E3E3E0;
  --serif: "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
  --sans: "Inter", "Lato", system-ui, -apple-system, sans-serif;
  --measure: 640px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  animation: fadein 1.8s ease;
}
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body { animation: none; } html { scroll-behavior: auto; } }

a { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: .005em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.2em; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }

/* layout */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.wide { max-width: 920px; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
.center { text-align: center; }

/* header */
.site-header { padding: 28px 0 0; }
.site-header .wrap { max-width: 920px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--muted); font-size: 1rem; font-style: italic; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: .9rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); }

/* footer */
.site-footer { margin-top: 48px; padding: 48px 0 56px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.site-footer .wrap { max-width: 920px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* hero */
.hero { padding: 96px 0 80px; text-align: center; }
.hero h1 { max-width: 14ch; margin-left: auto; margin-right: auto; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 auto 2em; }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.4em; }

/* buttons */
.btn {
  display: inline-block; font: inherit; font-size: .95rem; letter-spacing: .02em;
  padding: 14px 30px; border-radius: 2px; cursor: pointer; text-decoration: none;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  transition: background .4s ease, color .4s ease, border-color .4s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* illustration */
.illus { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.desk {
  margin: 56px auto 0; max-width: 760px; aspect-ratio: 16/9; border-radius: 3px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, #FFF8EC 0%, #EFE4D3 55%, #E2D3BD 100%);
  box-shadow: inset 0 0 80px rgba(0,0,0,.06);
  display: grid; place-items: center;
}

/* quiet prose */
.prose p { font-size: 1.08rem; }
.quote { font-family: var(--serif); font-size: clamp(1.4rem, 3.5vw, 1.8rem); line-height: 1.5; font-style: italic; color: var(--ink); text-align: center; }

/* product cards (stacked, single column) */
.choice { display: block; padding: 40px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.choice:last-child { border-bottom: 1px solid var(--line); }
.choice h2 { margin-bottom: .3em; transition: color .4s ease; }
.choice:hover h2 { color: var(--accent-deep); }
.choice .price { font-size: .92rem; color: var(--muted); }
.choice .more { font-size: .92rem; color: var(--accent-deep); }

/* lists */
.gets { list-style: none; padding: 0; margin: 0 0 1.5em; }
.gets li { padding: 10px 0 10px 28px; position: relative; border-bottom: 1px dashed var(--line); }
.gets li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.note {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; margin: 32px 0;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.55;
}
.note strong { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px; }

.pricing { background: var(--paper-deep); padding: 28px 30px; border-radius: 2px; margin: 32px 0; }
.pricing .amount { font-family: var(--serif); font-size: 2rem; }
.pricing p { margin: 0; color: var(--muted); font-size: .95rem; }

/* forms */
form { margin-top: 24px; }
fieldset { border: 0; padding: 0; margin: 0 0 48px; }
legend { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 4px; padding: 0; }
.helper { color: var(--muted); font-size: .92rem; font-style: italic; margin-bottom: 24px; }
.field { margin-bottom: 26px; }
label { display: block; font-size: .92rem; margin-bottom: 8px; }
label .opt { color: var(--muted); font-size: .82rem; }
.hint { display: block; color: var(--muted); font-size: .84rem; margin-top: 6px; }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px;
  transition: border-color .4s ease, box-shadow .4s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
textarea.letter {
  min-height: 340px; font-family: var(--serif); font-size: 1.15rem; line-height: 2;
  background-image: repeating-linear-gradient(transparent 0 calc(2em - 1px), #ECECEA calc(2em - 1px) 2em);
  background-attachment: local; padding-top: 6px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.style-opt { position: relative; }
.style-opt input { position: absolute; opacity: 0; }
.style-opt span {
  display: block; padding: 18px 16px; border: 1px solid var(--line); border-radius: 2px; cursor: pointer;
  background: #FFFFFF; transition: border-color .4s ease;
}
.style-opt span em { display: block; font-size: 1.6rem; line-height: 1.3; color: var(--ink); font-style: normal; }
.style-opt span small { color: var(--muted); font-size: .82rem; }
.style-opt .cursive em { font-family: "Homemade Apple", "Caveat", cursive; font-size: 1.25rem; padding: 4px 0; }
.style-opt .print em { font-family: "Caveat", cursive; font-size: 1.7rem; }
.style-opt input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.style-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0,0,0,.2); }

.pages { display: flex; gap: 12px; }
.pages .style-opt { flex: 1; }
.pages .style-opt span { text-align: center; }

.counter {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: .88rem; color: var(--muted); margin-top: 8px;
}
.counter b { color: var(--ink); font-weight: 500; }

.summary {
  position: sticky; bottom: 0; background: rgba(251,251,249,.96); backdrop-filter: blur(4px);
  border-top: 1px solid var(--line); padding: 20px 0; margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.summary .total { font-family: var(--serif); font-size: 1.6rem; }
.summary .total small { font-family: var(--sans); font-size: .82rem; color: var(--muted); display: block; }

.error { color: #111; font-size: .88rem; margin-top: 6px; display: none; }
.invalid .error { display: block; }
.invalid input, .invalid textarea, .invalid select { border-color: #111; }

/* checkout table */
.lines { width: 100%; border-collapse: collapse; margin: 16px 0 32px; font-size: .96rem; }
.lines td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; }
.lines tr.total td { border-bottom: 0; font-family: var(--serif); font-size: 1.4rem; padding-top: 18px; }
.preview-msg { white-space: pre-wrap; font-family: var(--serif); font-size: 1.05rem; color: var(--muted); max-height: 160px; overflow: auto; border-left: 1px solid var(--line); padding-left: 16px; margin: 8px 0 0; }

.demo-flag { font-size: .8rem; color: var(--muted); border: 1px dashed var(--line); padding: 10px 14px; border-radius: 2px; margin-top: 16px; }

/* confirmation */
.seal { width: 72px; height: 72px; margin: 0 auto 28px; }
.order-id { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .06em; color: var(--accent-deep); }

/* tracking */
.steps { list-style: none; padding: 0; margin: 32px 0; }
.steps li { position: relative; padding: 0 0 28px 36px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 6px; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); background: var(--paper); }
.steps li::after { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.now { color: var(--ink); }
.steps li.now::before { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,0,0,.1); }
.steps small { display: block; color: var(--muted); font-size: .85rem; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
details summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-family: var(--sans); font-weight: 300; transition: transform .4s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 14px 0 0; color: var(--muted); }

.toc { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; margin-bottom: 24px; }
.policy h2 { margin-top: 1.6em; font-size: 1.6rem; }
.policy p, .policy li { color: #444; }

/* draft letter sheet */
.letter-sheet {
  background: #FFFFFF; border: 1px solid var(--line); padding: 48px 44px; margin: 32px 0;
  font-family: "Caveat", cursive; font-size: 1.6rem; line-height: 1.75; color: #1a1a1a;
  box-shadow: 0 1px 0 #ECECEA, 0 18px 40px -24px rgba(0,0,0,.25);
}
@media (max-width: 560px) { .letter-sheet { padding: 28px 22px; font-size: 1.35rem; } }

/* family / our story */
.family { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 40px 0 8px; }
@media (max-width: 640px) { .family { grid-template-columns: repeat(2, 1fr); } }
.family figure { margin: 0; text-align: center; }
.family .portrait {
  aspect-ratio: 3/4; border-radius: 2px; background: var(--paper-deep); border: 1px dashed var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: .78rem; margin-bottom: 10px;
}
.family figcaption { font-family: var(--serif); font-size: 1.15rem; }
.family figcaption small { display: block; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.signoff { font-family: "Caveat", cursive; font-size: 1.8rem; color: var(--accent-deep); }

/* ---------- Dear Someone: simple and loud ---------- */
.loud { padding: 12vh 0 10vh; }
.loud h1 { font-size: clamp(3rem, 10vw, 6.4rem); line-height: 1.02; letter-spacing: -.01em; max-width: 13ch; margin: 0 0 .5em; font-weight: 500; }
.loud h1 em { font-style: italic; color: var(--accent-deep); }
.loud .lede { margin: 0 0 2.2em; text-align: left; font-size: 1.2rem; }
.big { max-width: 920px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); }
.options a { padding: 36px 28px 40px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--ink); }
.options a + a { padding-left: 28px; border-left: 1px solid var(--ink); }
.options .p { font-family: var(--serif); font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; display: block; margin: 14px 0 6px; }
.options .p small { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.options h2 { font-size: 1.6rem; margin: 0; }
.options span.go { color: var(--accent-deep); font-size: .95rem; }
.options a:hover h2 { color: var(--accent-deep); }
@media (max-width: 640px) { .options { grid-template-columns: 1fr; } .options a + a { padding-left: 0; border-left: 0; } }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: n; }
.three div::before { counter-increment: n; content: counter(n); font-family: var(--serif); font-size: 2.4rem; color: var(--accent); display: block; }
@media (max-width: 640px) { .three { grid-template-columns: 1fr; gap: 20px; } }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 48px; }
.toggle .style-opt span b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.admin-order { padding: 18px 0; }
.admin-order summary { font-size: 1.1rem; }
.brand span { font-style: italic; }

/* slow down */
.slow { padding: 120px 0; }
.slow .wrap { max-width: 560px; }
.slow p:not(.quote):not(.eyebrow) { font-size: 1.12rem; color: #3a3a3a; text-align: center; margin: 2em 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.6s ease, transform 1.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* black & white: emphasis by weight and style, not colour */
.loud h1 em { color: var(--ink); }
.btn:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.options a:hover h2, .choice:hover h2 { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.error { font-weight: 500; }
.brand img { display: block; height: 72px; width: auto; }
@media (max-width: 560px) { .brand img { height: 60px; } }
.loud .eyebrow { letter-spacing: .01em; text-transform: none; font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--ink); margin-bottom: .6em; }

/* The Letterbox */
.lb-card { padding: 48px 0; border-top: 1px solid var(--line); }
.lb-card:first-child { border-top: 0; padding-top: 0; }
.lb-card img { width: 100%; height: auto; border: 1px solid var(--line); margin-bottom: 24px; filter: grayscale(1); }
.lb-card h3 { margin-bottom: 0; }
.lb-text { margin-top: 20px; }

.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
@media (max-width: 820px) { .lb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .lb-grid { grid-template-columns: 1fr; } }
.lb-grid .lb-card { padding: 0; border: 0; margin: 0; }
.lb-open { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: #fff; cursor: zoom-in; overflow: hidden; aspect-ratio: 3/4; }
.lb-open img { width: 100%; height: 100%; object-fit: cover; object-position: top; margin: 0; border: 0; transition: transform 1.2s ease; }
.lb-open:hover img { transform: scale(1.03); }
.lb-card figcaption { margin-top: 14px; }
.lb-card figcaption .eyebrow { display: block; margin-bottom: .3em; }
.lb-card figcaption b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.lb-card figcaption q { display: block; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.1rem; margin-top: 4px; }
#lb-dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 94vh; }
#lb-dialog::backdrop { background: rgba(251,251,249,.97); }
#lb-dialog img { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; border: 1px solid var(--line); }
#lb-dialog .lb-label { text-align: center; font-family: var(--serif); font-size: 1.2rem; margin: 14px 0 0; }
.lb-close { position: sticky; top: 0; float: right; font: inherit; font-size: .9rem; background: var(--ink); color: #fff; border: 0; padding: 8px 16px; cursor: pointer; margin-bottom: 8px; }

/* featured letter */
.feat { max-width: 680px; margin: 0 auto; }
.feat h2 { font-size: clamp(2rem, 5vw, 2.8rem); font-style: italic; }
.feat-sheet { background: #fff; border: 1px solid var(--line); padding: 56px 56px 40px; margin-top: 24px;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.9; box-shadow: 0 24px 48px -32px rgba(0,0,0,.25); }
.feat-sheet p { margin: 0 0 1.2em; }
.feat-more { border: 0; padding: 0; }
.feat-more summary { font-family: var(--sans); font-size: .95rem; display: inline-flex; gap: 10px; border: 1px solid var(--ink); padding: 10px 22px; margin: 8px 0 8px; }
.feat-more summary::after { content: "↓"; }
.feat-more[open] summary { display: none; }
.feat-more[open] p { animation: settle 1.6s ease both; }
.feat-more p { color: var(--ink); margin: 0 0 1.2em; }
@media (max-width: 560px) { .feat-sheet { padding: 32px 24px 24px; font-size: 1.12rem; } }

/* Letterbox stories */
.st-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--ink); }
@media (max-width: 640px) { .st-grid { grid-template-columns: 1fr; } }
.st-card { border-bottom: 1px solid var(--line); }
.st-card:nth-child(odd) { border-right: 1px solid var(--line); }
@media (max-width: 640px) { .st-card:nth-child(odd) { border-right: 0; } }
.st-open { all: unset; box-sizing: border-box; display: block; width: 100%; height: 100%; padding: 36px 28px 40px; cursor: pointer; }
.st-open:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.st-open .eyebrow { display: block; margin-bottom: .8em; }
.st-open h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: .4em; transition: opacity .6s ease; }
.st-open p { color: var(--muted); margin: 0 0 1.2em; font-size: 1rem; }
.st-open .go { font-size: .92rem; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.st-open:hover h3 { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
#st-dialog { border: 0; padding: 0; width: min(94vw, 760px); max-height: 92vh; background: var(--paper); box-shadow: 0 30px 80px -30px rgba(0,0,0,.35); }
#st-dialog::backdrop { background: rgba(251,251,249,.92); }
#st-dialog[open] { animation: settle 1s ease both; }
.st-body { padding: 48px 48px 56px; }
@media (max-width: 560px) { .st-body { padding: 32px 22px 40px; } }
.st-body h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-style: italic; }
.st-body .st-lede { font-family: var(--serif); font-size: 1.35rem; line-height: 1.55; }
.st-letter { margin-top: 40px; }
.st-photo { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
#st-dialog .lb-close { position: sticky; top: 0; float: right; margin: 0; z-index: 1; }
