/* Crumbtally site — "home bakery counter": warm cream paper, cocoa ink, strawberry + caramel accents,
   a handwritten touch (Caveat) for notes and a soft serif (Fraunces) for headlines.
   Prices use tabular figures so the numbers read exactly. Plum (--plum) ties back to the app's own theme. */
:root {
  --cream: #FFF6EA;
  --paper: #FFFDF8;
  --crust: #F1E2CC;
  --crust-deep: #E3CBA8;
  --ink: #33201A;
  --ink-soft: #66503F;
  --berry: #BE2F4C;
  --berry-deep: #93203A;
  --berry-soft: #FBE2E5;
  --caramel: #C9792A;
  --caramel-ink: #8A4A12;
  --caramel-soft: #F8E1BF;
  --cocoa: #4A2C20;
  --plum: #5B3E96;
  --mint: #2F7A55;
  --shadow: 0 1px 2px rgba(51, 32, 26, .06), 0 10px 30px -12px rgba(74, 44, 32, .28);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font-body: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--cream);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img { max-width: 100%; height: auto; }
a { color: var(--berry-deep); text-underline-offset: 3px; }
a:hover { color: var(--berry); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- Top bar (landing) ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding-top: 12px; padding-bottom: 4px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.logo img { border-radius: 10px; box-shadow: 0 4px 10px -4px rgba(74, 44, 32, .45); }
.logo:hover { color: var(--ink); }
.lang-switch { margin: 0 -6px; font-size: 15px; color: var(--ink-soft); display: flex; flex-wrap: wrap; align-items: center; }
.lang-switch a, .lang-switch span { display: inline-block; padding: 11px 6px; line-height: 1.2; }
.lang-switch a { font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.lang-switch a:hover { color: var(--berry-deep); }
.lang-switch [aria-current] { color: var(--ink); font-weight: 700; text-decoration: underline wavy var(--caramel) 1.5px; text-underline-offset: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; gap: var(--s5); align-items: center; padding-top: var(--s6); padding-bottom: var(--s7); }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr .9fr; gap: var(--s7); padding-top: var(--s7); padding-bottom: var(--s8); } }
.eyebrow { font-family: var(--font-hand); font-weight: 600; font-size: 27px; line-height: 1.1; color: var(--berry); margin: 0 0 var(--s2); transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 9.4vw, 66px); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 var(--s4); color: var(--ink); }
.hero h1 .h1-kicker { display: block; font-family: var(--font-hand); font-weight: 600; font-size: clamp(28px, 6vw, 34px); letter-spacing: 0; line-height: 1.1; color: var(--berry); margin-bottom: var(--s2); transform: rotate(-2deg); transform-origin: left; }
.lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 var(--s5); max-width: 34em; }
@media (min-width: 720px) { .lead { font-size: 19px; } }
.hero-note { font-size: 16px; color: var(--ink-soft); margin: var(--s3) 0 0; display: flex; align-items: flex-start; gap: 8px; }
.hero-note::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* store buttons (plain text links; no third-party logos) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 22px; border-radius: 16px;
  font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none;
  background: var(--cocoa); color: #FFF6EA; border: 2px solid var(--cocoa);
  box-shadow: 0 8px 18px -10px rgba(51, 32, 26, .7);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.store-badge::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0l-4.5-4.5M12 14l4.5-4.5M4 15v3a3 3 0 003 3h10a3 3 0 003-3v-3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0l-4.5-4.5M12 14l4.5-4.5M4 15v3a3 3 0 003 3h10a3 3 0 003-3v-3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.store-badge + .store-badge { background: var(--paper); color: var(--cocoa); }
a.store-badge:hover, a.store-badge:focus-visible { transform: translateY(-2px); background: var(--berry-deep); border-color: var(--berry-deep); color: #fff; box-shadow: 0 12px 22px -10px rgba(147, 32, 58, .6); }
@media (max-width: 440px) { .stores .store-badge { flex: 1 1 100%; } }

/* hero art: cupcake-liner plate + phone + price ticket */
.hero-art { position: relative; min-height: 500px; display: grid; place-items: center; isolation: isolate; }
@media (min-width: 960px) { .hero-art { min-height: 640px; } }
.plate { position: absolute; left: 50%; top: 50%; width: min(112%, 600px); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1; }
.sprinkles { position: absolute; left: -4%; top: -4%; width: 108%; height: 108%; z-index: -1; pointer-events: none; }
.sprinkles .sp { transform-box: fill-box; transform-origin: center; }

.phone {
  position: relative; margin: 0; width: min(64vw, 270px);
  padding: 9px; border-radius: 46px;
  background: linear-gradient(145deg, #5A3A2E, #2A1812 55%, #4A2C20);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .08) inset, 0 30px 60px -24px rgba(51, 32, 26, .6), 0 12px 24px -12px rgba(51, 32, 26, .35);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; background: var(--cream); }
.phone::after { content: ""; position: absolute; inset: 9px; border-radius: 37px; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, .14), transparent 38%); }
@media (min-width: 960px) { .hero .phone { width: 300px; transform: rotate(3deg); } }

/* price ticket: cost + fee + profit = price */
.ticket {
  position: absolute; left: 0; bottom: 8px; z-index: 2; margin: 0;
  width: min(84vw, 312px); padding: 16px 18px 18px;
  background: var(--paper); color: var(--ink);
  border-radius: 4px 4px 14px 14px;
  box-shadow: var(--shadow), 0 24px 40px -22px rgba(74, 44, 32, .55);
  transform: rotate(-4deg);
}
.ticket::before { /* torn paper top */ content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 9px;
  background: radial-gradient(circle at 6px 0, transparent 5px, var(--paper) 5.5px) 0 0/12px 9px repeat-x; }
.ticket figcaption { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--caramel-ink); margin-bottom: 8px; line-height: 1.35; }
.ticket dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; }
.ticket dt { color: var(--ink-soft); display: flex; align-items: center; gap: 8px; line-height: 1.35; }
.ticket dt i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ticket dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket .t-profit { color: var(--mint); }
.ticket .t-total { border-top: 2px dashed var(--crust-deep); margin-top: 6px; padding-top: 8px; color: var(--ink); font-weight: 700; font-size: 16px; }
.ticket dd.t-total { font-family: var(--font-display); font-size: 27px; line-height: 1.1; color: var(--berry-deep); }
.tbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin: 12px 0 2px; background: var(--crust); }
.tbar span { display: block; height: 100%; }
.c-cost { background: var(--caramel); }
.c-fee { background: var(--cocoa); }
.c-profit { background: var(--berry); }
.ticket .note { position: absolute; left: 14px; bottom: -46px; background: var(--paper); padding: 0 12px 4px 6px; border-radius: 10px; box-shadow: 0 6px 14px -8px rgba(74, 44, 32, .5); font-family: var(--font-hand); font-weight: 600; font-size: 25px; line-height: 1; color: var(--berry-deep); transform: rotate(-3deg); white-space: nowrap; display: flex; align-items: flex-end; gap: 2px; }
.ticket .note svg { width: 30px; height: 28px; margin-bottom: 6px; }
@media (min-width: 960px) { .hero-art .ticket { left: -10px; bottom: 60px; } }
@media (max-width: 959px) {
  .hero-art { padding-bottom: 130px; }
  .hero-art .ticket { left: 50%; bottom: 56px; margin-left: calc(min(84vw, 312px) / -2 - 14px); }
}

/* ---------- Sections ---------- */
.sec { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 860px) { .sec { padding-top: var(--s8); padding-bottom: var(--s8); } }
.sec-head { max-width: 660px; margin: 0 0 var(--s7); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .eyebrow { transform-origin: center; }
.sec h2, .cta-final h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 6.4vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0; color: var(--ink); }

/* chapters (pt features) */
.chapters { display: grid; gap: var(--s8); }
.chapter { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 860px) {
  .chapter { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .chapter:nth-child(even) .chapter-art { order: 2; }
}
.chapter-art { position: relative; display: grid; place-items: center; padding: 28px 0; isolation: isolate; }
.liner { position: absolute; height: auto; aspect-ratio: 1; width: min(100%, 440px); left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; }
.chapter-art .phone { width: min(60vw, 250px); }
.step-tag { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--s3); font-family: var(--font-hand); font-weight: 600; font-size: 27px; line-height: 1; color: var(--berry); }
.step-tag b { font-family: var(--font-body); font-size: 14px; font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--berry); border-radius: 99px; padding: 6px 11px; }
.chapter h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 4.6vw, 32px); line-height: 1.18; letter-spacing: -.015em; margin: 0 0 var(--s3); color: var(--ink); }
.chapter p { margin: 0; color: var(--ink-soft); max-width: 32em; }
.chapter .pair + .pair { margin-top: var(--s5); padding-top: var(--s5); border-top: 2px dashed var(--crust-deep); }

/* steps (short landings) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s7); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }
.steps li { position: relative; display: grid; gap: var(--s3); justify-items: center; text-align: center; align-content: start; }
.steps .chapter-art { padding: 18px 0 8px; width: 100%; }
.steps .liner { width: min(100%, 330px); }
.steps .phone { width: min(56vw, 210px); }
.steps .step-tag { justify-content: center; margin: var(--s2) 0 0; }
.steps h3 { font-family: var(--font-display); font-weight: 600; font-size: 23px; line-height: 1.2; margin: 0; }
.steps p { margin: 0; color: var(--ink-soft); max-width: 22em; }
@media (min-width: 860px) {
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 200px; right: -30px; width: 40px; height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cpath d='M2 15c9-9 20-11 33-4m0 0l-7-6m7 6l-8 4' fill='none' stroke='%23BE2F4C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
}

/* privacy (recipe card) */
.privacy-block {
  position: relative; margin: 0 auto; max-width: 940px; overflow: hidden;
  background: var(--paper); border-radius: 22px; padding: 40px 22px 30px;
  box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(201, 121, 42, .16) 31px 32px);
  background-position: 0 22px;
}
.privacy-block::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: repeating-linear-gradient(90deg, var(--berry) 0 18px, var(--paper) 18px 36px); opacity: .85; }
@media (min-width: 720px) { .privacy-block { padding: 52px 48px 40px; display: grid; grid-template-columns: auto 1fr; gap: 0 32px; align-items: start; } }
.privacy-block .lock { width: 76px; height: 76px; margin-bottom: 12px; }
.privacy-block h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 5vw, 34px); line-height: 1.15; margin: 0 0 12px; color: var(--ink); }
.privacy-block p { margin: 0; color: var(--ink-soft); line-height: 32px; }

/* FAQ */
.faq { display: grid; gap: var(--s5); }
.faq .sec-head { margin-bottom: 0; }
@media (min-width: 900px) { .faq { grid-template-columns: .8fr 1.2fr; gap: var(--s8); align-items: start; } .faq .sec-head { position: sticky; top: 24px; } }
.faq details { background: var(--paper); border: 1.5px solid var(--crust); border-radius: 16px; margin-bottom: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq details[open] { border-color: var(--crust-deep); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 17px; line-height: 1.4; padding: 16px 56px 16px 20px; min-height: 58px; position: relative; display: flex; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--berry-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v10M5 10h10' stroke='%2393203A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-soft); }

/* final CTA: chocolate-drip band */
.cta-final { position: relative; margin-top: 0; background: var(--berry-deep); color: #FFF3EE; text-align: center; padding: 104px 16px 84px; overflow: hidden; isolation: isolate; }
.cta-final .drip { position: absolute; top: -1px; left: 0; width: 100%; height: 66px; z-index: -1; }
.cta-final .crumbs { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -2; }
.cta-final h2 { color: #fff; font-size: clamp(36px, 8vw, 60px); }
.cta-final p { margin: 12px auto 28px; max-width: 30em; color: #FFE4E8; font-size: 18px; }
.cta-final .stores { justify-content: center; }
.cta-final .store-badge { background: var(--paper); color: var(--cocoa); border-color: var(--paper); }
.cta-final .store-badge + .store-badge { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.cta-final a.store-badge:hover, .cta-final a.store-badge:focus-visible { background: #fff; color: var(--berry-deep); border-color: #fff; }
.cta-final :focus-visible { outline-color: #fff; }

/* legal links + footer */
nav.links { display: grid; gap: 12px; padding-top: var(--s7); padding-bottom: var(--s5); }
@media (min-width: 760px) { nav.links { grid-template-columns: repeat(3, 1fr); } }
nav.links a { display: block; background: var(--paper); border: 1.5px solid var(--crust); border-radius: 16px; padding: 16px 20px; text-decoration: none; font-weight: 700; color: var(--ink); transition: border-color .2s ease, transform .2s ease; }
nav.links a:hover { border-color: var(--caramel); transform: translateY(-2px); color: var(--berry-deep); }
nav.links a span { display: block; color: var(--ink-soft); font-weight: 400; font-size: 15px; margin-top: 2px; }
.site-foot { border-top: 1.5px dashed var(--crust-deep); padding-top: 20px; padding-bottom: 36px; color: var(--ink-soft); font-size: 15px; }
.site-foot p { margin: 0 0 6px; }

/* ---------- Legal pages (generated by build_legal.py) ---------- */
header.site { background: var(--paper); border-bottom: 1.5px solid var(--crust); }
header.site .wrap, .doc, .doc + .site-foot { max-width: 860px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 8px; }
.brand small { font-family: var(--font-body); font-weight: 600; color: var(--ink-soft); font-size: 14px; }
.brand:hover { color: var(--ink); }
header.site nav { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 15px; }
header.site nav a { text-decoration: none; font-weight: 600; padding: 12px 0; color: var(--ink-soft); }
header.site nav a:hover { color: var(--berry-deep); }
header.site nav a[aria-current="page"] { color: var(--ink); text-decoration: underline wavy var(--caramel) 1.5px; text-underline-offset: 7px; }
.doc { padding-top: 40px; padding-bottom: 48px; }
.doc h1 { font-family: var(--font-display); font-size: clamp(32px, 7vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 6px; color: var(--ink); }
.doc h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.25; margin: 40px 0 10px; color: var(--ink); }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc .updated { color: var(--ink-soft); margin-top: 0; font-size: 15px; }
.doc li { margin: 6px 0; }
.doc a { overflow-wrap: anywhere; }
.table { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1.5px solid var(--crust); }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--paper); }
th, td { border-bottom: 1px solid var(--crust); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--caramel-soft); }
tr:last-child td { border-bottom: 0; }

/* ---------- Motion (all of it off for prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; } .rise.d4 { animation-delay: .32s; }
  .hero-art .phone { animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-art .ticket { animation: pop 1s .45s cubic-bezier(.2, .7, .2, 1) both; }
  .tbar span { animation: grow .9s 1s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
  .sprinkles .sp { animation: drift 9s ease-in-out infinite alternate; }
  .sprinkles .sp:nth-child(3n) { animation-duration: 12s; animation-delay: -3s; }
  .sprinkles .sp:nth-child(3n+1) { animation-duration: 10s; animation-delay: -6s; }
  .js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js-reveal .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; translate: 0 22px; } }
@keyframes pop { from { opacity: 0; translate: 0 30px; scale: .96; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes drift { from { transform: translateY(-7px) rotate(-14deg); } to { transform: translateY(9px) rotate(16deg); } }
