/*
 * FastingFibi website – one stylesheet for all pages.
 * Tokens mirror the app: constants/Colors.ts, constants/Design.ts (Radius,
 * Spacing, Fluffy) and constants/FibiPoses.ts (FIBI_STAGE_COLOR).
 */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --brand: #9333ea;
  --brand-strong: #7e22ce;
  --brand-soft: rgba(147, 51, 234, 0.12);
  --on-brand: #ffffff;
  --accent: #ff9500;
  --accent-soft: rgba(255, 149, 0, 0.14);
  --cta-1: #9333ea;
  --cta-2: #c026d3;

  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --stage: #f1e9fc;
  --text: #000000;
  --text-2: #636366;
  --text-3: #8e8e93;
  --separator: rgba(60, 60, 67, 0.16);
  --fill: rgba(120, 120, 128, 0.12);
  --warning: #ff9500;
  --warning-bg: #fff2de;
  --banner: rgba(255, 255, 255, 0.92);
  --header-bg: rgba(242, 242, 247, 0.78);
  --backdrop: linear-gradient(160deg, #f6edff 0%, #fff1f8 55%, #fff6ec 100%);
  --hero-glow: radial-gradient(60% 55% at 70% 40%, rgba(184, 92, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 15% 85%, rgba(255, 122, 198, 0.16), transparent 70%);

  --shadow-card: 0 10px 24px rgba(107, 33, 168, 0.1), 0 1px 2px rgba(107, 33, 168, 0.05);
  --shadow-float: 0 18px 40px rgba(107, 33, 168, 0.18);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-xxl: 28px;
  --r-pill: 999px;

  --gutter: 20px;
  --max: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  /* Same as AccentTitle in the app: the system serif (New York on Apple devices) */
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #b268f7;
    --brand-strong: #c58bff;
    --brand-soft: rgba(178, 104, 247, 0.2);
    --accent: #ff9f0a;
    --accent-soft: rgba(255, 159, 10, 0.2);
    --cta-1: #9333ea;
    --cta-2: #c026d3;

    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --card: #1c1c1e;
    --stage: #24143d;
    --text: #ffffff;
    --text-2: #98989f;
    --text-3: #6e6e73;
    --separator: rgba(84, 84, 88, 0.6);
    --fill: rgba(118, 118, 128, 0.24);
    --warning: #ff9f0a;
    --warning-bg: #4a3000;
    --banner: rgba(44, 44, 46, 0.92);
    --header-bg: rgba(0, 0, 0, 0.72);
    --backdrop: linear-gradient(170deg, #1c0e33 0%, #140a24 55%, #0b0614 100%);
    --hero-glow: radial-gradient(60% 55% at 70% 40%, rgba(184, 92, 255, 0.28), transparent 70%),
      radial-gradient(40% 40% at 15% 85%, rgba(217, 70, 239, 0.16), transparent 70%);

    --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.45);
    --shadow-float: 0 18px 44px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-strong);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

::selection {
  background: var(--brand-soft);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-brand);
}

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

/* Title with an italic serif accent word, like AccentTitle in the app */
.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -0.01em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  transition: transform 0.4s var(--spring);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a:not(.pill-soon) {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.site-nav a:not(.pill-soon):hover {
  background: var(--fill);
}

.pill-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pill-soon:hover {
  color: var(--brand);
  background: rgba(147, 51, 234, 0.18);
}

@media (max-width: 860px) {
  .site-nav a:not(.pill-soon) {
    display: none;
  }
}

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-lg);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--spring), box-shadow 0.25s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cta-1), var(--cta-2));
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.35);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(147, 51, 234, 0.42);
}

.btn--soft {
  color: var(--brand);
  background: var(--brand-soft);
}

.btn--soft:hover {
  color: var(--brand);
  transform: translateY(-2px);
}

/* "Bald im App Store" – own design, no Apple artwork */
.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 20px 8px 10px;
  border-radius: var(--r-lg);
  background: #111114;
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 17, 20, 0.22);
}

.store-soon img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.store-soon span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-soon small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.store-soon strong {
  font-family: var(--font-rounded);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (prefers-color-scheme: dark) {
  .store-soon {
    background: #1c1c1e;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

:where(.card) h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

:where(.card) p {
  color: var(--text-2);
  font-size: 16px;
}

/* ---------- Fibi stage (FibiStage in the app) ---------- */
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  background: var(--stage);
  overflow: hidden;
  isolation: isolate;
}

.stage__fibi {
  position: absolute;
  right: 6%;
  bottom: 5%;
  width: 44%;
  height: 88%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s var(--spring);
}

.stage__fibi:hover {
  transform: translateY(-4px) rotate(-2deg);
}

.stage__fibi:active {
  transform: scale(0.94);
}

.stage__fibi img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transition: opacity 0.18s ease;
}

.stage--center .stage__fibi {
  right: 25%;
}

.stage--edge .stage__fibi {
  right: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
}

.stage--edge .stage__fibi img {
  object-position: bottom right;
}

.stage__bubble {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 46%;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* White speech bubble with a tail pointing toward Fibi */
.bubble {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: #ffffff;
  color: #1c1c1e;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 16px rgba(107, 33, 168, 0.12);
  animation: bubble-in 0.5s var(--spring) both;
}

.bubble::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: #ffffff;
  border-radius: 3px;
  transform: rotate(45deg);
}

.bubble--down::after {
  right: auto;
  left: 50%;
  top: auto;
  bottom: -5px;
  margin: 0 0 0 -7px;
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(6px);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}

.section--tight {
  padding: 56px 0;
}

.section__head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
}

.lead {
  margin-top: 14px;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 72px;
  background: var(--hero-glow), linear-gradient(180deg, var(--stage) 0%, var(--bg) 78%);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 48px;
}

.hero__text {
  animation: rise 0.8s var(--ease-out) both;
}

.hero__wordmark {
  width: min(300px, 70%);
  margin: 0 0 18px -6px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero .lead {
  max-width: 34em;
  margin-top: 18px;
}

.hero .chips {
  margin-top: 24px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.hero__note {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Playground: Fibi hangs from a Dynamic Island, props can be flicked around */
.playground {
  position: relative;
  height: clamp(440px, 52vw, 580px);
  border-radius: var(--r-xxl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%), var(--stage);
  box-shadow: var(--shadow-float), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  animation: pop-in 0.9s var(--spring) 0.1s both;
}

@media (prefers-color-scheme: dark) {
  .playground {
    background: radial-gradient(70% 60% at 50% 30%, rgba(184, 92, 255, 0.25), transparent 70%), var(--stage);
    box-shadow: var(--shadow-float), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
}

.playground__floor {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 46%;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(107, 33, 168, 0.16), transparent);
  transform: translateX(-50%);
}

.playground__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

/* Dynamic Island with FastingFibi's Live Activity */
.island {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 3;
  width: 212px;
  height: 37px;
  padding: 0;
  border: 0;
  border-radius: 19px;
  background: #000;
  color: #fff;
  transform: translateX(-50%);
  overflow: hidden;
  cursor: pointer;
  transition: width 0.5s var(--spring), height 0.5s var(--spring), border-radius 0.5s var(--spring);
  -webkit-tap-highlight-color: transparent;
}

.island:focus-visible {
  outline-offset: 4px;
  border-radius: 19px;
}

.island__compact,
.island__expanded {
  position: absolute;
  inset: 0;
  transition: opacity 0.2s ease;
}

.island__compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 7px;
}

.island__compact img {
  width: 24px;
  height: 24px;
  border-radius: 12px;
}

.island__time {
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  color: #c58bff;
}

.island__expanded {
  opacity: 0;
  padding: 8px 18px 12px;
  display: grid;
  gap: 9px;
  text-align: left;
}

.island__flanks {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.island__flanks img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.island__count {
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
}

.island__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.island__row strong {
  font-size: 16px;
  font-weight: 600;
}

.island__caption {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}

.island__track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.island__fill {
  display: block;
  width: 14%;
  height: 100%;
  border-radius: 3px;
  background: #b268f7;
  transition: width 0.6s ease;
}

.island.is-open {
  width: min(92%, 380px);
  height: 142px;
  border-radius: 40px;
}

.island.is-open .island__compact {
  opacity: 0;
}

.island.is-open .island__expanded {
  opacity: 1;
  transition-delay: 0.15s;
}

/* Hanging Fibi: the outer element sways gently, the inner one takes pushes */
.hang {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  width: clamp(150px, 15vw, 180px);
  margin-left: calc(clamp(150px, 15vw, 180px) / -2);
  transform-origin: 50% 0;
  animation: sway 3.6s ease-in-out infinite alternate;
}

.hang__push {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 0;
  -webkit-tap-highlight-color: transparent;
}

.hang__push:focus-visible {
  border-radius: 40px;
}

.hang img {
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(107, 33, 168, 0.18));
}

@keyframes sway {
  from {
    transform: rotate(-3.5deg);
  }
  to {
    transform: rotate(3.5deg);
  }
}

.toy {
  position: absolute;
  z-index: 1;
  transition: scale 0.25s var(--spring);
  width: var(--size, 64px);
  height: var(--size, 64px);
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.toy:active {
  cursor: grabbing;
}

.toy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  animation: bob 3.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 10px rgba(107, 33, 168, 0.16));
}

.toy.is-held {
  scale: 1.15;
}

.toy.is-held img {
  animation-play-state: paused;
}

/* Starting spots (percent of the playground); the script takes over from here */
.toy--stopwatch {
  --size: 66px;
  left: 8%;
  top: 13%;
  rotate: -14deg;
}
.toy--moon {
  --size: 62px;
  left: 76%;
  top: 15%;
  rotate: 12deg;
}
.toy--salad {
  --size: 82px;
  left: 4%;
  top: 46%;
  rotate: 8deg;
}
.toy--water {
  --size: 60px;
  left: 80%;
  top: 44%;
  rotate: -8deg;
}
.toy--apple {
  --size: 50px;
  left: 20%;
  top: 70%;
  rotate: -18deg;
}
.toy--flame {
  --size: 54px;
  left: 70%;
  top: 70%;
  rotate: 16deg;
}

.toy:nth-child(2n) img {
  animation-duration: 3.8s;
  animation-delay: -1.2s;
}

.toy:nth-child(3n) img {
  animation-duration: 2.9s;
  animation-delay: -0.6s;
}

@keyframes bob {
  from {
    transform: translateY(-5px);
  }
  to {
    transform: translateY(5px);
  }
}

/* ---------- Features (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.bento > .card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.bento .span-3 {
  grid-column: span 3;
}

.bento .span-2 {
  grid-column: span 2;
}

.bento .span-6 {
  grid-column: span 6;
}

.feature-visual {
  position: relative;
  margin: -6px -6px 12px;
  border-radius: var(--r-lg);
  background: var(--stage);
  overflow: hidden;
}

.feature-tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

/* 24h fasting dial (FastingClock in the app) */
.dial-wrap {
  display: grid;
  place-items: center;
  padding: 18px 12px 14px;
}

.dial {
  width: min(100%, 280px);
  height: auto;
}

.dial__track {
  fill: none;
  stroke: rgba(147, 51, 234, 0.1);
  stroke-width: 34;
}

.dial__arc {
  fill: none;
  stroke: url(#dialGradient);
  stroke-width: 34;
  stroke-linecap: round;
}

.dial__tick {
  stroke: var(--text-3);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.6;
}

.dial__num {
  fill: var(--text-2);
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

.dial__big {
  fill: var(--text);
  font-family: var(--font-rounded);
  font-size: 46px;
  font-weight: 700;
  text-anchor: middle;
  letter-spacing: -1px;
}

.dial__label {
  fill: var(--brand);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 600;
  text-anchor: middle;
}

.dial__small {
  fill: var(--text-2);
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
}

.rhythms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.rhythm {
  min-width: 56px;
  padding: 7px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(107, 33, 168, 0.08);
  transition: transform 0.25s var(--spring), background-color 0.2s ease, color 0.2s ease;
}

.rhythm:hover {
  transform: translateY(-2px);
}

.rhythm[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}

/* Phone top with Dynamic Island for the Live Activity card */
.phone-top {
  position: relative;
  height: 230px;
  margin: 18px 18px 0;
  border-radius: 46px 46px 0 0;
  background: linear-gradient(180deg, #2a1650, #120a22);
  box-shadow: inset 0 0 0 6px #0b0b0d, inset 0 0 0 8px #3a3a3c;
  overflow: hidden;
}

.phone-top__clock {
  position: absolute;
  left: 0;
  right: 0;
  top: 120px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-rounded);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  letter-spacing: -1px;
}

.phone-top__date {
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.phone-top .island {
  top: 20px;
}

/* Food capture tiles */
.food-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
}

.food-tile {
  display: grid;
  align-content: start;
  gap: 4px;
  justify-items: center;
  padding: 16px 8px 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  text-align: center;
  box-shadow: 0 2px 8px rgba(107, 33, 168, 0.08);
  transition: transform 0.3s var(--spring);
}

.food-tile:hover {
  transform: translateY(-4px) rotate(-1.5deg);
}

.food-tile__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--brand-soft);
  font-size: 24px;
}

.food-tile strong {
  font-size: 15px;
}

.food-tile > span:not(.food-tile__icon) {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.3;
}

.food-manual {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 18px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  font-size: 14px;
}

.food-manual span:last-child {
  color: var(--text-2);
}

/* iOS notification banners (NotificationStack in the app) */
.notif-stage {
  position: relative;
  padding: 18px 18px 110px;
}

.notifs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notif {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 22px;
  background: var(--banner);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 14px rgba(107, 33, 168, 0.1);
}

.notif img {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.notif__text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
}

.notif__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.notif__head strong {
  font-weight: 600;
}

.notif__head span {
  color: var(--text-2);
  font-size: 13px;
}

.notif:nth-child(2) {
  opacity: 0.88;
  transform: scale(0.975);
}

.notif:nth-child(3) {
  opacity: 0.76;
  transform: scale(0.95);
}

.js .notifs:not(.is-in) .notif {
  opacity: 0;
  transform: translateY(-120px) scale(0.4);
}

.js .notifs .notif {
  transition: opacity 0.45s ease, transform 0.7s var(--spring);
}

.js .notifs.is-in .notif:nth-child(2) {
  transition-delay: 0.15s;
}

.js .notifs.is-in .notif:nth-child(3) {
  transition-delay: 0.3s;
}

/* Fibi peeking up from behind the card edge (FooterPeek in the app) */
.peek {
  position: absolute;
  right: 22px;
  bottom: -64px;
  width: 120px;
  transition: transform 0.5s var(--spring);
}

.peek img {
  width: 100%;
}

.card:hover .peek {
  transform: translateY(-14px) rotate(-4deg);
}

.peek-bubble {
  position: absolute;
  right: 150px;
  bottom: 40px;
}

/* Small feature cards */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}

.mini:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.mini h3 {
  font-size: 18px;
}

.mini p {
  font-size: 15px;
}

.mini__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: var(--brand-soft);
  font-size: 28px;
  transition: transform 0.45s var(--spring);
}

.mini:hover .mini__icon {
  transform: rotate(-10deg) scale(1.1);
}

.mini__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 24px;
}

.step .stage {
  margin-bottom: 8px;
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 700;
}

.step > p {
  padding-inline: 10px;
}

.step__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 10px;
}

.step__head h3 {
  padding: 0;
}

/* ---------- Safety ---------- */
.safety {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.safety .stage {
  box-shadow: var(--shadow-float);
}

.safety__list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.safety__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.safety__list li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.safety__note {
  margin-top: 16px;
  font-size: 14px !important;
}

.hold {
  position: relative;
  display: block;
  width: 100%;
  height: 54px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-radius: 27px;
  background: var(--brand-soft);
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.18);
}

.hold__label,
.hold__fill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hold__label {
  color: var(--brand);
}

.hold__fill {
  background: var(--brand);
  color: #fff;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.25s ease-out;
}

.hold.is-holding .hold__fill {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.4s linear;
}

.hold.is-done .hold__fill {
  clip-path: inset(0 0 0 0);
  transition: none;
}

.hold.is-done {
  cursor: default;
  animation: hold-pop 0.5s var(--spring);
}

@keyframes hold-pop {
  50% {
    transform: scale(1.03);
  }
}

.hold-foot {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 48px;
  align-items: start;
}

.faq__aside {
  position: sticky;
  top: 96px;
}

.faq__aside img {
  width: min(260px, 70%);
  margin-top: 28px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 56px 18px 20px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239333EA' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E")
    center / 14px no-repeat;
  transition: transform 0.35s var(--spring);
}

.faq-item[open] summary::after {
  transform: rotate(135deg);
}

.faq-item summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-lg);
}

.faq-item__body {
  padding: 0 20px 20px;
  color: var(--text-2);
  font-size: 16px;
}

.faq-item__body p + p {
  margin-top: 10px;
}

.faq-item[open] .faq-item__body {
  animation: rise 0.35s var(--ease-out);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 24px;
  padding: 48px 56px;
  border-radius: var(--r-xxl);
  background: var(--hero-glow), var(--backdrop);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.cta h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.cta__fibi {
  justify-self: center;
  width: min(280px, 100%);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 40px 0 48px;
  border-top: 0.5px solid var(--separator);
  color: var(--text-2);
  font-size: 15px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  background: var(--fill);
  color: var(--text);
}

.site-footer small {
  display: block;
  width: 100%;
  font-size: 13px;
}

/* ---------- Legal & support pages ---------- */
.page-hero {
  padding: 36px 0 28px;
  background: linear-gradient(180deg, var(--stage) 0%, var(--bg) 100%);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  align-items: center;
  gap: 36px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-hero .lead {
  margin-top: 12px;
}

.page-hero .stage {
  box-shadow: var(--shadow-card);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 44px) 40px;
}

.prose h2 {
  margin-top: 36px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 22px;
  font-size: 17px;
  font-weight: 600;
}

.prose p,
.prose ul,
.prose address {
  margin-top: 10px;
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.6;
}

.prose p.meta {
  color: var(--text-2);
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 4px;
}

.prose li::marker {
  color: var(--brand);
}

.prose address {
  padding-left: 16px;
  border-left: 3px solid var(--brand-soft);
  font-style: normal;
}

.prose .warning {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--warning-bg);
}

.prose .supplement {
  margin-top: 40px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--brand-soft);
}

.prose .supplement h2 {
  margin-top: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.contact-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.contact-card .btn {
  width: 100%;
}

.contact-card .mail {
  font-family: var(--font-rounded);
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

.help-steps {
  margin: 8px 0 0;
  padding-left: 1.25em;
}

.help-steps li + li {
  margin-top: 4px;
}

.help-steps li::marker {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- 404 / small pages ---------- */
.lost {
  min-height: calc(100vh - 61px - 140px);
  display: grid;
  place-items: center;
  padding: 48px 0 24px;
  background: var(--hero-glow), linear-gradient(180deg, var(--stage) 0%, var(--bg) 85%);
}

.lost__inner {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 560px;
  text-align: center;
}

.lost .stage {
  width: min(100%, 520px);
  box-shadow: var(--shadow-float);
}

.lost h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lost__code {
  font-family: var(--font-rounded);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lost .hero__cta {
  justify-content: center;
  margin-top: 6px;
}

/* ---------- Reveal on scroll (only with JS, only without reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  .js .reveal-group > .is-in:nth-child(2) {
    transition-delay: 0.08s;
  }

  .js .reveal-group > .is-in:nth-child(3) {
    transition-delay: 0.16s;
  }

  .js .reveal-group > .is-in:nth-child(4) {
    transition-delay: 0.24s;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bento .span-3,
  .bento .span-2 {
    grid-column: span 6;
  }

  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .faq__aside {
    position: static;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
  }

  .faq__aside img {
    width: 120px;
    margin: 0;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 20px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero__stage {
    order: -1;
  }

  .hero__text {
    text-align: center;
  }

  .hero__wordmark {
    margin-inline: auto;
    width: min(250px, 66%);
  }

  .hero .lead {
    margin-inline: auto;
  }

  .hero .chips,
  .hero__cta {
    justify-content: center;
  }

  .playground {
    height: 430px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .safety {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cta {
    grid-template-columns: 1fr;
    padding: 36px 24px 0;
    text-align: center;
  }

  .cta__actions {
    justify-content: center;
  }

  .cta__fibi {
    width: 220px;
  }

  .page-hero__grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .page-hero .stage {
    max-width: 480px;
  }

  .contact-card {
    position: static;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .section__head {
    margin-bottom: 28px;
  }

  .card {
    padding: 20px;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .mini {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
  }

  .mini__icon {
    flex: none;
    width: 52px;
    height: 52px;
    margin: 0;
  }

  .mini__body {
    display: grid;
    gap: 4px;
  }

  .food-tiles {
    gap: 8px;
    padding: 14px;
  }

  .food-tile {
    padding: 12px 4px;
  }

  .food-tile > span:not(.food-tile__icon) {
    font-size: 11.5px;
  }

  .rhythms {
    gap: 5px;
  }

  .rhythm {
    min-width: 0;
    padding: 6px 9px;
    font-size: 14px;
  }

  .food-manual {
    margin: 0 14px 14px;
  }

  .peek {
    width: 96px;
    right: 12px;
    bottom: -52px;
  }

  .peek-bubble {
    right: 116px;
    bottom: 30px;
  }

  .stage__bubble {
    left: 12px;
    width: 52%;
  }

  .bubble {
    padding: 8px 12px;
    font-size: 14px;
  }

  .phone-top {
    margin: 14px 10px 0;
  }

  .phone-top__clock {
    font-size: 56px;
  }

  .faq-item summary {
    padding: 16px 52px 16px 16px;
    font-size: 16px;
  }

  .faq-item__body {
    padding: 0 16px 18px;
  }

  .prose {
    padding: 24px 18px 32px;
  }

  .store-soon {
    min-height: 54px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .hang,
  .toy img {
    animation: none !important;
  }

  /* The hold button still needs its progress to be visible */
  .hold.is-holding .hold__fill {
    transition-duration: 1.4s !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .page-hero .stage,
  .back-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    box-shadow: none;
  }
}

/* ---------- Additions ---------- */
.dial__dot {
  fill: var(--text-3);
  opacity: 0.55;
}

.privacy-strip {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 18px;
}

.privacy-strip .mini__icon {
  flex: none;
  margin: 0;
}

.privacy-strip p {
  margin-top: 6px;
}

.safety-card {
  margin-top: 22px;
}

/* Interactive bits that only make sense with the script */
html:not(.js) .hold,
html:not(.js) .playground__hint {
  display: none;
}
