/* Home page (index.html). Depends on site.css tokens. */

/* ---------- Hero ---------- */
.af-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(130px, 9rem + 3vw, 190px) 0 clamp(64px, 4rem + 3vw, 120px);
  background:
    radial-gradient(60% 55% at 82% 30%, rgba(132, 103, 234, 0.28) 0%, rgba(132, 103, 234, 0) 70%),
    radial-gradient(40% 40% at 98% 85%, rgba(255, 122, 26, 0.16) 0%, rgba(255, 122, 26, 0) 70%),
    radial-gradient(45% 50% at 0% 0%, rgba(47, 140, 255, 0.1) 0%, rgba(47, 140, 255, 0) 70%),
    var(--af-canvas);
}

.af-hero::after {
  /* faint grain so the gradient doesn't band */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.af-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: center;
}

.af-hero h1 {
  font-size: var(--af-text-hero);
  line-height: 0.98;
  font-weight: 700;
  margin: 22px 0 22px;
  text-transform: none;
  text-wrap: balance;
}

.af-hero h1 em {
  font-style: normal;
  color: var(--af-brand);
  background: linear-gradient(90deg, var(--af-brand) 0%, #8467EA 60%, var(--af-calories) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.af-hero__lead {
  font-size: var(--af-text-lead);
  line-height: 1.6;
  color: var(--af-ink-muted);
  max-width: 50ch;
}

.af-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.af-hero__proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--af-ink-muted);
}

.af-hero__proof strong { color: var(--af-ink); }
.af-stars { color: #F5B400; letter-spacing: 2px; font-size: 15px; }

.af-hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 600px;
}

.af-hero__visual .af-phone--back {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-8%) rotate(5deg);
  opacity: 0.98;
}

.af-hero__visual .af-phone--front {
  position: relative;
  z-index: 2;
  transform: translateX(-36%) rotate(-3deg);
}

.af-hero__visual .af-chip--a { top: 120px; left: 0; }
.af-hero__visual .af-chip--b { bottom: 120px; left: 2%; }
.af-hero__visual .af-chip--c { top: 24px; right: 2%; }

/* ---------- Real numbers ---------- */
.af-numbers {
  position: relative;
  z-index: 2;
  margin-top: -48px;
}

.af-numbers__card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--af-surface);
  border-radius: var(--af-radius-card);
  box-shadow: var(--af-shadow-card);
  list-style: none;
  margin: 0;
  padding: 8px;
}

.af-number {
  padding: 22px 20px;
  border-radius: 18px;
}

.af-number + .af-number { box-shadow: -1px 0 0 var(--af-line); }

.af-number__value {
  display: block;
  font-family: var(--af-font-display);
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.75rem);
  line-height: 1;
  font-weight: 700;
  color: var(--af-ink);
  font-variant-numeric: tabular-nums;
}

.af-number__value span { font-size: 0.7em; color: #F5B400; }

.af-number__label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--af-ink-muted);
}

.af-number__bar {
  display: block;
  height: 6px;
  margin-top: 14px;
  border-radius: 6px;
  background: var(--af-line);
  overflow: hidden;
}

.af-number__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

/* ---------- How it works ---------- */
.af-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.af-step {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: var(--af-radius-card);
  background: var(--af-surface);
  box-shadow: inset 0 0 0 1px var(--af-line);
  transition: box-shadow var(--af-normal) var(--af-ease), transform var(--af-normal) var(--af-ease);
}

.af-step:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--af-brand-100), var(--af-shadow-card);
}

.af-step::before {
  counter-increment: step;
  content: '0' counter(step);
  display: block;
  font-family: var(--af-font-display);
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  color: var(--af-brand-100);
  margin-bottom: 18px;
}

.af-step h3 {
  font-size: var(--af-text-h3);
  margin-bottom: 10px;
}

.af-step p {
  margin: 0;
  color: var(--af-ink-muted);
  line-height: 1.6;
}

/* ---------- Feature rows ---------- */
.af-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
}

.af-feature + .af-feature { margin-top: var(--af-space-section); }

.af-feature--flip .af-feature__visual { order: -1; }

.af-feature__visual {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 48px 24px;
  border-radius: 36px;
  isolation: isolate;
}

.af-feature__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--af-visual-bg, var(--af-brand-50));
}

.af-feature__visual .af-phone:nth-child(2) { margin-top: 64px; }

.af-feature__visual--calories { --af-visual-bg: linear-gradient(160deg, #FFF1E5 0%, #FDEBF0 100%); }
.af-feature__visual--brand    { --af-visual-bg: linear-gradient(160deg, #F4F1FE 0%, #E6F1FF 100%); }

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

.af-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.af-list__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 20px;
}

.af-list strong {
  display: block;
  color: var(--af-ink);
  font-size: 16px;
  margin-bottom: 2px;
}

.af-list span {
  color: var(--af-ink-muted);
  line-height: 1.55;
  font-size: 15px;
}

.af-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.af-macros span {
  padding: 8px 14px;
  border-radius: var(--af-radius-pill);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Bento ---------- */
.af-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.af-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 32px 32px 0;
  border-radius: 32px;
  background: var(--af-surface);
  box-shadow: inset 0 0 0 1px var(--af-line);
  transition: transform var(--af-normal) var(--af-ease), box-shadow var(--af-normal) var(--af-ease);
}

.af-tile:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--af-line), var(--af-shadow-card);
}

.af-tile--wide { grid-column: span 4; }
.af-tile--narrow { grid-column: span 2; }
.af-tile--half { grid-column: span 3; }

.af-tile__tag {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--af-radius-pill);
  font-size: 13px;
  font-weight: 700;
}

.af-tile h3 {
  font-size: var(--af-text-h3);
  margin: 16px 0 8px;
}

.af-tile p {
  color: var(--af-ink-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 44ch;
}

.af-tile__phone {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: center;
  /* the phone rises out of the tile's bottom edge */
  margin-bottom: -150px;
}

.af-tile--wide .af-tile__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  height: 100%;
}

.af-tile--wide .af-tile__phone {
  margin-top: 0;
  padding-top: 0;
  align-self: end;
}

.af-tile--fasting { background: linear-gradient(170deg, var(--af-fasting-soft) 0%, #fff 70%); }
.af-tile--recipes { background: linear-gradient(170deg, var(--af-calories-soft) 0%, #fff 70%); }
.af-tile--progress { background: linear-gradient(170deg, var(--af-success-soft) 0%, #fff 70%); }
.af-tile--coach { background: linear-gradient(170deg, var(--af-brand-50) 0%, #fff 70%); }

/* ---------- Motivation band ---------- */
.af-band {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  padding: clamp(48px, 6vw, 88px);
  background:
    radial-gradient(50% 80% at 100% 0%, rgba(255, 122, 26, 0.35) 0%, rgba(255, 122, 26, 0) 70%),
    radial-gradient(60% 90% at 0% 100%, rgba(132, 103, 234, 0.45) 0%, rgba(132, 103, 234, 0) 70%),
    var(--af-brand-900);
  color: rgba(255, 255, 255, 0.78);
}

.af-band h2 { color: #fff; }
.af-band .af-lead { color: rgba(255, 255, 255, 0.72); }
.af-band .af-eyebrow { background: rgba(255, 255, 255, 0.12); color: #fff; }

.af-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.af-band__item {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background var(--af-normal) ease;
}

.af-band__item:hover { background: rgba(255, 255, 255, 0.12); }

.af-band__item .af-emoji { font-size: 28px; display: block; margin-bottom: 14px; }

.af-band__item strong {
  display: block;
  color: #fff;
  font-size: 17px;
  margin-bottom: 6px;
}

.af-band__item span { font-size: 15px; line-height: 1.55; }

/* ---------- Coaching / program teaser ---------- */
.af-coach {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.af-coach__card {
  padding: 36px;
  border-radius: 32px;
  background: var(--af-surface);
  box-shadow: inset 0 0 0 1px var(--af-line);
}

.af-coach__card--accent {
  background: linear-gradient(160deg, var(--af-brand) 0%, var(--af-brand-700) 100%);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--af-shadow-float);
}

.af-coach__card--accent h3 { color: #fff; }

.af-coach__card h3 {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  margin: 14px 0 12px;
}

.af-coach__card p { line-height: 1.6; }

.af-coach__card .af-btn { margin-top: 20px; }

.af-coach__card--accent .af-btn--ghost {
  background: #fff;
  box-shadow: none;
}

.af-checks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.af-checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.af-checks li::before {
  content: '✓';
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: var(--af-success-soft);
  color: var(--af-success-ink);
}

.af-coach__card--accent .af-checks li::before {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ---------- Final CTA ---------- */
.af-final {
  text-align: center;
}

.af-final .af-hero__ctas { justify-content: center; }
.af-final .af-lead { margin-left: auto; margin-right: auto; }

/* ---------- FAQ section spacing on the new page ---------- */
.af-faq .accordion { max-width: 860px; margin: 48px auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .af-phone--lg { --w: 270px; }
  .af-band__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .af-hero__grid,
  .af-feature,
  .af-coach { grid-template-columns: 1fr; }
  .af-hero__visual { min-height: 560px; margin-top: 16px; }
  .af-feature--flip .af-feature__visual { order: 0; }
  .af-steps { grid-template-columns: 1fr; }
  .af-bento { grid-template-columns: 1fr 1fr; }
  .af-tile--wide, .af-tile--narrow, .af-tile--half { grid-column: span 2; }
  .af-tile--wide .af-tile__body { grid-template-columns: 1fr; }
  .af-tile--wide .af-tile__phone { margin-bottom: -150px; }
  .af-numbers__card { grid-template-columns: repeat(2, 1fr); }
  .af-number:nth-child(3) { box-shadow: none; }
  .af-number:nth-child(n + 3) { border-top: 1px solid var(--af-line); }
}

@media (max-width: 575px) {
  .af-hero__visual { min-height: 470px; }
  .af-hero__visual .af-phone { --w: 200px; }
  .af-hero__visual .af-phone--back { top: 50px; }
  .af-hero__visual .af-chip--a { top: 60px; left: -4px; }
  .af-hero__visual .af-chip--b { bottom: 40px; left: -4px; }
  .af-hero__visual .af-chip--c { display: none; }
  .af-feature__visual { padding: 32px 12px; gap: 12px; }
  .af-feature__visual .af-phone { --w: 160px; }
  .af-feature__visual .af-phone:only-child { --w: 230px; }
  .af-band__grid { grid-template-columns: 1fr; }
  .af-tile { min-height: 420px; padding: 26px 22px 0; }
  .af-tile .af-phone { --w: 220px; }
  .af-hero__ctas .af-btn { flex: 1 1 100%; }
}

.af-steps--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199px) { .af-steps--four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .af-steps--four { grid-template-columns: 1fr; } }
