/* Section layouts: hero + phone mockup, stats, feature bento, steps,
   nutrition showcase, FAQ, download CTA, footer.
   Animated fills (ring, bars, sparkline) start empty only under .js and fill
   when the reveal observer adds .is-visible, so no-JS visitors see final values. */

/* ----- Hero ----- */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 96px; overflow: hidden; }
.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 1100px;
  height: 800px;
  transform: translateX(-30%);
  background:
    radial-gradient(closest-side, rgba(14, 165, 233, 0.32), transparent 70%),
    radial-gradient(closest-side at 80% 70%, rgba(245, 158, 11, 0.16), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translateX(-38%) translateY(40px) scale(1.08); } }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--text-2); font-size: 0.9rem; }
.hero__trust li::before { content: '✓ '; color: var(--success); }

/* ----- Phone mockup ----- */
.phone {
  justify-self: center;
  width: 300px;
  max-width: 100%;
  height: 610px;
  padding: 12px;
  border-radius: 46px;
  background: #020617;
  box-shadow: 0 0 0 2px #1E293B, var(--shadow), 0 0 80px rgba(14, 165, 233, 0.2);
  position: relative;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -12px; } }
.phone__notch { position: absolute; top: 22px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 2; }
.phone__screen { height: 100%; border-radius: 36px; background: var(--bg-2); padding: 56px 16px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.phone__date { font-size: 0.72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; }
.phone__hero { padding: 16px; border-radius: 18px; background: linear-gradient(140deg, rgba(14, 165, 233, 0.35), rgba(30, 41, 59, 0.9)); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.phone__label { font-size: 0.7rem; color: var(--primary-light); }
.phone__title { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; text-transform: uppercase; }
.phone__meta { font-size: 0.72rem; color: var(--text-2); margin-bottom: 6px; }
.phone__bento { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--surface); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.tile--ring { grid-row: span 2; align-items: center; justify-content: center; position: relative; }
.tile__k { font-size: 0.65rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; }
.tile__v { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.tile__s { font-size: 0.65rem; color: var(--text-2); }
.tile__s.up { color: var(--success); }
.ring { width: 104px; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--border); stroke-width: 9; }
/* Circumference of r=42 is ~264; dashoffset hides the unfilled share. */
.ring__fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: calc(264 * (1 - var(--p)));
  transition: stroke-dashoffset 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}
.js .reveal:not(.is-visible) .ring__fill { stroke-dashoffset: 264; }
.ring__label { position: absolute; text-align: center; line-height: 1.1; }
.ring__label strong { display: block; font-family: var(--font-display); font-size: 1.35rem; }
.ring__label span { font-size: 0.58rem; color: var(--text-2); }
.phone__list { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.row em { margin-left: auto; font-style: normal; color: var(--text-2); font-size: 0.72rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.dot--done { background: var(--success); border-color: var(--success); }

/* ----- Stats ----- */
.stats { border-block: 1px solid var(--hairline); background: var(--bg-2); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 36px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat strong { display: block; font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--primary-light); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.88rem; color: var(--text-2); }

/* ----- Generic sections ----- */
.section { padding: 112px 0; }
.section--alt { background: var(--bg-2); }
.section__head { max-width: 720px; margin-bottom: 56px; }

/* ----- Feature bento ----- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: var(--r-card);
  padding: 28px;
  transition: translate 0.3s ease, border-color 0.3s ease;
}
.card:hover { translate: 0 -4px; border-color: rgba(14, 165, 233, 0.5); }
/* .js .reveal sets its own transition list and would drop the hover easing, so cards repeat all four. */
.js .reveal.card { transition: opacity 0.7s ease, transform 0.7s ease, translate 0.3s ease, border-color 0.3s ease; }
.card--wide { grid-column: span 2; }
/* Full-row card closes the grid evenly: 2+1 / 1+1+1 / 3 at three columns, 2 / 1+1 / 1+1 / 2 at two. */
.card--full { grid-column: 1 / -1; }
.card p { color: var(--text-2); }
.card__icon { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; background: rgba(14, 165, 233, 0.12); margin-bottom: 18px; flex-shrink: 0; }
.score-bar { height: 8px; background: var(--bg-2); border-radius: 8px; margin: 22px 0 10px; overflow: hidden; }
.score-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--success)); transition: width 1.4s ease 0.3s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips span { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }

/* ----- Steps ----- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 32px 28px; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--bg); }
.step__n { display: block; font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; line-height: 1; margin-bottom: 18px; color: transparent; -webkit-text-stroke: 1.5px var(--primary); }
.step p { color: var(--text-2); }

/* ----- Nutrition split ----- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 0.75rem; background: rgba(16, 185, 129, 0.15); color: var(--success); }
.macro-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.macro-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.macro-card__kcal { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.macro { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 0.88rem; }
.macro em { font-style: normal; color: var(--text-2); font-size: 0.8rem; }
.bar { height: 10px; background: var(--bg-2); border-radius: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: inherit; transition: width 1.2s ease 0.3s; }
.spark { display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.spark span { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: rgba(14, 165, 233, 0.35); transition: height 1s ease 0.3s; }
.spark span.today { background: var(--primary); }
.js .reveal:not(.is-visible) .score-bar span,
.js .reveal:not(.is-visible) .bar i { width: 0; }
.js .reveal:not(.is-visible) .spark span { height: 0; }

/* ----- FAQ ----- */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; position: relative; border-radius: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary-light); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 22px; color: var(--text-2); }

/* ----- Download CTA ----- */
.cta { position: relative; padding: 120px 0; text-align: center; overflow: hidden; }
.hero__glow--cta { top: 0; transform: translateX(-50%); animation: none; }
.cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta__soon { margin-bottom: 20px; }
.cta .lead { margin-inline: auto; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.store { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 14px; background: #000; border: 1px solid var(--border); text-align: left; font-weight: 600; font-size: 1.1rem; line-height: 1.15; transition: translate 0.2s ease, border-color 0.2s ease; }
.store:hover { translate: 0 -2px; border-color: var(--primary); }
.store small { display: block; font-size: 0.68rem; font-weight: 400; color: var(--text-2); }
.store__icon { font-size: 1.6rem; width: 28px; height: 28px; text-align: center; flex-shrink: 0; }

/* ----- Footer ----- */
.footer { border-top: 1px solid var(--hairline); padding: 32px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }

/* ----- Responsive ----- */
@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; gap: 56px; }
  .hero__copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero__ctas, .hero__trust { justify-content: center; }
  .bento { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .bento, .steps { grid-template-columns: 1fr; }
  .card--wide, .card--full { grid-column: auto; }
  .stat { padding: 28px 12px; }
  .stat strong { font-size: 2.4rem; }
  .macro { grid-template-columns: 60px 1fr; }
  .macro em { grid-column: 2; margin-top: -8px; }
  .footer__inner { justify-content: center; text-align: center; }
}
