/* Every Little Letter shop. Values come from Brand Guidelines/Brand Tokens.md; change them there first. */
:root {
  --color-bg: #F6F1EA; --color-surface: #FFFCF8; --color-band: #EDE4D8;
  --color-text: #3B2A21; --color-text-muted: #6B5A4E;
  --color-accent: #3B2A21; --color-accent-hover: #54402F; --color-accent-text: #F6F1EA;
  --color-border: #D9CCBB; --color-field: #A08F81; --color-danger: #A3392B; --color-focus: #2F6690;
  --font-display: "Sniglet", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-control: 12px; --radius-media: 20px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(59 42 33 / .06), 0 10px 28px rgb(59 42 33 / .07);
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --content-max: 1160px; --text-max: 62ch;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --section: var(--s9); --gutter: 24px;
}
@media (max-width: 720px) { :root { --section: var(--s8); --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 400 18px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
@media (max-width: 720px) { body { font-size: 17px; } }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
h2 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 760px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -100px; background: var(--color-accent); color: var(--color-accent-text); padding: var(--s3) var(--s4); border-radius: var(--radius-control); z-index: 100; }
.skip:focus { top: var(--s4); }
.ph { background: #FFF1B8; color: #5C4B00; border-radius: 4px; padding: 0 4px; }
.defs { position: absolute; }

/* Notice bar and header */
.notice { background: var(--color-accent); color: var(--color-accent-text); text-align: center; font-size: 15px; font-weight: 600; padding: 9px var(--gutter); }
.notice[hidden] { display: none; }
.header { position: sticky; top: 0; z-index: 20; background: rgb(246 241 234 / .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgb(217 204 187 / .7); }
@media (prefers-reduced-transparency: reduce) { .header { background: var(--color-bg); backdrop-filter: none; } }
.header-in { display: flex; align-items: center; gap: var(--s6); height: 68px; }
.logo { display: flex; align-items: center; min-height: 44px; }
.logo img { width: 200px; height: auto; }
.nav { display: flex; gap: var(--s5); margin-left: auto; font-size: 16px; font-weight: 600; }
.nav a { text-decoration: none; padding: var(--s3) 0; color: var(--color-text-muted); }
.nav a:hover { color: var(--color-text); }
.bag-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--color-field); border-radius: var(--radius-pill); background: var(--color-surface); cursor: pointer; font-weight: 700; font-size: 16px; transition: transform 160ms var(--ease-out); }
.bag-btn:active { transform: scale(.97); }
.bag-count { min-width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-text); font-size: 13px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; padding: 0 6px; }
@media (max-width: 860px) { .nav { display: none; } .bag-btn { margin-left: auto; } }
@media (max-width: 420px) { .logo img { width: 168px; } .bag-btn > span:first-of-type { display: none; } }

/* Shared */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--s3); }
.section-head { max-width: 640px; margin-bottom: var(--s7); }
.section-head .sub { margin-top: var(--s4); color: var(--color-text-muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; padding: 0 var(--s5); border-radius: var(--radius-pill); font-weight: 700; font-size: 17px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease, opacity 160ms ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--color-accent); color: var(--color-accent-text); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-field); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--color-accent-hover); }
  .btn-secondary:hover { background: var(--color-surface); }
}
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.link { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; min-height: 44px; display: inline-flex; align-items: center; }

/* Hero */
.hero { padding: var(--s8) 0 var(--section); }
.hero-in { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s7); align-items: center; }
.hero-reason { margin-top: var(--s4); font-size: 22px; line-height: 1.35; font-weight: 600; min-height: 2.7em; transition: opacity 220ms ease, transform 220ms var(--ease-out); }
.swap-out { opacity: 0; transform: translateY(6px); }
.lede { margin-top: var(--s3); font-size: 18px; color: var(--color-text-muted); max-width: 36ch; }
.hero-actions { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s6); flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 15px; font-weight: 600; color: var(--color-text-muted); }
.ticks li { display: inline-flex; align-items: center; gap: var(--s2); }
.ticks li::before { content: ""; width: 16px; height: 16px; flex-shrink: 0; background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%236B5A4E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.hero-art { margin: 0; position: relative; }
.hero-frames { position: relative; aspect-ratio: 1100 / 440; }
.hero-frames .frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity 600ms ease, transform 700ms var(--ease-out); }
.hero-frames .frame.is-on { opacity: 1; transform: none; }
.hero-pause { position: absolute; right: 0; bottom: -52px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); display: grid; place-items: center; cursor: pointer; }
.hero-pause[hidden] { display: none; }
.hero-pause .i-play, .hero-pause[aria-pressed="true"] .i-pause { display: none; }
.hero-pause[aria-pressed="true"] .i-play { display: block; }
@media (hover: hover) and (pointer: fine) { .hero-pause:hover { color: var(--color-text); border-color: var(--color-field); } }
@media (max-width: 860px) {
  .hero { padding-top: var(--s6); }
  .hero-in { grid-template-columns: 1fr; gap: var(--s6); }
  .hero-art { order: -1; }
  .hero-reason { font-size: 19px; }
  .hero-art { padding-right: 52px; }
  .hero-pause { bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* Maker */
.maker { padding: var(--section) 0; background: var(--color-band); }
.tabs { display: inline-flex; gap: var(--s1); padding: var(--s1); border-radius: var(--radius-pill); background: var(--color-bg); border: 1px solid var(--color-border); margin-bottom: var(--s5); }
.tab { min-height: 44px; padding: 0 var(--s5); border: 0; border-radius: var(--radius-pill); background: transparent; font-weight: 700; font-size: 16px; cursor: pointer; color: var(--color-text-muted); transition: background-color 160ms ease, color 160ms ease; }
.tab[aria-selected="true"] { background: var(--color-accent); color: var(--color-accent-text); }
.tab { white-space: nowrap; }
@media (max-width: 560px) { .tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; } .tab { padding: 0 var(--s2); } }
.studio { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s5); align-items: start; }
.studio[hidden] { display: none; }
.studio > * { min-width: 0; }
@media (max-width: 960px) { .studio { grid-template-columns: 1fr; } }
.preview { background: var(--color-surface); border-radius: var(--radius-media); box-shadow: var(--shadow-card); padding: var(--s6) var(--s5) var(--s5); position: sticky; top: 92px; }
@media (max-width: 960px) { .preview { position: relative; top: auto; } }
.mock-tag { position: absolute; top: var(--s4); left: var(--s4); z-index: 1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); border: 1px solid var(--color-border); border-radius: 999px; padding: 2px 10px; background: var(--color-surface); }
.preview-stage {min-height: 220px; display: grid; place-items: end center; min-width: 0; overflow: hidden; padding-bottom: 14px; }
.preview-empty { color: var(--color-text-muted); align-self: center; }
.preview-empty[hidden] { display: none; }
.shelf { height: 10px; margin: 0 auto; border-radius: 3px; background: linear-gradient(#E4D6C2, #D5C3AB); max-width: 100%; width: var(--shelf, 80%); transition: width 220ms var(--ease-out); }
.preview-meta { margin-top: var(--s4); text-align: center; font-size: 15px; color: var(--color-text-muted); min-height: 1.5em; font-variant-numeric: tabular-nums; }
.letters { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-end; gap: 4px; width: 100%; }
.lt { padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius-control); position: relative; }
.lt svg { display: block; height: var(--lh, 140px); width: auto; overflow: visible; }
.lt[aria-pressed="true"]::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -10px; border-top: 2px dashed var(--color-text); }
.lt.pop { animation: settle 220ms var(--ease-out); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }
.script-svg { width: 100%; height: 220px; overflow: visible; }
.hearts-stage img { width: min(100%, 520px); margin: 0 auto var(--s2); }

.controls { background: var(--color-surface); border-radius: var(--radius-media); box-shadow: var(--shadow-card); padding: var(--s5); display: grid; gap: var(--s5); }
.field { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); min-width: 0; }
.field > label, .field > legend { font-weight: 700; font-size: 15px; padding: 0; }
.legend-note { display: block; font-weight: 400; color: var(--color-text-muted); margin-top: 2px; }
.field input[type="text"], .field input[type="number"] { width: 100%; min-height: 52px; border: 1px solid var(--color-field); border-radius: var(--radius-control); background: var(--color-surface); padding: 0 var(--s4); font-size: 20px; letter-spacing: .02em; }
.field input::placeholder { color: #9A8B7F; }
.hint { font-size: 15px; color: var(--color-text-muted); }
.hint.error { color: var(--color-danger); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pill { min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--color-field); border-radius: var(--radius-pill); background: var(--color-surface); font-weight: 600; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2); font-variant-numeric: tabular-nums; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.pill:active { transform: scale(.97); }
.pill[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-text); }
.pill .price { opacity: .75; font-weight: 600; }
.pills.small .pill { min-height: 40px; font-size: 15px; }
/* swatches run pastels first, then neutrals: 2 a row in a narrow panel, 4 a row (one family per row) when there's room */
.controls { container-type: inline-size; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
@container (min-width: 640px) { .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sw { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: var(--s1) var(--s3) var(--s1) var(--s1); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); cursor: pointer; font-size: 15px; font-weight: 600; text-align: left; transition: border-color 160ms ease, transform 160ms var(--ease-out); }
.sw:active { transform: scale(.97); }
.sw .chip { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgb(59 42 33 / .18); }
.sw .stock { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text); margin-left: auto; flex-shrink: 0; }
.sw[aria-pressed="true"] { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.sw[disabled] { opacity: .45; cursor: not-allowed; }
.stock-note .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--color-text); vertical-align: middle; margin-right: 4px; }
.summary { border-top: 1px solid var(--color-border); padding-top: var(--s5); display: grid; gap: var(--s4); }
.summary-line { font-size: 17px; font-variant-numeric: tabular-nums; }
.summary-line strong { font-size: 22px; }
.stepper { display: flex; gap: var(--s2); align-items: center; }
.stepper input { width: 88px !important; text-align: center; }
.step { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--color-field); background: var(--color-surface); font-size: 22px; cursor: pointer; }

/* Features */
.feature { padding: var(--section) 0; }
.feature.band { background: var(--color-band); }
.feature-in { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: center; }
.feature-in.reverse .feature-art { order: 2; }
.feature-art { margin: 0; }
.feature-art img { max-height: 520px; width: auto; margin: 0 auto; }
.feature-copy { display: grid; gap: var(--s4); max-width: 46ch; }
.feature-copy .eyebrow { margin-bottom: 0; }
.feature-copy p { color: var(--color-text-muted); }
.feature-copy .btn { justify-self: start; margin-top: var(--s2); }
.price-line { font-weight: 600; }
@media (max-width: 860px) { .feature-in { grid-template-columns: 1fr; gap: var(--s6); } .feature-in.reverse .feature-art { order: 0; } .feature-art img { max-height: 420px; width: auto; margin: 0 auto; } }

/* How */
.how { padding: var(--section) 0; border-top: 1.5px dashed var(--color-border); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.steps li { display: grid; gap: var(--s3); align-content: start; }
.steps p { color: var(--color-text-muted); }
.step-n { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-field); display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: var(--s5); } }

/* Details */
.details { padding: 0 0 var(--section); }
.details-in { display: grid; grid-template-columns: 6fr 5fr; gap: var(--s8); align-items: center; }
.details-art { margin: 0; }
.detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.detail-list p { color: var(--color-text-muted); margin-top: var(--s1); }
@media (max-width: 860px) { .details-in { grid-template-columns: 1fr; gap: var(--s6); } }

/* FAQ */
.faq { padding: var(--section) 0; background: var(--color-band); }
details { border-bottom: 1px solid var(--color-border); }
summary { list-style: none; cursor: pointer; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); font-weight: 700; font-size: 18px; padding: var(--s3) 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-display); font-size: 26px; line-height: 1; transition: transform 200ms var(--ease-out); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 var(--s5); color: var(--color-text-muted); max-width: var(--text-max); }

/* Safety and footer */
.safety { padding: var(--s6) 0; text-align: center; font-size: 16px; }
.safety p { max-width: 72ch; margin: 0 auto; }
.footer { background: var(--color-accent); color: var(--color-accent-text); padding: var(--s8) 0; }
.footer-in { display: flex; gap: var(--s5); align-items: center; }
.footer-tag { font-family: var(--font-display); font-size: 24px; line-height: 1.2; }
.footer-meta { font-size: 15px; opacity: .85; margin-top: var(--s2); }
.footer-links { list-style: none; padding: 0; margin: var(--s2) 0 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); font-size: 15px; opacity: .85; }
.footer .ph { color: #5C4B00; }
@media (max-width: 560px) { .footer-in { flex-direction: column; align-items: flex-start; } }

/* Bag sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(59 42 33 / .32); z-index: 40; opacity: 0; transition: opacity 240ms ease; }
.sheet-backdrop.open { opacity: 1; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--color-bg); z-index: 41; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 320ms var(--ease-drawer); overscroll-behavior: contain; box-shadow: -10px 0 40px rgb(59 42 33 / .12); }
.sheet.open { transform: none; }
.sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--color-border); }
.sheet-head h2 { font-size: 28px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--color-band); }
.sheet-body { flex: 1; overflow-y: auto; padding: var(--s5); display: grid; gap: var(--s5); align-content: start; }
.bag-empty { color: var(--color-text-muted); }
.bag-items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.bag-item { background: var(--color-surface); border-radius: var(--radius-control); padding: var(--s4); display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); box-shadow: var(--shadow-card); }
.bag-item h3 { font-size: 17px; }
.bag-item .meta { font-size: 15px; color: var(--color-text-muted); grid-column: 1; }
.bag-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; grid-row: 1; grid-column: 2; text-align: right; }
.bag-item .remove { grid-column: 2; justify-self: end; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; color: var(--color-text-muted); cursor: pointer; font-size: 15px; min-height: 44px; padding: 0; }
.radios { display: grid; gap: var(--s2); }
.radio, .check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); cursor: pointer; font-size: 16px; }
.radio input, .check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--color-accent); flex-shrink: 0; }
.radio .price { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.radio.disabled { opacity: .5; cursor: not-allowed; }
.sheet-foot { padding: var(--s5); border-top: 1px solid var(--color-border); display: grid; gap: var(--s3); padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom)); }
.bag-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.form-error { color: var(--color-danger); font-weight: 600; font-size: 15px; }
.form-error[hidden] { display: none; }
.pay-note { font-size: 15px; color: var(--color-text-muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--color-accent); color: var(--color-accent-text); padding: var(--s3) var(--s5); border-radius: var(--radius-pill); font-weight: 700; font-size: 16px; opacity: 0; pointer-events: none; transition: opacity 220ms ease, transform 220ms var(--ease-out); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .btn, .pill, .sw, .bag-btn, .sheet, .toast, .shelf { transition-property: opacity, background-color !important; transform: none !important; }
  .sheet.open { transform: none; }
}
@media (prefers-contrast: more) { :root { --color-border: #A08F81; --color-text-muted: #4E3F35; } }
.soon { font-weight: 600; color: var(--color-text-muted); font-style: normal; }
