/* Mabel Nest site. Light first: paper and rose carry the page, mulberry is
   the accent (buttons, links, headings), pink is the small spark.
   Dark mode is its own palette, not an inversion. */
:root {
  --bg: #FFFAFB;
  --surface: #FFFFFF;
  --tint: #FDEEF2;
  --rose: #F7D6DE;
  --fg: #3A0F21;
  --muted: #6B4A57;
  --line: #EEDCE2;
  --primary: #5C1A33;
  --primary-fg: #FFFFFF;
  --primary-hover: #4A1428;
  --link: #8E2F52;
  --pink: #FF8FA3;
  --ok-bg: #E4F3EA; --ok-fg: #24603D;
  --warn-bg: #FFF1D6; --warn-fg: #7A4B00;
  --shadow: 0 1px 2px rgba(58,15,33,.06), 0 12px 32px -12px rgba(58,15,33,.18);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #160A10; --surface: #211019; --tint: #2B1521; --rose: #4A2234;
    --fg: #FBEFF2; --muted: #CBAEB9; --line: #3A1E2C;
    --primary: #FF8FA3; --primary-fg: #3A0F21; --primary-hover: #FFA5B6; --link: #FFB3C1;
    --ok-bg: #173A26; --ok-fg: #9BDDB4; --warn-bg: #3D2C0C; --warn-fg: #F5CF85;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #160A10; --surface: #211019; --tint: #2B1521; --rose: #4A2234;
  --fg: #FBEFF2; --muted: #CBAEB9; --line: #3A1E2C;
  --primary: #FF8FA3; --primary-fg: #3A0F21; --primary-hover: #FFA5B6; --link: #FFB3C1;
  --ok-bg: #173A26; --ok-fg: #9BDDB4; --warn-bg: #3D2C0C; --warn-fg: #F5CF85;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--text); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: var(--link); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 40; background: var(--primary); color: var(--primary-fg); padding: 10px 16px; border-radius: 8px; font-weight: 800; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

/* Type: Fraunces only for page and section titles; everything else is Nunito. */
h1, h2 { font-family: var(--display); font-style: italic; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.2vw, 58px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font: 800 18px/1.3 var(--text); margin: 0; }
.lede { font-size: 19px; color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { font-size: 14px; font-weight: 800; color: var(--link); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; font: 800 15px/1 var(--text); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--muted); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: italic 600 22px/1 var(--display); }
.logo-tile { width: 34px; height: 34px; border-radius: 9px; background: #5C1A33; display: grid; place-items: center; flex: none; }
.logo-tile svg { width: 22px; height: 24px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--fg); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--tint); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.signin { color: var(--fg); font-weight: 700; font-size: 15px; text-decoration: none; padding: 8px 12px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 12px; }
  .nav { order: 3; width: 100%; margin: 0 -12px; padding-bottom: 8px; overflow-x: auto; }
  .logo { margin-right: auto; }
  .signin { display: none; }
}

/* Sections */
.section { padding-block: 88px; }
.section-tight { padding-block: 56px; }
.section-head { display: grid; gap: 12px; max-width: 42em; margin-bottom: 40px; }
@media (max-width: 640px) { .section { padding-block: 56px; } }
.tinted { background: var(--tint); }

/* Page hero for inner pages */
.page-hero { padding-block: 64px 40px; display: grid; gap: 16px; }

/* Cards and badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-rose { background: var(--rose); color: var(--fg); }
.example-tag { font-size: 12px; color: var(--muted); }

/* App mock-ups, drawn in HTML from the same tokens so they follow the theme */
.window { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.window-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.app { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.app-side { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 2px; align-content: start; font-size: 13px; }
.app-side b { display: block; padding: 7px 10px; border-radius: 7px; font-weight: 700; color: var(--muted); }
.app-side b.on { background: var(--tint); color: var(--fg); }
.app-main { padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.app-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.app-title strong { font-size: 16px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-variant-numeric: tabular-nums; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.kpi b { display: block; font-size: 22px; line-height: 1.1; }
.kpi small { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mini-table tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .app { grid-template-columns: 1fr; } .app-side { display: none; } }

.phone { width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 10px; box-shadow: var(--shadow); }
.phone-screen { border-radius: 22px; background: var(--bg); padding: 16px 14px; display: grid; gap: 10px; font-size: 13px; }
.phone-screen .row { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.phone-screen .row small { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 36px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-grid h4 { margin: 0 0 10px; font: 800 13px/1 var(--text); color: var(--fg); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--fg); text-decoration: underline; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

.cta-strip { border-radius: 18px; background: var(--rose); padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-strip h2 { font-size: clamp(26px, 3vw, 34px); }
@media (max-width: 640px) { .cta-strip { padding: 28px 22px; } }

@media (prefers-reduced-motion: no-preference) { .btn, .nav a { transition: background-color .15s ease, box-shadow .15s ease; } }

.theme-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 700 14px var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--muted); }
@media (max-width: 420px) { .theme-toggle span { display: none; } }

/* ---------- The playful layer: our own shapes, pink family only ---------- */
:root { --s-mulberry: #5C1A33; --s-raspberry: #8E2F52; --s-pink: #FF8FA3; --s-rose: #F7D6DE; --s-blush: #FFC2CD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s-mulberry: #7A2846; --s-rose: #F7D6DE; } }
:root[data-theme="dark"] { --s-mulberry: #7A2846; --s-rose: #F7D6DE; }

.egg { display: inline-block; width: 56px; height: 72px; color: var(--s-pink); flex: none; }
.egg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.egg-rose { color: var(--s-rose); }
.egg-blush { color: var(--s-blush); }

.shape-row { margin-top: 24px; height: 80px; overflow: hidden; line-height: 0; }
.shape-row svg { width: 100%; height: 80px; display: block; }

/* Shapes floating around the hero product */
.float { position: absolute; z-index: 0; }
.float-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--s-pink); top: -14px; right: 28%; }
.float-nest { width: 90px; height: 45px; border-radius: 90px 90px 0 0; background: var(--s-raspberry); bottom: 70px; right: -34px; }
.float-egg { top: 40%; left: -40px; width: 44px; height: 56px; color: var(--s-blush); }
@media (max-width: 960px) { .float { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  @keyframes drift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(6deg); } }
  @keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
  .float { animation: drift 7s ease-in-out infinite; }
  .float-nest { animation-duration: 9s; animation-delay: -3s; }
  .float-egg { animation-duration: 8s; animation-delay: -5s; }
  .btn:hover .egg-mini, .cta-eggs:hover .egg { animation: wobble .6s ease-in-out; }
  .pillar-card:hover .egg { animation: wobble .6s ease-in-out; }
}
.egg-mini { width: 16px; height: 20px; color: currentColor; display: inline-block; }
.egg-mini svg { width: 100%; height: 100%; display: block; }

/* Three promises, colour-coded within the pink family */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar-card { border-radius: 20px; padding: 28px; display: grid; gap: 12px; align-content: start; min-width: 0; position: relative; overflow: hidden; }
.pillar-card h3 { font: italic 600 26px/1.15 var(--display); }
.pillar-card ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.pillar-card .egg { position: absolute; right: 18px; top: 18px; width: 44px; height: 56px; }
.pc-mulberry { background: #5C1A33; color: #FFFFFF; }
.pc-mulberry p, .pc-mulberry li { color: #F7D6DE; }
.pc-rose { background: var(--s-rose); color: #3A0F21; }
.pc-rose p, .pc-rose li { color: #5C1A33; }
.pc-pink { background: var(--s-pink); color: #3A0F21; }
.pc-pink p, .pc-pink li { color: #3A0F21; }
.pillar-card .tag { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* Big honest numbers */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.numbers div { display: grid; gap: 4px; min-width: 0; }
.numbers b { font: italic 600 clamp(38px, 4.4vw, 54px)/1 var(--display); font-variant-numeric: tabular-nums; }
.numbers span { color: var(--muted); font-size: 15px; }
.n1 { color: var(--s-mulberry); } .n2 { color: var(--s-raspberry); } .n3 { color: #E2687F; } .n4 { color: var(--s-mulberry); }
:root[data-theme="dark"] .n1, :root[data-theme="dark"] .n4 { color: var(--s-rose); } :root[data-theme="dark"] .n2 { color: var(--s-blush); } :root[data-theme="dark"] .n3 { color: var(--s-pink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .n1, :root:not([data-theme="light"]) .n4 { color: var(--s-rose); } :root:not([data-theme="light"]) .n2 { color: var(--s-blush); } :root:not([data-theme="light"]) .n3 { color: var(--s-pink); } }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr 1fr; gap: 28px 16px; } }

/* Support strip */
.support { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px; }
.support .bubble { position: relative; background: var(--surface); border: 2px solid var(--s-rose); border-radius: 18px; padding: 10px 16px; font-weight: 800; justify-self: start; }
@media (max-width: 720px) { .support { grid-template-columns: 1fr; } }

/* Closing ask with egg characters */
.cta-eggs { display: flex; align-items: flex-end; gap: 4px; }
.cta-eggs .egg:nth-child(2) { width: 42px; height: 54px; }
.cta-eggs .egg:nth-child(3) { width: 34px; height: 44px; }

/* Not-found page */
.lost { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding-block: 72px 48px; }
.lost .egg { width: 180px; height: 230px; }
@media (max-width: 720px) { .lost { grid-template-columns: 1fr; } .lost .egg { width: 120px; height: 154px; } }
.pillar-card h3, .pillar-card .tag { padding-right: 56px; }

/* ---------- Steps and comparison ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step > b { font: italic 600 44px/1 var(--display); color: var(--s-raspberry); }
.step .egg { position: absolute; right: 20px; top: 20px; width: 40px; height: 52px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
:root[data-theme="dark"] .step > b { color: var(--s-pink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step > b { color: var(--s-pink); } }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 14px; color: var(--muted); }
.compare tbody th { font-weight: 800; width: 26%; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .us { background: var(--tint); font-weight: 700; }
.compare thead .us { color: var(--fg); font: italic 600 18px var(--display); }

/* ---------- Motion. Everything below is off for reduced motion. ---------- */
.rise span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
  @keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  @keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
  @keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
  @keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  .rise span { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 70ms + 100ms); }
  .hero-copy > :not(h1) { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: .55s; }
  .hero-visual .window { animation: rise .8s cubic-bezier(.2,.7,.2,1) .3s both, floaty 8s ease-in-out 1.2s infinite; }
  .hero-visual .phone { animation: rise .8s cubic-bezier(.2,.7,.2,1) .6s both; }
  .hero-visual .badge { animation: pop .5s cubic-bezier(.2,.7,.2,1) both; }
  .hero-visual tr:nth-child(1) .badge { animation-delay: 1s; }
  .hero-visual tr:nth-child(2) .badge { animation-delay: 1.2s; }
  .hero-visual tr:nth-child(3) .badge { animation-delay: 1.4s; }

  /* Eggs blink now and then and bob gently, each at its own pace. */
  .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
  .egg { animation: bob 4s ease-in-out infinite; }
  .pillar-card:nth-child(2) .egg, .step:nth-child(2) .egg { animation-delay: -1.3s; }
  .pillar-card:nth-child(3) .egg, .step:nth-child(3) .egg { animation-delay: -2.6s; }
  .float-egg.egg { animation: drift 8s ease-in-out -5s infinite; }

  /* The shape row breathes, one shape after another. */
  /* translate, not transform: the eggs carry their own transform attribute, which transform would replace. */
  @keyframes bob-t { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
  .shape-row svg > * { animation: bob-t 5s ease-in-out infinite; }
  .shape-row svg > :nth-child(3n+1) { animation-delay: -1s; }
  .shape-row svg > :nth-child(3n+2) { animation-delay: -2.5s; }
  .shape-row svg > :nth-child(4n) { animation-duration: 6.5s; }

  /* Sections slide up as they arrive. Only blocks below the first screen get .pre (site.js). */
  [data-reveal] { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; }
  [data-reveal].pre { opacity: 0; transform: translateY(28px); }
  .steps .step:nth-child(2), .pillars > :nth-child(2) { transition-delay: .12s; }
  .steps .step:nth-child(3), .pillars > :nth-child(3) { transition-delay: .24s; }

  .pillar-card:hover, .step:hover { transform: translateY(-4px); box-shadow: var(--shadow); transition-delay: 0s; }
  .btn-primary { position: relative; overflow: hidden; }
  .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; }
  .btn-primary:hover::after { transform: translateX(120%); }

  /* Tour: a progress bar on the active tab while it plays by itself. */
  .tab { position: relative; overflow: hidden; }
  .tab .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--s-pink); transform-origin: left; transform: scaleX(0); }
  .tab[aria-selected="true"] .bar.run { animation: fill 6s linear both; }
  [role="tabpanel"]:not([hidden]) { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
}

/* Download: both stores shown, neither available yet. */
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; margin-bottom: 24px; scroll-margin-top: 90px; }
.download-copy { display: grid; gap: 12px; max-width: 34em; min-width: 0; }
.download h2 { font-size: clamp(26px, 3vw, 34px); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 12px; background: var(--fg); color: var(--bg); opacity: .45; cursor: not-allowed; user-select: none; }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: grid; line-height: 1.15; }
.store small { font-size: 11px; font-weight: 700; }
.store b { font-size: 17px; font-weight: 800; }

.verdict { display: block; font-weight: 800; }
.v-no { color: var(--muted); }
.v-yes { color: var(--link); }
.compare td small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.compare .us small { color: var(--fg); }

/* Real screenshots uploaded on /admin replace the drawn examples. */
.has-shot { padding: 0; background: transparent; }
.has-shot img { display: block; width: 100%; height: auto; border-radius: inherit; }
.window.has-shot { overflow: hidden; }
.phone.has-shot { padding: 0; border: 0; background: transparent; box-shadow: none; }
.phone.has-shot img { border-radius: 28px; box-shadow: var(--shadow); }
.store.live { opacity: 1; cursor: pointer; text-decoration: none; }
.store.live:hover { opacity: .9; }
