/* Sésame website. Colors match the app's asset catalog (AccentColor, Paper, Card) and the logo palette. */

:root {
  --paper: #F9F1E7;
  --paper-2: #F3E6D6;
  --card: #FFFFFF;
  --ink: #2A1A10;
  --ink-2: #6B5A4E;
  --line: rgba(42, 26, 16, 0.12);
  --accent: #B4531A;          /* terracotta: fills, large text */
  --accent-text: #9A4413;     /* terracotta darkened for small text (contrast 5.6:1 on paper) */
  --on-accent: #FFFFFF;
  --amber: #F0A04B;
  --seed: #F8C27E;
  --cream: #FFF7ED;
  --in-use: #5B4FE0;
  --band: #2A1A10;            /* the dark privacy band */
  --band-ink: #FFF7ED;
  --band-ink-2: #D9C6B4;
  --shadow: 0 1px 2px rgba(42, 26, 16, 0.06), 0 12px 32px rgba(42, 26, 16, 0.10);
  --phone: #1A120D;
  --phone-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 60px -20px rgba(42, 26, 16, 0.45), 0 12px 24px -12px rgba(42, 26, 16, 0.25);
  --in-use-text: #5B4FE0;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  --radius-card: 22px;
  --radius-tile: 10px;
  --max: 1120px;
  --gutter: 20px;

  color-scheme: light;
}

/* Dark: follows the system unless the viewer picked light; an explicit dark choice wins too. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14100D;
    --paper-2: #1E1814;
    --card: #221B16;
    --ink: #F6EDE3;
    --ink-2: #BBA99A;
    --line: rgba(255, 240, 225, 0.12);
    --accent: #F0A04B;
    --accent-text: #F0A04B;
    --on-accent: #2A1A10;
    --band: #221B16;
    --band-ink: #F6EDE3;
    --band-ink-2: #BBA99A;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    --phone: #0B0806;
    --phone-shadow: 0 0 0 1px rgba(255, 240, 225, 0.16), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    --in-use-text: #A29BFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14100D;
  --paper-2: #1E1814;
  --card: #221B16;
  --ink: #F6EDE3;
  --ink-2: #BBA99A;
  --line: rgba(255, 240, 225, 0.12);
  --accent: #F0A04B;
  --accent-text: #F0A04B;
  --on-accent: #2A1A10;
  --band: #221B16;
  --band-ink: #F6EDE3;
  --band-ink-2: #BBA99A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  --phone: #0B0806;
  --phone-shadow: 0 0 0 1px rgba(255, 240, 225, 0.16), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  --in-use-text: #A29BFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  z-index: 100;
}
.skip:focus { top: var(--space-4); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-4);
}

.brand { display: inline-flex; align-items: center; color: var(--ink); padding: var(--space-2) 0; }
.brand svg { width: 104px; height: auto; }

.nav { display: flex; align-items: center; gap: var(--space-1); }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color 150ms ease;
}
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--paper-2); }
@media (max-width: 520px) {
  .nav .nav-optional { display: none; }
  .nav a { padding: 10px 10px; }
}

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; text-wrap: balance; }

h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}
h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
}
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 650; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 var(--space-4);
}

.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.muted { color: var(--ink-2); }

/* The seed: the accent over the é, reused as a marker. */
.seed {
  display: inline-block;
  width: 0.62em;
  height: 0.82em;
  color: var(--accent);
  flex: none;
}

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: 8px 22px 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.15;
}
.store-pill small { display: block; font-size: 12px; font-weight: 500; opacity: 0.75; letter-spacing: 0.01em; }
.store-pill svg { width: 22px; height: 22px; flex: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-ghost:hover { background: var(--paper-2); border-color: transparent; }
.btn-ghost svg { width: 18px; height: 18px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Hero ---------- */

.hero { padding: var(--space-8) 0 var(--space-9); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-top: var(--space-5); }

.hero-visual { position: relative; display: flex; justify-content: center; }

@media (max-width: 880px) {
  .hero { padding-top: var(--space-6); padding-bottom: var(--space-8); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { margin-top: var(--space-5); }
}

/* ---------- Phone frame (real Simulator screenshots inside) ---------- */

.phone {
  position: relative;
  width: min(300px, 74vw);
  aspect-ratio: 603 / 1311;
  padding: 9px;
  border-radius: 48px;
  background: var(--phone);
  box-shadow: var(--phone-shadow);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40px;
  background: var(--paper);
}

/* Floating "peek" card next to the hero phone. */
.peek-card {
  position: absolute;
  left: max(-8px, calc(50% - 300px));
  bottom: 14%;
  width: 236px;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.peek-card .tap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: var(--space-2);
}
.peek-card .tap svg { width: 16px; height: 16px; }
.peek-card .title { font-weight: 650; font-size: 17px; line-height: 1.2; }
.peek-card .path { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.peek-card ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.peek-card li { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; }

.tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  background: #F4E3D7;
  color: #B4531A;
}
.tile svg { width: 16px; height: 16px; }
.tile.violet { background: #EFE3F8; color: #8A43C4; }
.tile.green { background: #E2F1E4; color: #2F8A42; }
.tile.blue { background: #E1ECFB; color: #2F6FDE; }
.tile.gray { background: #ECEAE7; color: #5E5A55; }

@media (max-width: 880px) {
  .peek-card { left: 0; bottom: 8%; width: 210px; }
}
@media (max-width: 480px) {
  .peek-card { left: 0; bottom: 5%; width: 178px; padding: var(--space-3); border-radius: 18px; }
  .peek-card .title { font-size: 15px; }
  .peek-card ul { gap: 6px; margin-top: var(--space-2); }
  .peek-card li { font-size: 13px; }
  .peek-card .tile { width: 24px; height: 24px; border-radius: 7px; }
  .peek-card .tile svg { width: 14px; height: 14px; }
  .hero-visual { justify-content: flex-end; }
}

/* ---------- Sections ---------- */

section { scroll-margin-top: 72px; }
.section { padding: var(--space-9) 0; }
.section-head { max-width: 40em; margin-bottom: var(--space-7); }
.section-head .lede { margin-top: var(--space-4); }

/* How it works: three steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.step-num {
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-text);
  letter-spacing: 0.04em;
}
.step p { margin: 0; color: var(--ink-2); }
.step-art {
  height: 112px;
  border-radius: 14px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-2);
  overflow: hidden;
}
.crumbs { display: flex; align-items: center; gap: 8px 6px; font-size: 14px; font-weight: 600; flex-wrap: wrap; justify-content: center; padding: 0 var(--space-3); }
/* Each "› name" pair stays together, so a wrapped line never ends on a lone arrow. */
.crumbs b { display: inline-flex; align-items: center; gap: 6px; font-weight: inherit; white-space: nowrap; }
.crumbs span { background: var(--card); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.crumbs i { font-style: normal; color: var(--ink-2); }
/* The end of the path: the thing you were looking for, in the logo's bright amber. */
.crumbs .hit { cursor: pointer; }
.crumbs .hit span {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #2A1A10;
  border-color: color-mix(in srgb, var(--amber) 70%, transparent);
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--amber) 80%, transparent);
  transition: transform 200ms var(--spring);
}
.crumbs .hit span::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: var(--amber);
  transform-origin: left center;
}
@media (hover: hover) and (pointer: fine) {
  .crumbs .hit:hover span { transform: translateY(-1px) scale(1.04); }
}

.box-art { position: relative; width: 78px; height: 64px; border-radius: 14px; background: var(--accent); }
.box-art::before { content: ""; position: absolute; left: -6px; right: -6px; top: -10px; height: 18px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 78%, #000); }
.box-art .tag { position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }
.box-art .tag svg { width: 12px; height: 12px; color: var(--accent); }

.peek-strip { display: flex; gap: 6px; }
.peek-strip .tile { width: 34px; height: 34px; border-radius: 9px; }
.peek-strip .tile svg { width: 18px; height: 18px; }

@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* Spotlights: screenshot + copy */
.spotlight {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-8);
  align-items: center;
}
.spotlight + .spotlight { margin-top: var(--space-9); }
.spotlight.flip { grid-template-columns: 1.15fr 0.85fr; }
.spotlight.flip .spotlight-visual { order: 2; }
.spotlight-visual { display: flex; justify-content: center; }
.spotlight-visual .stage {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: var(--space-7) var(--space-4);
  border-radius: 32px;
  background: var(--paper-2);
}
.spotlight .lede { margin-top: var(--space-4); }

.checks { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: grid; gap: var(--space-3); }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: var(--space-3); align-items: start; }
.checks svg { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); }

@media (max-width: 880px) {
  .spotlight, .spotlight.flip { grid-template-columns: 1fr; gap: var(--space-6); }
  .spotlight.flip .spotlight-visual { order: 0; }
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.feature .tile { width: 40px; height: 40px; border-radius: 11px; margin-bottom: var(--space-4); }
.feature .tile svg { width: 20px; height: 20px; }
.feature p { margin: var(--space-2) 0 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 880px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Privacy band */
.band {
  background: var(--band);
  color: var(--band-ink);
  border-radius: 36px;
  padding: var(--space-8) var(--space-7);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-7);
  align-items: center;
}
.band h2 { color: var(--band-ink); }
.band p { color: var(--band-ink-2); font-size: 18px; margin: var(--space-4) 0 0; max-width: 32em; }
.band a { color: var(--seed); }
.band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.band li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.07);
  border: 1px solid rgba(255, 247, 237, 0.10);
  font-weight: 600;
}
.band li svg { width: 20px; height: 20px; color: var(--seed); flex: none; }
@media (max-width: 880px) {
  .band { grid-template-columns: 1fr; padding: var(--space-7) var(--space-5); border-radius: 28px; }
}

/* Closing call to action */
.closing { text-align: center; padding: var(--space-9) 0; }
.closing .mark { width: 88px; height: 88px; margin: 0 auto var(--space-5); border-radius: 22px; box-shadow: var(--shadow); }
.closing .cta-row { justify-content: center; }
.closing .lede { margin: var(--space-4) auto 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: var(--space-6) 0 var(--space-7); font-size: 14px; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.site-footer a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Document pages (privacy, support) ---------- */

.doc { padding: var(--space-7) 0 var(--space-9); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5.5vw, 56px); }
.doc .updated { color: var(--ink-2); font-size: 15px; margin: var(--space-4) 0 0; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin: var(--space-7) 0 var(--space-3); letter-spacing: -0.02em; }
.doc h3 { margin: var(--space-5) 0 var(--space-2); }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: var(--space-2); }

.summary {
  margin-top: var(--space-6);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
}
.summary h2 { margin-top: 0; font-size: 20px; }
.summary ul { margin: 0; }

table.data { width: 100%; border-collapse: collapse; margin-top: var(--space-4); font-size: 15px; }
table.data th, table.data td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 650; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* FAQ */
.faq { margin-top: var(--space-4); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  min-height: 56px;
  font-weight: 600;
  font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); transition: transform 200ms ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .answer { padding: 0 0 var(--space-5); color: var(--ink); }
.faq .answer p { margin: 0 0 var(--space-3); }
.faq .answer p:last-child { margin-bottom: 0; }

.contact-card {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.contact-card p { margin: 4px 0 0; color: var(--ink-2); }
.contact-card .addr { color: var(--ink); font-weight: 600; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: filter 150ms ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */

.js .reveal { transform: translateY(14px); transition: transform 600ms var(--ease-out, ease-out); }
.js .reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   Playful layer: small interactive demos and micro-motion.
   Every state change still works with Reduce Motion; only the movement goes.
   ===================================================================== */

:root {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.fine { font-size: 15px; color: var(--ink-2); margin: var(--space-4) 0 0; }

/* ---------- Header: the seed hops when you point at the wordmark ---------- */

.brand-seed { transform-box: fill-box; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .brand:hover .brand-seed { animation: seed-hop 700ms var(--ease-out); }
}
@keyframes seed-hop {
  0% { transform: none; }
  30% { transform: translateY(-38px) rotate(-14deg); }
  55% { transform: translateY(0) scaleY(0.82); }
  72% { transform: translateY(-8px) rotate(4deg); }
  100% { transform: none; }
}

/* ---------- Hero: tap the tag, the bag opens ---------- */

.peek-head { display: flex; align-items: center; gap: var(--space-3); }

.mini-box { position: relative; width: 40px; height: 36px; flex: none; }
.mini-box .body {
  position: absolute; left: 3px; right: 3px; bottom: 0; height: 26px;
  border-radius: 7px; background: var(--accent);
}
.mini-box .lid {
  position: absolute; left: 0; right: 0; top: 3px; height: 9px;
  border-radius: 4px; background: color-mix(in srgb, var(--accent) 72%, #000);
  transform-origin: 2px 100%;
  transition: transform 450ms var(--spring);
  z-index: 1;
}
.peek-card.open .mini-box .lid { transform: rotate(-32deg) translate(-1px, -3px); }

.tag-btn {
  position: relative;
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-3);
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  border: 0; border-radius: 999px;
  background: var(--paper-2);
  color: var(--accent-text);
  font: inherit; font-size: 14px; font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: transform 150ms ease, background-color 150ms ease;
}
.tag-btn:hover { background: color-mix(in srgb, var(--accent) 14%, var(--paper-2)); }
.tag-btn:active { transform: scale(0.97); }
.tag-btn svg { width: 18px; height: 18px; position: relative; }
.tag-btn .tag-label { position: relative; }
.tag-btn .ripple {
  position: absolute; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  transform: scale(0); opacity: 0;
}
.peek-card:not(.open) .tag-btn svg { animation: nfc-nudge 2.4s ease-in-out infinite; }
@keyframes nfc-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(3px); } 90% { transform: translateX(-1px); } }
.tag-btn.pulse .ripple { animation: ripple 600ms var(--ease-out); }
@keyframes ripple { from { transform: scale(0); opacity: 1; } to { transform: scale(7); opacity: 0; } }

.peek-card ul { position: relative; }
.peek-card.no-anim li, .peek-card.no-anim ul::after { transition: none !important; }
.peek-card li { transition: opacity 260ms ease, transform 260ms ease; }
.peek-card.closed li { opacity: 0; transform: translateY(-10px) scale(0.9); }
.peek-card.open li {
  transition: opacity 320ms ease calc(var(--i) * 70ms + 140ms), transform 520ms var(--spring) calc(var(--i) * 70ms + 140ms);
}
.peek-card ul::after {
  content: "What’s inside? Tap the tag to peek.";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center; padding: 0 var(--space-3);
  font-size: 13px; color: var(--ink-2);
  border: 1.5px dashed var(--line); border-radius: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
.peek-card.closed ul::after { opacity: 1; transition-delay: 150ms; }

/* ---------- How it works: the drawings act out each step ---------- */

.box-art .tag { overflow: visible; }
.box-art .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--cream); opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .step.in .crumbs > * { animation: pop 360ms var(--spring) both; animation-delay: calc(var(--i) * 50ms + 200ms); }
  /* Found it: the yoga mat starts as an outline like the others, then fills with amber and pulses once.
     Tapping it plays this again (site.js). */
  .step.in .crumbs > .hit span { animation: ink-in 320ms var(--ease-out) 560ms both, found 480ms var(--ease-out) 880ms; }
  .step.in .crumbs > .hit span::before { animation: fill-in 320ms var(--ease-out) 560ms both; }
  .step.in .crumbs > .hit.reroll span { animation-delay: 0ms, 320ms; }
  .step.in .crumbs > .hit.reroll span::before { animation-delay: 0ms; }
  .step.in .crumbs > .hit.reset span,
  .step.in .crumbs > .hit.reset span::before { animation: none; }
  .step.in .peek-strip .tile { animation: drop-in 560ms var(--spring) both; animation-delay: calc(var(--i) * 120ms + 350ms); }
  .step.in .box-art .ring { animation: ring 1.6s var(--ease-out) 3; animation-delay: 400ms; }
  .step.in .box-art .ring.r2 { animation-delay: 900ms; }
  .step.in .box-art { animation: box-wobble 700ms var(--ease-out) 300ms; }
}
@keyframes pop { from { transform: translateY(4px) scale(0.85); } to { transform: none; } }
@keyframes fill-in { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ink-in { from { color: var(--ink); } to { color: #2A1A10; } }
@keyframes found {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 60%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--amber) 80%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent, 0 6px 18px -6px color-mix(in srgb, var(--amber) 80%, transparent); }
}
@keyframes drop-in { from { transform: translateY(-20px) rotate(-8deg); } to { transform: none; } }
@keyframes ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes box-wobble { 0%, 100% { transform: none; } 30% { transform: rotate(-3deg); } 60% { transform: rotate(2deg); } }

/* ---------- Expiry: read a label ---------- */

.reader {
  margin-top: var(--space-5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.reader-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.reader-title { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 650; font-size: 15px; }
.reader-title svg { width: 18px; height: 18px; color: var(--accent); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); }
.seg button {
  min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(42, 26, 16, 0.15); }

.labels { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-top: var(--space-4); }
.pack-label {
  position: relative;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 26, 16, 0.12);
  border-radius: 8px;
  background: #FFFDF8;
  color: #2A1A10;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 1px 0 rgba(42, 26, 16, 0.05), 0 4px 10px -6px rgba(42, 26, 16, 0.25);
  transition: transform 300ms var(--spring), box-shadow 200ms ease, outline-color 200ms ease;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.pack-label:hover { transform: rotate(0deg) translateY(-2px); }
.pack-label[aria-pressed="true"] { transform: rotate(0deg) scale(1.02); outline-color: var(--accent); }
.pack-label::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -6px; width: 4px;
  background: var(--amber);
  box-shadow: 0 0 14px 4px color-mix(in srgb, var(--amber) 60%, transparent);
  opacity: 0;
}
.pack-label.scanning::after { animation: sweep 620ms ease-in-out; }
@keyframes sweep { 0% { left: -6px; opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% + 6px); opacity: 0; } }

.reader-out {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: 14px;
  background: var(--paper-2);
  display: flex; flex-direction: column; gap: 4px;
  min-height: 152px;
}
.reader-kicker { font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.reader-date { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.reader-alt {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 13px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.reader-alt[hidden] { display: none; }
.reader-why { margin: var(--space-2) 0 0; font-size: 14px; color: var(--ink-2); }
.reader-out.swap > * { animation: fade-up 380ms var(--ease-out) both; }
.reader-out.swap > :nth-child(2) { animation-delay: 40ms; }
.reader-out.swap > :nth-child(3) { animation-delay: 90ms; }
.reader-out.swap > :nth-child(4) { animation-delay: 130ms; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Take out / put back: the toolbox ---------- */

.toolbox {
  margin-top: var(--space-5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.tb-head { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-3); }
.tb-head > .tile { width: 40px; height: 40px; border-radius: 11px; }
.tb-head > .tile svg { width: 20px; height: 20px; }
.tb-name { flex: 1; min-width: 0; }
.tb-name .title { font-weight: 650; line-height: 1.2; }
.tb-name .path { font-size: 13px; color: var(--ink-2); }
.peek-strip.mini { gap: 4px; }
.peek-strip.mini .tile { width: 28px; height: 28px; border-radius: 8px; transition: opacity 300ms ease, filter 300ms ease, transform 420ms var(--spring); }
.peek-strip.mini .tile svg { width: 15px; height: 15px; }
.peek-strip.mini .tile.is-out { opacity: 0.32; filter: grayscale(1); transform: scale(0.86); }
.peek-strip.mini .tile.bump { transform: scale(1.18); }

.tb-rows { list-style: none; margin: 0; padding: 0; }
.tb-row { position: relative; border-top: 1px solid var(--line); overflow: hidden; }
.tb-under {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: var(--space-2);
  padding-left: var(--space-4);
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 650;
}
.tb-row[data-out="false"] .tb-under { background: var(--in-use); color: #fff; }
.tb-under svg { width: 18px; height: 18px; }
.tb-front {
  position: relative;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0;
  background: var(--card);
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  cursor: grab;
  transform: translateX(var(--dx, 0px));
  transition: transform 420ms var(--spring);
}
.tb-row.dragging .tb-front { transition: none; cursor: grabbing; }
.tb-front .tile { transition: opacity 300ms ease; }
.tb-row[data-out="true"] .tb-front .tile { opacity: 0.45; }
.tb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb-item { font-weight: 600; font-size: 15px; line-height: 1.3; }
.tb-status { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.tb-row[data-out="true"] .tb-status { color: var(--in-use-text); }
.tb-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.tb-btn {
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; flex: none;
  transition: background-color 150ms ease, transform 150ms ease;
}
.tb-btn:hover { background: var(--paper-2); }
.tb-btn:active { transform: scale(0.96); }
.tb-hint { margin: var(--space-3) 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- Feature cards: each icon does its thing on hover ---------- */

.feature { transition: transform 250ms var(--ease-out), box-shadow 250ms ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .tile svg { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .feature:hover .fx-search { animation: fx-search 700ms var(--ease-out); }
  .feature:hover .fx-barcode { animation: fx-barcode 600ms var(--ease-out); }
  .feature:hover .fx-camera { animation: fx-camera 500ms var(--ease-out); }
  .feature:hover .fx-mic { animation: fx-mic 900ms ease-in-out; }
  .feature:hover .fx-grid { animation: fx-grid 600ms var(--spring); }
  .feature:hover .fx-sparkle { animation: fx-sparkle 800ms var(--ease-out); }
}
@keyframes fx-search { 0% { transform: none; } 25% { transform: translate(-3px, -2px) rotate(-12deg); } 55% { transform: translate(3px, 1px) rotate(8deg); } 100% { transform: none; } }
@keyframes fx-barcode { 0% { transform: none; } 30% { transform: scaleY(0.6); } 60% { transform: scaleY(1.12); } 100% { transform: none; } }
@keyframes fx-camera { 0% { transform: none; } 35% { transform: scale(0.8); } 70% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes fx-mic { 0%, 100% { transform: none; } 20% { transform: scale(1.15); } 40% { transform: scale(0.95); } 60% { transform: scale(1.1); } 80% { transform: scale(0.98); } }
@keyframes fx-grid { from { transform: rotate(0); } to { transform: rotate(90deg); } }
@keyframes fx-sparkle { 0% { transform: none; } 50% { transform: rotate(90deg) scale(1.25); } 100% { transform: rotate(180deg); } }

/* ---------- Closing: open sesame ---------- */

.mark-btn {
  display: block;
  margin: 0 auto var(--space-5);
  padding: 0; border: 0; background: none;
  width: 88px; height: 88px;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 350ms var(--spring);
}
.mark-btn:hover { transform: rotate(-5deg) scale(1.05); }
.mark-btn:active { transform: scale(0.94); }
.mark-btn .mark { width: 100%; height: 100%; margin: 0; border-radius: 0; box-shadow: none; }
.m-box, .m-seed { transform-box: fill-box; transform-origin: 50% 100%; }
.m-seed { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .mark-btn.play .b2 { animation: m-hop 600ms var(--ease-out); }
  .mark-btn.play .b3 { animation: m-hop 600ms var(--ease-out) 90ms; }
  .mark-btn.play .b1 { animation: m-hop 600ms var(--ease-out) 180ms; }
  .mark-btn.play .m-seed { animation: m-seed 900ms var(--spring) 240ms; }
}
@keyframes m-hop { 0%, 100% { transform: none; } 35% { transform: translateY(-22%) scale(0.94, 1.06); } 65% { transform: translateY(0) scale(1.06, 0.92); } }
@keyframes m-seed { 0% { transform: none; } 45% { transform: translateY(-40%) rotate(200deg) scale(1.2); } 100% { transform: rotate(360deg); } }
