/* ==========================================================================
   Mangio: marketing site styles
   Brand: brand/BRAND.md (cream / tomato / basil, Fraunces + Inter).
   Fonts are self-hosted (no third-party requests).
   Theme: follows prefers-color-scheme; <html data-theme="light|dark"> overrides it.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (light) ---------- */
:root {
  color-scheme: light;

  --tomato: #D2402B;
  --tomato-deep: #B23420;
  --basil: #3E7B50;
  --limone: #E9A93A;
  --ink: #1C1A17;

  --bg: #F6F3EC;
  --bg-2: #EFEAE0;
  --surface: #FFFFFF;
  --surface-2: #FBF9F4;
  --text: #1C1A17;
  --text-2: #3A362F;
  --muted: #6E6960;
  --line: #E6E0D5;
  --line-strong: #D8D0C2;
  --tint: #FBE7E2;
  --basil-tint: #E3EFE5;
  --basil-ink: #2F6A40;
  --limone-tint: #FBF0D9;

  --accent: var(--tomato);          /* large display accents */
  --accent-ink: var(--tomato-deep); /* small accent text: AA on cream and white */
  --success: var(--basil);
  --focus: #B23420;

  --btn-bg: #D2402B;
  --btn-bg-hover: #B23420;
  --btn-fg: #FFFFFF;
  --btn-ink-bg: #1C1A17;
  --btn-ink-fg: #FFFFFF;
  --header-bg: rgba(246, 243, 236, 0.84);

  --grad: linear-gradient(135deg, #E8563C 0%, #BF341D 100%);
  --paprika: var(--tomato); /* legacy name, used by templates/recipe-share.html */

  --sheet-bg: #F2F0EB;
  --sheet-row: #FFFFFF;
  --phone-frame: #1C1A17;
  --tiktok: #000000;
  --show-sun: none;
  --show-moon: block;

  --shadow-xs: 0 1px 2px rgba(60, 40, 20, 0.06);
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.05), 0 8px 24px -12px rgba(60, 40, 20, 0.16);
  --shadow-md: 0 2px 6px rgba(60, 40, 20, 0.06), 0 18px 40px -18px rgba(60, 40, 20, 0.3);
  --shadow-lg: 0 4px 12px rgba(60, 40, 20, 0.06), 0 34px 70px -26px rgba(60, 40, 20, 0.38);
  --glow: 0 0 0 1px rgba(210, 64, 43, 0.25), 0 24px 60px -20px rgba(210, 64, 43, 0.45);

  --font-display: "Fraunces", ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-card: 24px;
  --radius-md: 20px;
  --radius-btn: 16px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
}

/* ---------- Tokens (dark): system preference unless light is forced ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --tomato: #EE5A43;
    --tomato-deep: #D2402B;
    --basil: #6BAE7C;
    --limone: #F2BD5C;
    --bg: #121110;
    --bg-2: #181614;
    --surface: #1C1A18;
    --surface-2: #262320;
    --text: #F4EFE7;
    --text-2: #DDD7CD;
    --muted: #A29D94;
    --line: #322E2A;
    --line-strong: #423D37;
    --tint: #3A1F19;
    --basil-tint: #1D2B20;
  --basil-ink: #7DBE8D;
    --limone-tint: #33291A;
    --accent-ink: #F07A66;
    --focus: #F2BD5C;
    --btn-bg: #D2402B;
    --btn-bg-hover: #E04B34;
    --btn-ink-bg: #F4EFE7;
    --btn-ink-fg: #121110;
    --header-bg: rgba(18, 17, 16, 0.82);
    --sheet-bg: #1F1D1B;
    --sheet-row: #2A2724;
    --phone-frame: #000000;
    --tiktok: #FFFFFF;
    --show-sun: block;
    --show-moon: none;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 34px 70px -26px rgba(0, 0, 0, 0.8);
    --glow: 0 0 0 1px rgba(238, 90, 67, 0.35), 0 24px 60px -20px rgba(238, 90, 67, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --tomato: #EE5A43;
  --tomato-deep: #D2402B;
  --basil: #6BAE7C;
  --limone: #F2BD5C;
  --bg: #121110;
  --bg-2: #181614;
  --surface: #1C1A18;
  --surface-2: #262320;
  --text: #F4EFE7;
  --text-2: #DDD7CD;
  --muted: #A29D94;
  --line: #322E2A;
  --line-strong: #423D37;
  --tint: #3A1F19;
  --basil-tint: #1D2B20;
  --basil-ink: #7DBE8D;
  --limone-tint: #33291A;
  --accent-ink: #F07A66;
  --focus: #F2BD5C;
  --btn-bg: #D2402B;
  --btn-bg-hover: #E04B34;
  --btn-ink-bg: #F4EFE7;
  --btn-ink-fg: #121110;
  --header-bg: rgba(18, 17, 16, 0.82);
  --sheet-bg: #1F1D1B;
  --sheet-row: #2A2724;
  --phone-frame: #000000;
  --tiktok: #FFFFFF;
  --show-sun: block;
  --show-moon: none;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 34px 70px -26px rgba(0, 0, 0, 0.8);
  --glow: 0 0 0 1px rgba(238, 90, 67, 0.35), 0 24px 60px -20px rgba(238, 90, 67, 0.4);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
svg:not([fill]) { fill: currentColor; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--tint); color: var(--text); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--btn-ink-bg);
  color: var(--btn-ink-fg);
  font-weight: 650;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.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;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type helpers ---------- */
.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-variation-settings: "SOFT" 50;
  text-wrap: balance;
}
.h2 em, .hero-title em, .cta-title em, .doc-hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.lede {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  text-wrap: pretty;
}
.section { padding-block: clamp(4.5rem, 3rem + 6vw, 8rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.75rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-btn);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary, .btn-ink { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover, .btn-ink:hover { background: var(--btn-bg-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface); border-color: var(--text); }
.btn-lg { min-height: 56px; padding: 0 1.6rem; font-size: 1.0625rem; }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: 0.9375rem; border-radius: 13px; }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

.store-badge { display: inline-block; border-radius: 12px; transition: transform 0.2s var(--ease); }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 52px; width: auto; }
.store-badge--lg img { height: 58px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .menu-open .site-header {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  flex: none;
}
.brand-mark { position: relative; display: block; width: 28px; height: 36px; color: var(--tomato); }
.brand-glyph { width: 28px; height: 36px; transform-origin: 50% 90%; }
.brand-steam {
  position: absolute;
  left: 50%;
  top: -12px;
  width: 22px;
  height: 13px;
  margin-left: -11px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  overflow: visible;
}
.brand-steam path { opacity: 0; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: "SOFT" 50;
}
.brand-word i { font-style: italic; font-weight: 600; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .brand:hover .brand-glyph, .brand:focus-visible .brand-glyph { animation: hat-wobble 0.9s var(--ease); }
  .brand:hover .brand-steam path, .brand:focus-visible .brand-steam path { animation: steam-rise 1.4s ease-out infinite; }
  .brand:hover .brand-steam path:nth-child(2) { animation-delay: 0.2s; }
  .brand:hover .brand-steam path:nth-child(3) { animation-delay: 0.4s; }
}
@keyframes hat-wobble {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-9deg); }
  45% { transform: rotate(6deg); }
  70% { transform: rotate(-3deg); }
}
@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(4px); }
  35% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-6px); }
}

.nav-primary { margin-left: auto; }
.nav-links { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-links .nav-menu-cta { display: none; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; }

.theme-toggle, .nav-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .ic-sun { display: var(--show-sun); }
.theme-toggle .ic-moon { display: var(--show-moon); }
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle:active svg { transform: rotate(-30deg) scale(0.9); transition: transform 0.2s ease; }
}

.nav-toggle { display: none; }
.nav-toggle span {
  display: block;
  grid-area: 1 / 1;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}
.nav-toggle span:first-child { transform: translateY(-4px); }
.nav-toggle span:last-child { transform: translateY(4px); }
.menu-open .nav-toggle span:first-child { transform: rotate(45deg); }
.menu-open .nav-toggle span:last-child { transform: rotate(-45deg); }

@media (max-width: 879.98px) {
  .nav-toggle { display: grid; }
  .nav-primary { margin-left: auto; }
  .nav-actions { margin-left: 0; }
  .nav-links {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a { padding: 0.85rem 0.75rem; font-size: 1.0625rem; }
  .nav-links .nav-menu-cta { display: block; padding-top: 0.5rem; }
  .nav-links .nav-menu-cta a { padding: 0; }
}
@media (max-width: 459.98px) {
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(1.5rem, 1rem + 3vw, 4rem) clamp(2rem, 1.5rem + 2vw, 3.5rem);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(70vw, 820px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tint), transparent);
  opacity: 0.9;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 2rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.hero-badge b {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--basil-tint);
  color: var(--basil-ink);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 1.6rem + 5.4vw, 5.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-variation-settings: "SOFT" 50;
}
.hero-title span { display: block; }
.hero-sub {
  max-width: 33rem;
  margin: 0 0 2rem;
  color: var(--text-2);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 550;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-facts svg { width: 18px; height: 18px; color: var(--basil); }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-title span, .js .hero-sub, .js .hero-actions, .js .hero-facts, .js .hero-badge {
    animation: rise-in 0.8s var(--ease) both;
  }
  .js .hero-title span:nth-child(1) { animation-delay: 0.05s; }
  .js .hero-title span:nth-child(2) { animation-delay: 0.15s; }
  .js .hero-title span:nth-child(3) { animation-delay: 0.25s; }
  .js .hero-sub { animation-delay: 0.35s; }
  .js .hero-actions { animation-delay: 0.45s; }
  .js .hero-facts { animation-delay: 0.55s; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero demo: the phone ---------- */
.hero-demo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.demo-stage { position: relative; display: grid; place-items: center; padding: 8px 0; }
.demo-stage::before {
  /* gingham napkin behind the phone */
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  bottom: -18px;
  left: 50%;
  margin-left: -230px;
  border-radius: 28px;
  transform: rotate(-9deg);
  background:
    linear-gradient(90deg, rgba(210, 64, 43, 0.22) 50%, transparent 0) 0 0 / 34px 34px,
    linear-gradient(rgba(210, 64, 43, 0.22) 50%, transparent 0) 0 0 / 34px 34px,
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.demo-stage::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  top: 30px;
  right: 50%;
  margin-right: -250px;
  border-radius: 50%;
  background: var(--limone);
  opacity: 0.22;
  filter: blur(2px);
}

.phone {
  --pw: 288px;
  --ph: 600px;
  position: relative;
  z-index: 1;
  width: var(--pw);
  height: var(--ph);
  padding: 10px;
  border-radius: 50px;
  background: var(--phone-frame);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    var(--shadow-lg);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 40px;
  background: #000;
  isolation: isolate;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}
@media (max-width: 359.98px) {
  .phone { zoom: 0.9; }
}

.ps-layer { position: absolute; inset: 0; }

/* Status bar */
.ps-status {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 4px 26px 0 30px;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  transition: color 0.35s ease;
}
.ps-island { position: absolute; left: 50%; top: 10px; width: 84px; height: 24px; margin-left: -42px; border-radius: 14px; background: #000; }
.ps-sys { display: flex; gap: 4px; align-items: center; }
.ps-sys i { display: block; width: 3px; border-radius: 1px; background: currentColor; }
.ps-sys i:nth-child(1) { height: 5px; }
.ps-sys i:nth-child(2) { height: 7px; }
.ps-sys i:nth-child(3) { height: 9px; }
.ps-sys b { display: block; width: 20px; height: 10px; margin-left: 3px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.ps-sys b::after { content: ""; position: absolute; inset: 1px 4px 1px 1px; border-radius: 1px; background: currentColor; }
.phone[data-scene="recipe"] .ps-status,
.phone[data-scene="ingredients"] .ps-status,
.phone[data-scene="cook"] .ps-status { color: var(--text); }
.phone[data-scene="recipe"] .ps-status { color: #fff; }
.ps-status::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); opacity: 0; transition: opacity 0.4s ease; }
.phone[data-scene="ingredients"] .ps-status::before { opacity: 1; transition-delay: 0.3s; }

.ps-home {
  position: absolute;
  z-index: 40;
  bottom: 7px;
  left: 50%;
  width: 104px;
  height: 4px;
  margin-left: -52px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  transition: background-color 0.35s ease;
}
.phone[data-scene="ingredients"] .ps-home,
.phone[data-scene="cook"] .ps-home { background: var(--text); opacity: 0.6; }

/* (a) The reel */
.ps-reel { background: #2A1A10; }
.ps-reel .dish { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .phone[data-scene="reel"] .ps-reel .dish { animation: ken-burns 3.4s ease-out both; }
}
@keyframes ken-burns {
  from { transform: scale(1.12) translateY(8px); }
  to { transform: scale(1); }
}
.ps-steam { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 5; stroke-linecap: round; filter: blur(3px); }
.ps-steam path { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ps-steam path { animation: steam 2.8s ease-in-out infinite; }
  .ps-steam path:nth-child(2) { animation-delay: 0.9s; }
  .ps-steam path:nth-child(3) { animation-delay: 1.8s; }
  .is-paused .ps-steam path { animation-play-state: paused; }
}
@keyframes steam {
  0% { opacity: 0; transform: translateY(20px); }
  40% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-40px); }
}
.ps-shade-top, .ps-shade-bottom { position: absolute; left: 0; right: 0; pointer-events: none; }
.ps-shade-top { top: 0; height: 110px; background: linear-gradient(rgba(0, 0, 0, 0.45), transparent); }
.ps-shade-bottom { bottom: 0; height: 230px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }

.ps-rail {
  position: absolute;
  right: 10px;
  bottom: 96px;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #fff;
  text-align: center;
  font-size: 10.5px;
  font-weight: 650;
}
.ps-rail li { display: grid; justify-items: center; gap: 2px; }
.ps-rail svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); transition: transform 0.25s var(--spring); }
.ps-rail .is-liked svg { color: #FF4D5E; }
.phone[data-scene="tap-share"] .ps-rail .is-share svg { transform: scale(1.2); }
@media (prefers-reduced-motion: no-preference) {
  .phone[data-scene="reel"] .ps-rail .is-liked svg { animation: like-pop 0.6s var(--spring) 1.2s both; }
}
@keyframes like-pop {
  0% { transform: scale(1); color: #fff; }
  45% { transform: scale(1.35); color: #FF4D5E; }
  100% { transform: scale(1); color: #FF4D5E; }
}

.ps-caption { position: absolute; left: 14px; right: 64px; bottom: 34px; color: #fff; }
.ps-caption strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ps-caption .ps-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--limone); color: #3A2508; font-size: 11px; }
.ps-caption p { margin: 6px 0 0; font-size: 12px; line-height: 1.35; opacity: 0.92; }
.ps-progress { position: absolute; left: 14px; right: 14px; bottom: 20px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.ps-progress i { display: block; height: 100%; width: 58%; border-radius: 2px; background: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .phone[data-scene="reel"] .ps-progress i { animation: progress 2.6s linear both; }
}
@keyframes progress { from { width: 12%; } to { width: 58%; } }

/* Dim the reel behind the share sheet */
.ps-dim { z-index: 5; background: rgba(0, 0, 0, 0.42); opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.phone[data-scene="sheet"] .ps-dim, .phone[data-scene="tap-app"] .ps-dim { opacity: 1; }

/* Taps */
.ps-tap {
  position: absolute;
  z-index: 45;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
}
.ps-tap--share { left: 243px; top: 453px; }
.ps-tap--app { left: 103px; top: 417px; }
.ps-tap--grocery { left: 150px; top: 398px; }
.ps-tap--next { left: 190px; top: 527px; }
.ps-tap--grocery, .ps-tap--next { background: rgba(28, 26, 23, 0.18); box-shadow: 0 0 0 2px rgba(28, 26, 23, 0.25); }
@media (prefers-reduced-motion: no-preference) {
  .phone[data-scene="tap-share"] .ps-tap--share { animation: tap 0.65s ease-out 0.05s both; }
  .phone[data-scene="tap-app"] .ps-tap--app { animation: tap 0.65s ease-out 0.05s both; }
  .phone[data-scene="ingredients"] .ps-tap--grocery { animation: tap 0.65s ease-out 1.8s both; }
  .phone[data-scene="cook"] .ps-tap--next { animation: tap 0.65s ease-out 2.75s both; }
}
@keyframes tap {
  0% { opacity: 0; transform: scale(1.5); }
  35% { opacity: 1; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* (b) The share sheet */
.ps-sheet {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px 26px;
  border-radius: 24px 24px 0 0;
  background: var(--sheet-bg);
  color: var(--text);
  transform: translateY(105%);
  transition: transform 0.5s var(--ease);
}
.phone[data-scene="sheet"] .ps-sheet, .phone[data-scene="tap-app"] .ps-sheet { transform: none; }
.ps-sheet::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--line-strong); }
.ps-sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; border-bottom: 1px solid var(--line); }
.ps-sheet-head .thumb { width: 40px; height: 40px; flex: none; overflow: hidden; border-radius: 9px; }
.ps-sheet-head .thumb svg { width: 100%; height: 100%; }
.ps-sheet-head strong { display: block; font-size: 13px; }
.ps-sheet-head small { color: var(--muted); font-size: 11px; }
.ps-apps { display: flex; justify-content: space-between; padding: 14px 2px 12px; }
.ps-app { display: grid; justify-items: center; gap: 6px; width: 56px; font-size: 10.5px; color: var(--text-2); }
.ps-app i { display: block; width: 50px; height: 50px; border-radius: 12px; }
.ps-app--airdrop i { background: radial-gradient(circle at 50% 60%, #fff 0 5px, transparent 6px), conic-gradient(from 200deg, #3BA0FF, #7FD1FF, #3BA0FF); }
.ps-app--msg i { background: linear-gradient(#67E07A, #2DBB4C); }
.ps-app--notes i { background: linear-gradient(#fff 0 32%, #FFD54A 32% 36%, #fff 36%); border: 1px solid var(--line); }
.ps-app--mail i { background: linear-gradient(#59B8FF, #1976F3); }
.ps-app--mangio i { position: relative; background: var(--grad); }
.ps-app--mangio i svg { position: absolute; inset: 9px 12px; width: 26px; height: 32px; color: #FFF6EA; }
.ps-app--mangio span { font-weight: 700; color: var(--text); }
.ps-app--mangio i::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 16px;
  border: 2.5px solid var(--tomato);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease 0.45s, transform 0.4s var(--spring) 0.45s;
}
.ps-app--mangio i { transition: transform 0.35s var(--spring) 0.45s; }
.phone[data-scene="sheet"] .ps-app--mangio i::after, .phone[data-scene="tap-app"] .ps-app--mangio i::after { opacity: 1; transform: none; }
.phone[data-scene="sheet"] .ps-app--mangio i, .phone[data-scene="tap-app"] .ps-app--mangio i { transform: scale(1.08); }
.ps-actions { margin: 0; padding: 0; list-style: none; border-radius: 12px; background: var(--sheet-row); overflow: hidden; }
.ps-actions li { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; font-size: 13px; }
.ps-actions li + li { border-top: 1px solid var(--line); }
.ps-actions svg { width: 17px; height: 17px; color: var(--muted); }

/* (c) Mangio opens with the recipe */
.ps-app-view {
  z-index: 20;
  background: var(--bg);
  opacity: 0;
  transform: scale(0.18);
  transform-origin: 103px 417px;
  border-radius: 40px;
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.55s var(--ease);
}
.phone[data-scene="recipe"] .ps-app-view,
.phone[data-scene="ingredients"] .ps-app-view,
.phone[data-scene="cook"] .ps-app-view,
.phone[data-scene="outro"] .ps-app-view { opacity: 1; transform: none; }
.ps-scroll { transition: transform 0.75s var(--ease); }
.phone[data-scene="ingredients"] .ps-scroll,
.phone[data-scene="cook"] .ps-scroll,
.phone[data-scene="outro"] .ps-scroll { transform: translateY(-196px); }

.ps-photo { position: relative; height: 262px; overflow: hidden; }
.ps-photo svg { width: 100%; height: 100%; }
.ps-photo-btn {
  position: absolute;
  top: 48px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1C1A17;
}
.ps-photo-btn svg { width: 16px; height: 16px; }
.ps-photo-btn--l { left: 14px; }
.ps-photo-btn--r { right: 14px; color: var(--tomato); }

.ps-card {
  position: relative;
  margin-top: -26px;
  padding: 18px 18px 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
}
.ps-card > * { transition: opacity 0.4s ease, transform 0.5s var(--ease); }
.phone:not([data-scene="recipe"]):not([data-scene="ingredients"]):not([data-scene="cook"]):not([data-scene="outro"]) .ps-card > * { opacity: 0; transform: translateY(10px); }
.phone[data-scene="recipe"] .ps-card > :nth-child(1) { transition-delay: 0.25s; }
.phone[data-scene="recipe"] .ps-card > :nth-child(2) { transition-delay: 0.35s; }
.phone[data-scene="recipe"] .ps-card > :nth-child(3) { transition-delay: 0.45s; }
.phone[data-scene="recipe"] .ps-card > :nth-child(n+4) { transition-delay: 0.55s; }
.ps-from { margin: 0 0 4px; font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.ps-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); }
.ps-meta { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ps-meta svg { width: 15px; height: 15px; color: var(--accent-ink); }
.ps-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.ps-label span { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; }
.ps-ings { margin: 0 0 12px; padding: 0; list-style: none; }
.ps-ings li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--text-2); transition: color 0.3s ease; }
.ps-ings b { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.ps-ings i {
  position: relative;
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.75px solid var(--line-strong);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--spring);
}
.ps-ings i::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.25s var(--spring);
}
.ps-ings .t span { transition: color 0.3s ease; }
.phone[data-scene="ingredients"] .ps-ings .t i,
.phone[data-scene="cook"] .ps-ings .t i,
.phone[data-scene="outro"] .ps-ings .t i { background: var(--basil); border-color: var(--basil); }
.phone[data-scene="ingredients"] .ps-ings .t i::after,
.phone[data-scene="cook"] .ps-ings .t i::after,
.phone[data-scene="outro"] .ps-ings .t i::after { transform: rotate(45deg) scale(1); }
.phone[data-scene="ingredients"] .ps-ings .t span,
.phone[data-scene="cook"] .ps-ings .t span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(1) * { transition-delay: 0.7s; }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(2) * { transition-delay: 1.1s; }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(3) * { transition-delay: 1.5s; }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(1) i::after { transition-delay: 0.7s; }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(2) i::after { transition-delay: 1.1s; }
.phone[data-scene="ingredients"] .ps-ings .t:nth-child(3) i::after { transition-delay: 1.5s; }

.ps-grocery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 14px;
  border: 1.5px solid var(--tomato);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.ps-grocery svg { width: 16px; height: 16px; }
.ps-grocery .done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--basil); color: #fff; opacity: 0; transition: opacity 0.3s ease; }
.phone[data-scene="ingredients"] .ps-grocery .done { opacity: 1; transition-delay: 2s; }
.phone[data-scene="cook"] .ps-grocery .done, .phone[data-scene="outro"] .ps-grocery .done { opacity: 1; }
.ps-cook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  margin-top: 8px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.ps-cook-btn svg { width: 14px; height: 14px; }

/* (e) Cook mode */
.ps-cook {
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 54px 20px 30px;
  background: var(--surface);
  transform: translateX(102%);
  transition: transform 0.55s var(--ease);
}
.phone[data-scene="cook"] .ps-cook, .phone[data-scene="outro"] .ps-cook { transform: none; }
.ps-cook-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.ps-cook-top svg { width: 18px; height: 18px; }
.ps-cook-step { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--accent-ink); }
.ps-bars { display: flex; gap: 4px; margin: 14px 0 26px; }
.ps-bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.ps-bars i.on { background: var(--tomato); }
.ps-bars i.now { background: linear-gradient(90deg, var(--tomato) 50%, var(--line) 50%) 100% 0 / 200% 100%; transition: background-position 3s linear 0.4s; }
.phone[data-scene="cook"] .ps-bars i.now { background-position: 0 0; }
.ps-cook-text { margin: 0 0 22px; font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.18; letter-spacing: -0.015em; color: var(--text); }
.ps-cook-text b { font-weight: 650; color: var(--accent); }
.ps-timer {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 16px;
  background: var(--tint);
  color: var(--accent-ink);
}
.ps-ring { width: 34px; height: 34px; transform: rotate(-90deg); }
.ps-ring circle { fill: none; stroke-width: 3.5; }
.ps-ring .bg { stroke: rgba(210, 64, 43, 0.2); }
.ps-ring .fg { stroke: var(--tomato); stroke-dasharray: 94.25; stroke-dashoffset: 0; stroke-linecap: round; transition: stroke-dashoffset 3.6s linear; }
.phone[data-scene="cook"] .ps-ring .fg { stroke-dashoffset: 12; }
.ps-timer b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ps-timer small { font-size: 11px; font-weight: 650; }
.ps-uses { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ps-uses small { display: block; margin-bottom: 8px; font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); }
.ps-uses span { display: inline-block; margin: 0 4px 6px 0; padding: 5px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); }
.ps-awake { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.ps-awake svg { width: 14px; height: 14px; color: var(--limone); }
.ps-cook-nav { display: flex; gap: 8px; margin-top: auto; }
.ps-cook-nav span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 15px; font-weight: 700; font-size: 14px; }
.ps-cook-nav .back { flex: 0 0 84px; border: 1.5px solid var(--line-strong); color: var(--text-2); }
.ps-cook-nav .next { flex: 1; background: var(--btn-bg); color: #fff; transition: transform 0.2s ease; }
.ps-cook-nav svg { width: 16px; height: 16px; }

/* Loop reset: a soft curtain, everything snaps back underneath it */
.ps-curtain { z-index: 60; background: var(--bg); opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.phone[data-scene="outro"] .ps-curtain { opacity: 1; }
.phone.is-resetting *:not(.ps-curtain) { transition: none !important; }

/* Story legend under the phone */
.demo-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--muted);
}
.demo-legend li { padding: 0.35rem 0.7rem; border-radius: 11px; transition: background-color 0.3s ease, color 0.3s ease; white-space: nowrap; }
.hero-demo:is([data-scene="reel"], [data-scene="tap-share"], [data-scene="sheet"], [data-scene="tap-app"]) .demo-legend li:nth-child(1),
.hero-demo:is([data-scene="recipe"], [data-scene="ingredients"]) .demo-legend li:nth-child(2),
.hero-demo[data-scene="cook"] .demo-legend li:nth-child(3) { background: var(--tint); color: var(--accent-ink); }
.demo-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.demo-toggle:hover { background: var(--bg-2); color: var(--text); }
.demo-toggle svg { width: 16px; height: 16px; }
.demo-toggle .ic-play { display: none; }
.is-paused .demo-toggle .ic-play { display: block; }
.is-paused .demo-toggle .ic-pause { display: none; }
.is-static .demo-toggle { display: none; }
.is-paused .ps-tap, .is-paused * { animation-play-state: paused !important; }
@media (max-width: 419.98px) {
  .demo-legend { font-size: 0.75rem; gap: 0.15rem; }
  .demo-legend li { padding: 0.35rem 0.55rem; }
}

/* ---------- Works with ---------- */
.works { padding-block: 1.5rem 0; }
.works-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  padding-block: 1.5rem;
  border-block: 1px solid var(--line);
}
.works-label { margin: 0; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.works-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.works-list li { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-weight: 600; font-size: 0.9375rem; transition: color 0.25s ease; }
.works-list svg { width: 22px; height: 22px; transition: color 0.25s ease, transform 0.3s var(--spring); }
.works-list li:hover svg { transform: translateY(-2px) scale(1.08); }
.works-list li:hover { color: var(--text); }
.works-list .w-instagram:hover svg { color: #FF0069; }
.works-list .w-tiktok:hover svg { color: var(--tiktok); }
.works-list .w-youtube:hover svg { color: #FF0000; }
.works-list .w-facebook:hover svg { color: #0866FF; }
.works-list .w-pinterest:hover svg { color: #BD081C; }
.works-list .w-more { padding: 0.3rem 0.75rem; border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 0.875rem; }
.works-list .w-more svg { width: 16px; height: 16px; }

/* ---------- Problem ---------- */
.problem-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
@media (min-width: 920px) { .problem-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pains { display: grid; gap: 1.25rem; margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: pain; }
.pains li { display: grid; grid-template-columns: 44px 1fr; gap: 0 1rem; align-items: start; }
.pains .ic { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--accent-ink); }
.pains .ic svg { width: 22px; height: 22px; }
.pains strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.pains span:not(.ic) { color: var(--muted); }

.saved-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.saved-pile { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.saved-pile li {
  position: absolute;
  width: 112px;
  height: 140px;
  overflow: hidden;
  border-radius: 16px;
  border: 4px solid var(--surface);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform 0.9s var(--ease), opacity 0.6s ease;
}
.saved-pile li svg { width: 100%; height: 100%; }
.saved-pile li::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 14px;
  height: 18px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.js .saved-visual:not(.is-visible) .saved-pile li { transform: translate(0, 40px) rotate(0); opacity: 0; }
.saved-pile li:nth-child(1) { --x: -10px; --y: 0; --r: -12deg; left: 2%; top: 4%; transition-delay: 0.05s; }
.saved-pile li:nth-child(2) { --x: 0; --y: 0; --r: 8deg; left: 34%; top: 0; transition-delay: 0.12s; }
.saved-pile li:nth-child(3) { --x: 10px; --y: 0; --r: -5deg; right: 2%; top: 6%; transition-delay: 0.19s; }
.saved-pile li:nth-child(4) { --x: 0; --y: 0; --r: 10deg; left: 0; bottom: 4%; transition-delay: 0.26s; }
.saved-pile li:nth-child(5) { --x: 0; --y: 0; --r: -8deg; left: 36%; bottom: 0; transition-delay: 0.33s; }
.saved-pile li:nth-child(6) { --x: 0; --y: 0; --r: 6deg; right: 0; bottom: 6%; transition-delay: 0.4s; }
.saved-pile .bg-1 { background: #E9A93A; }
.saved-pile .bg-2 { background: #3E7B50; }
.saved-pile .bg-3 { background: #D2402B; }

.saved-card {
  position: relative;
  z-index: 2;
  width: min(100%, 320px);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: transform 0.8s var(--ease) 0.4s, opacity 0.6s ease 0.4s;
}
.js .saved-visual:not(.is-visible) .saved-card { opacity: 0; transform: scale(0.94); }
.saved-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.saved-row + .saved-row { margin-top: 0.4rem; }
.saved-row span { color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.saved-row b { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.saved-row--saved b { font-size: 3.2rem; letter-spacing: -0.03em; color: var(--accent); }
.saved-row--cooked b { font-size: 2.2rem; color: var(--text); }
.saved-bar { height: 8px; margin: 1.1rem 0 0.6rem; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.saved-bar i { display: block; width: 1.5%; height: 100%; min-width: 6px; border-radius: 4px; background: var(--basil); }
.saved-card p { margin: 0; color: var(--muted); font-size: 0.875rem; }

/* ---------- How it works ---------- */
.how { background: var(--surface-2); border-block: 1px solid var(--line); }
.steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}
.step h3 { margin: 1.25rem 0 0.4rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); font-size: 0.975rem; }
.sv { position: relative; display: grid; place-items: center; height: 168px; overflow: hidden; border-radius: 18px; background: var(--bg); }

/* step 1: a reel with the Share button */
.sv-reel { width: 104px; height: 150px; margin-top: 18px; overflow: hidden; border-radius: 16px 16px 0 0; position: relative; box-shadow: var(--shadow-sm); }
.sv-reel svg.dish { width: 100%; height: 100%; }
.sv-reel .share {
  position: absolute;
  right: 8px;
  bottom: 30px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--tomato);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
}
.sv-reel .share svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .step.is-visible .sv-reel .share { animation: pulse-ring 2s ease-out 0.6s infinite; }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
}

/* step 2: the app row */
.sv-apps { display: flex; gap: 10px; align-items: flex-end; }
.sv-apps i { display: block; width: 42px; height: 42px; border-radius: 11px; }
.sv-apps .a1 { background: linear-gradient(#67E07A, #2DBB4C); }
.sv-apps .a2 { background: linear-gradient(#59B8FF, #1976F3); }
.sv-apps .a3 { background: linear-gradient(#fff 0 32%, #FFD54A 32% 36%, #fff 36%); border: 1px solid var(--line); }
.sv-apps .mangio { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text); }
.sv-apps .mangio i { position: relative; width: 56px; height: 56px; border-radius: 14px; background: var(--grad); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--tomato); transition: transform 0.4s var(--spring); }
.sv-apps .mangio svg { position: absolute; inset: 10px 14px; width: 28px; height: 36px; color: #FFF6EA; }
.step:hover .sv-apps .mangio i { transform: translateY(-4px) scale(1.06); }

/* step 3: groceries */
.sv-list { width: 82%; padding: 0.75rem 0.9rem; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.8125rem; }
.sv-list p { margin: 0 0 0.2rem; font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.sv-list ul { margin: 0 0 0.5rem; padding: 0; list-style: none; }
.sv-list ul:last-child { margin-bottom: 0; }
.sv-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.12rem 0; color: var(--text-2); }
.sv-list li b { font-family: var(--font-display); font-weight: 600; color: var(--text); }

/* step 4: cook */
.sv-cook { width: 82%; padding: 0.85rem 0.95rem; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.sv-cook small { display: block; font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent-ink); }
.sv-cook p { margin: 0.25rem 0 0.6rem; font-family: var(--font-display); font-size: 1.1rem; line-height: 1.2; color: var(--text); }
.sv-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 10px; background: var(--tint); color: var(--accent-ink); font-weight: 700; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sv-chip svg { width: 14px; height: 14px; }

/* ---------- Features (bento) ---------- */
.bento { display: grid; gap: 1.25rem; }
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--cook { grid-column: span 2; }
}
@media (min-width: 1040px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card--cook, .card--planner { grid-column: span 2; }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--accent-ink);
  transition: transform 0.4s var(--spring);
}
.card-ic svg { width: 22px; height: 22px; }
.card:hover .card-ic { transform: rotate(-8deg) scale(1.08); }
.card-ic--basil { background: var(--basil-tint); color: var(--basil-ink); }
.card-ic--limone { background: var(--limone-tint); color: #8A5A0B; }
:root[data-theme="dark"] .card-ic--limone { color: var(--limone); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-ic--limone { color: var(--limone); } }
.card h3 { margin: 0.75rem 0 0.35rem; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.card p { margin: 0; color: var(--muted); }
.tag { display: inline-block; vertical-align: 3px; margin-left: 0.3rem; padding: 0.15rem 0.5rem; border-radius: 8px; background: var(--tint); color: var(--accent-ink); font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.fx { margin-top: auto; }

/* Cook mode card */
.card--cook { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .card--cook { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; } }
.fx-cook { padding: 1.25rem; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.fx-cook-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 650; color: var(--muted); }
.fx-cook-top b { font-family: var(--font-display); letter-spacing: 0.14em; color: var(--accent-ink); font-weight: 600; }
.fx-awake { display: inline-flex; align-items: center; gap: 0.3rem; }
.fx-awake svg { width: 15px; height: 15px; color: var(--limone); }
.fx-cook-step { margin: 0.75rem 0 1rem; font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.2; letter-spacing: -0.01em; }
.fx-timer { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.9rem 0.4rem 0.4rem; border-radius: 16px; background: var(--tint); color: var(--accent-ink); }
.fx-ring { width: 38px; height: 38px; transform: rotate(-90deg); }
.fx-ring circle { fill: none; stroke-width: 4; }
.fx-ring .bg { stroke: rgba(210, 64, 43, 0.2); }
.fx-ring .fg { stroke: var(--tomato); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 30; transition: stroke-dashoffset 1.2s var(--ease); }
.card--cook:hover .fx-ring .fg { stroke-dashoffset: 75; transition-duration: 4s; transition-timing-function: linear; }
.fx-timer b { display: block; font-family: var(--font-display); font-size: 1.2rem; line-height: 1; color: var(--text); }
.fx-timer small { font-weight: 650; font-size: 0.75rem; }
.fx-cook-nav { display: flex; gap: 0.5rem; margin-top: 1rem; }
.fx-cook-nav span { display: grid; place-items: center; height: 42px; border-radius: 14px; font-weight: 700; font-size: 0.875rem; }
.fx-cook-nav .back { flex: 0 0 80px; border: 1.5px solid var(--line-strong); color: var(--text-2); }
.fx-cook-nav .next { flex: 1; background: var(--btn-bg); color: #fff; }

/* Tap to save card */
.fx-save { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.25rem 0 0.25rem; }
.fx-save .share { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); color: var(--text); }
.fx-save .share svg { width: 26px; height: 26px; }
.fx-save .arrow { width: 54px; height: 20px; fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.fx-save .icon { position: relative; width: 64px; height: 64px; border-radius: 16px; background: var(--grad); box-shadow: var(--shadow-sm); transition: transform 0.5s var(--spring); }
.fx-save .icon svg { position: absolute; inset: 11px 16px; width: 32px; height: 41px; color: #FFF6EA; }
@media (prefers-reduced-motion: no-preference) {
  .fx-save .arrow { animation: dash 1.2s linear infinite; animation-play-state: paused; }
  .card--save:hover .fx-save .arrow { animation-play-state: running; }
}
.card--save:hover .fx-save .icon { transform: translateY(-6px) rotate(-6deg); }
@keyframes dash { to { stroke-dashoffset: -18; } }

/* Scale card */
.fx-scale-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.stepper button, .seg button {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  font-size: 0.875rem;
  cursor: pointer;
}
.stepper button:hover:not(:disabled), .seg button:hover { background: var(--surface); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper button svg { width: 16px; height: 16px; }
.stepper-value { min-width: 6.6em; text-align: center; font-weight: 650; font-size: 0.875rem; }
.stepper-value output { font-family: var(--font-display); font-size: 1.05rem; }
.seg { display: inline-flex; padding: 0.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: #fff; }
.fx-scale-list { margin: 0.9rem 0 0; padding: 0; list-style: none; }
.fx-scale-list li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); color: var(--text-2); font-size: 0.9375rem; }
.fx-scale-list li:last-child { border-bottom: 0; }
.fx-scale-list strong { font-family: var(--font-display); font-weight: 600; color: var(--text); }

/* Grocery card */
.fx-grocery { display: grid; gap: 0.75rem; }
.aisle-name { margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.fx-grocery ul { margin: 0; padding: 0; list-style: none; }
.fx-grocery li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; color: var(--text-2); font-size: 0.9375rem; transition: color 0.3s ease; }
.fx-grocery li i { position: relative; flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.75px solid var(--line-strong); transition: background-color 0.25s ease, border-color 0.25s ease; }
.fx-grocery li i::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.25s var(--spring); }
.fx-grocery li.done i, .card--grocery:hover li.hover-done i { background: var(--basil); border-color: var(--basil); }
.fx-grocery li.done i::after, .card--grocery:hover li.hover-done i::after { transform: rotate(45deg) scale(1); }
.fx-grocery li.done, .card--grocery:hover li.hover-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.card--grocery:hover li.hover-done:nth-of-type(2) * { transition-delay: 0.15s; }
.fx-grocery li b { margin-left: auto; font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 0.875rem; }

/* Collections card */
.fx-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: auto 0 0; padding: 0; list-style: none; }
.fx-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.4s var(--spring), border-color 0.3s ease;
}
.card--collections:hover .fx-chips li:nth-child(odd) { transform: translateY(-3px) rotate(-2deg); }
.card--collections:hover .fx-chips li:nth-child(even) { transform: translateY(2px) rotate(2deg); }
.card--collections:hover .fx-chips li:nth-child(1) { border-color: var(--tomato); }

/* Nutrition card */
.fx-kcal { margin: 0 0 0.75rem; color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.fx-kcal b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.fx-macro { display: grid; grid-template-columns: 4.2rem 1fr 3rem; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.875rem; color: var(--text-2); }
.fx-macro > i { display: block; height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.fx-macro > i::before { content: ""; display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--c, var(--basil)); transform-origin: left; transition: transform 1.1s var(--ease) 0.3s; }
.js .card--nutrition:not(.is-visible) .fx-macro > i::before { transform: scaleX(0); }
.fx-macro b { text-align: right; font-family: var(--font-display); font-weight: 600; }

/* Meal planner card */
.card--planner { display: grid; gap: 1.5rem; }
@media (min-width: 1040px) { .card--planner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; } }
.fx-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
.fx-day { display: grid; gap: 0.35rem; align-content: start; }
.fx-day > b { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.fx-day > b.today { color: var(--accent-ink); }
.fx-meal {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.15;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 1.25rem;
  transition: transform 0.6s var(--spring), opacity 0.4s ease;
}
.fx-meal.empty { border-style: dashed; background: transparent; color: var(--line-strong); font-size: 1rem; }
.js .card--planner:not(.is-visible) .fx-meal:not(.empty) { opacity: 0; transform: translateY(-14px) scale(0.9); }
.fx-day:nth-child(1) .fx-meal { transition-delay: 0.1s; }
.fx-day:nth-child(2) .fx-meal { transition-delay: 0.18s; }
.fx-day:nth-child(3) .fx-meal { transition-delay: 0.26s; }
.fx-day:nth-child(4) .fx-meal { transition-delay: 0.34s; }
.fx-day:nth-child(5) .fx-meal { transition-delay: 0.42s; }
.fx-day:nth-child(6) .fx-meal { transition-delay: 0.5s; }
.fx-day:nth-child(7) .fx-meal { transition-delay: 0.58s; }
.card--planner:hover .fx-meal:not(.empty) { transform: translateY(-2px); }
.fx-week-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; font-size: 0.8125rem; font-weight: 650; color: var(--muted); }
.fx-week-foot span:last-child { color: var(--basil-ink); }
@media (max-width: 420px) {
  .fx-week { gap: 0.25rem; }
  .fx-meal { font-size: 1rem; border-radius: 9px; }
  .fx-day > b { font-size: 0.625rem; letter-spacing: 0.04em; }
}

/* ---------- Pricing ---------- */
.pricing { position: relative; }
.plans { display: grid; gap: 1.25rem; align-items: stretch; max-width: 1040px; margin-inline: auto; }
@media (min-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
}
@media (max-width: 899.98px) {
  .plan--yearly { order: -1; }
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.plan-name { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin: 0; }
.plan-price .amount { font-family: var(--font-display); font-size: 3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.plan-price .per { color: var(--muted); font-weight: 600; }
.plan-sub { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9375rem; min-height: 1.5em; }
.plan-list { display: grid; gap: 0.55rem; margin: 1.4rem 0 1.6rem; padding: 0; list-style: none; font-size: 0.975rem; }
.plan-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.plan-list svg { flex: none; width: 18px; height: 18px; margin-top: 0.2rem; color: var(--basil); }
.plan-cta { width: 100%; margin-top: auto; }
.plan-after { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.8125rem; text-align: center; }

.plan--yearly {
  z-index: 1;
  padding: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  border: 2px solid var(--tomato);
  box-shadow: var(--glow);
}
@media (min-width: 900px) {
  .plan--yearly { transform: scale(1.03); }
}
@media (prefers-reduced-motion: no-preference) {
  .plan--yearly::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(210, 64, 43, 0.35);
    animation: glow 3.2s ease-in-out infinite;
    pointer-events: none;
  }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 24px 0 rgba(210, 64, 43, 0.12); }
  50% { box-shadow: 0 0 46px 6px rgba(210, 64, 43, 0.24); }
}
.plan-flag {
  position: absolute;
  top: 0;
  left: 50%;
  margin: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px -6px rgba(210, 64, 43, 0.6);
}
.plan--yearly .plan-price .amount { font-size: 3.6rem; color: var(--text); }
.plan--yearly .plan-sub strong { color: var(--text); font-family: var(--font-display); font-size: 1.15rem; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.plan-chips li { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 10px; font-size: 0.8125rem; font-weight: 700; }
.plan-chips .save { background: var(--basil-tint); color: var(--basil-ink); }
.plan-chips .trial { background: var(--tint); color: var(--accent-ink); }
.plan-chips svg { width: 14px; height: 14px; }
.plan--yearly .plan-cta { min-height: 56px; font-size: 1.0625rem; }

.redeem-line { margin: 2rem 0 0; text-align: center; color: var(--muted); font-weight: 550; }
.redeem-line .link-arrow { margin-left: 0.25rem; }
.fineprint { max-width: 46rem; margin: 1.5rem auto 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; text-align: center; }
.fineprint a { color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq { background: var(--surface-2); border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 5rem; } }
.faq-intro a { color: var(--accent-ink); }
.faq-list { display: grid; gap: 0.75rem; }
.faq-item { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.faq-item.is-open { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq-item h3 { margin: 0; font-size: 1rem; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--bg-2); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--tint); color: var(--accent-ink); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.35s var(--ease); }
.js .faq-q[aria-expanded="false"] + .faq-a, .js h3:has(.faq-q[aria-expanded="false"]) + .faq-a { grid-template-rows: 0fr; }
.faq-a-inner { overflow: hidden; padding: 0 1.25rem; color: var(--text-2); }
.faq-a-inner > :first-child { margin-top: 0; }
.faq-a-inner > :last-child { margin-bottom: 1.2rem; }
.faq-a-inner a { color: var(--accent-ink); }

/* ---------- CTA band ---------- */
.cta-band { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.cta-inner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.5rem, 1.75rem + 4vw, 5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  border-radius: clamp(24px, 3vw, 36px);
  background: var(--grad);
  color: #FFF6EA;
  text-align: center;
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 246, 234, 0.07) 50%, transparent 0) 0 0 / 56px 56px,
    linear-gradient(rgba(255, 246, 234, 0.07) 50%, transparent 0) 0 0 / 56px 56px;
}
.cta-glyph { width: 54px; height: 68px; margin: 0 auto 1.25rem; color: #FFF6EA; }
.cta-title {
  max-width: 18ch;
  margin: 0 auto 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cta-title em { color: #FFF6EA; }
.cta-sub { max-width: 32rem; margin: 0 auto 2rem; font-size: 1.125rem; opacity: 0.92; }
.cta-inner .store-badge:focus-visible { outline-color: #FFF6EA; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); } }
.footer-brand p { max-width: 22rem; margin: 1rem 0; }
.footer-mail { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 600; text-decoration: none; }
.footer-mail svg { width: 18px; height: 18px; color: var(--accent-ink); }
.footer-mail:hover { color: var(--accent-ink); }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 479.98px) { .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-h { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.footer-nav ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: grid; gap: 0.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.footer-base p { margin: 0; }
.footer-base a { color: var(--text-2); }
.footer-tm { opacity: 0.85; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .card[data-reveal].is-visible:hover, .js .step[data-reveal].is-visible:hover { transform: translateY(-4px); }
.js [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
.js [data-reveal][data-delay="2"] { transition-delay: 0.16s; }
.js [data-reveal][data-delay="3"] { transition-delay: 0.24s; }
.js .card[data-reveal].is-visible:hover, .js .step[data-reveal].is-visible:hover { transition-delay: 0s; }
@media (min-width: 900px) {
  .js .plan--yearly[data-reveal].is-visible { transform: scale(1.03); }
}

/* ==========================================================================
   Inner pages: legal docs, support, beta, redeem, 404
   ========================================================================== */
.doc-hero {
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(50% 80% at 90% 0%, var(--tint), transparent 70%);
}
.doc-hero h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.doc-hero p:not(.eyebrow) { max-width: 40rem; margin: 0; color: var(--muted); font-size: 1.125rem; }
.doc-hero p.doc-meta { margin-top: 1rem; font-size: 0.9375rem; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) clamp(4rem, 3rem + 4vw, 7rem); }
@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 4.5rem; }
  .toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
}
.toc { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
@media (min-width: 1000px) { .toc { padding: 0; border: 0; background: none; } }
.toc-title { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.toc ol { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.toc a { display: block; padding: 0.3rem 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); }

.prose { max-width: 72ch; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  margin: 3rem 0 0.85rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.prose h3 { margin: 1.75rem 0 0.5rem; font-size: 1.125rem; font-weight: 700; color: var(--text); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--accent-ink); }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose strong { color: var(--text); font-weight: 650; }
.prose code { padding: 0.1em 0.35em; border-radius: 6px; background: var(--bg-2); font-size: 0.9em; }
.table-wrap { margin: 1.25rem 0 1.5rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-2); color: var(--text); font-weight: 650; }
.prose tr:last-child td { border-bottom: 0; }
.callout { margin: 0 0 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 0.5rem !important; font-weight: 700; color: var(--text); }
.callout ul { margin-bottom: 0; }
.prose .faq-list { margin-top: 1rem; }

/* Support */
.support-cards { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .support-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .support-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.support-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.support-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.support-card .ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 0.5rem; border-radius: 14px; background: var(--tint); color: var(--accent-ink); }
.support-card .ic svg { width: 22px; height: 22px; }
.support-card strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.support-card span { color: var(--muted); font-size: 0.9375rem; }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2.5rem 0;
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  border-radius: var(--radius-card);
  background: var(--grad);
  color: #FFF6EA;
}
.contact-card h2 { margin: 0 0 0.25rem !important; color: #FFF6EA !important; }
.contact-card p { margin: 0 !important; color: rgba(255, 246, 234, 0.92); }
.contact-card .btn { background: #FFF6EA; color: #8E2716; }
.contact-card .btn:hover { background: #fff; }
.contact-card .btn:focus-visible { outline-color: #FFF6EA; }

.howto { counter-reset: howto; margin: 0 0 1.25rem; padding: 0 !important; list-style: none; }
.howto li { position: relative; margin: 0.85rem 0; padding-left: 2.6rem; counter-increment: howto; }
.howto li::before {
  content: counter(howto);
  position: absolute;
  top: -0.05rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9px;
  background: var(--btn-bg);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Redeem */
.redeem { padding-block: clamp(2.5rem, 2rem + 4vw, 6rem); }
.redeem .container { display: grid; justify-items: center; }
.redeem-card {
  width: min(100%, 560px);
  padding: clamp(1.75rem, 1.25rem + 2.5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.redeem-icon { width: 72px; height: 72px; margin: 0 auto 1.25rem; border-radius: 18px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.redeem-icon svg { width: 34px; height: 43px; color: #FFF6EA; }
.redeem-card h1 { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.redeem-card > p { margin: 0 auto 1.75rem; max-width: 26rem; color: var(--muted); }
.redeem-form { display: grid; gap: 0.75rem; text-align: left; }
.redeem-form label { font-weight: 650; font-size: 0.9375rem; }
.redeem-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.redeem-row input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 56px;
  padding: 0 1.1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.redeem-row input::placeholder { color: var(--muted); opacity: 0.7; letter-spacing: 0.08em; }
.redeem-row input:focus { outline: none; border-color: var(--tomato); box-shadow: 0 0 0 4px var(--tint); }
.redeem-row input[aria-invalid="true"] { border-color: var(--tomato); }
.redeem-row .btn { flex: 1 1 140px; min-height: 56px; }
.redeem-error { margin: 0; color: var(--accent-ink); font-weight: 600; font-size: 0.9375rem; }
.redeem-help { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; text-align: left; }
.redeem-help ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.redeem-help li { margin: 0.3rem 0; }
.redeem-back { margin-top: 1.5rem; }

/* 404 */
.notfound { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 260px); padding-block: clamp(3rem, 2rem + 4vw, 6rem); text-align: center; }
.nf-code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(6rem, 3.5rem + 12vw, 11rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.notfound h1 { max-width: 16ch; margin: 0 auto 1rem; font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.notfound p:not(.nf-code) { max-width: 32rem; margin: 0 auto; color: var(--muted); font-size: 1.125rem; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* Simple footer for inner pages */
.footer-simple .footer-base { margin-top: 0; padding-top: 0; border-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.footer-links a { color: var(--text); font-weight: 550; text-decoration: none; }
.footer-links a:hover { color: var(--accent-ink); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .cta-band, .hero-demo, .nav-toggle, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
