/* PureBite — site design system (mirrors app IF tokens) */
:root {
  --ink: #12263a;
  --ink-soft: #2a3f52;
  --muted: #6b7c8a;
  --fasting: #e16872;
  --fasting-deep: #c44e5a;
  --eating: #314acb;
  --eating-soft: #5b6fd6;
  --surface: #f4f7f8;
  --surface-2: #fafbfc;
  --line: rgba(18, 38, 58, 0.12);
  --paper: #ffffff;
  --radius: 18px;
  --max: 1120px;
  --nav-h: 4.5rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 0.75rem);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface-2);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--fasting-deep);
  outline-offset: 3px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding: 1rem 0;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-nav__inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.site-nav__links {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__links a:hover {
  color: var(--eating);
}

.site-nav__cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: var(--eating);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav__cta:hover {
  background: var(--eating-soft);
}

@media (max-width: 860px) {
  .site-nav__links {
    display: none;
  }
}

/* Hero — one composition */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 7rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 72% 18%, rgba(225, 104, 114, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 12% 78%, rgba(49, 74, 203, 0.14), transparent 50%),
    linear-gradient(165deg, #f7f1f2 0%, #fafbfc 42%, #eef1f8 100%);
}

.hero__atmosphere {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 62% 38%, rgba(225, 104, 114, 0.14), transparent 42%),
    radial-gradient(circle at 28% 72%, rgba(49, 74, 203, 0.1), transparent 38%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

.hero__grid {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ring-stage {
    min-height: 0;
    margin-top: 0.75rem;
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  max-width: 18ch;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .hero__headline {
    margin-inline: auto;
  }
}

.hero__support {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 34ch;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hero__support {
    margin-inline: auto;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__actions {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--eating);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--eating-soft);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1.5px solid rgba(18, 38, 58, 0.2);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(18, 38, 58, 0.32);
}

.app-store-badge img {
  height: 44px;
  width: auto;
}

/* Ring visual */
.ring-stage {
  display: grid;
  place-items: center;
  min-height: min(52vw, 340px);
  padding: 0.5rem;
}

.ring {
  --size: min(58vw, 340px);
  width: var(--size);
  height: var(--size);
  position: relative;
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__track {
  fill: none;
  stroke: rgba(18, 38, 58, 0.08);
  stroke-width: 14;
}

.ring__progress {
  fill: none;
  stroke: var(--fasting);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 942;
  stroke-dashoffset: 942;
  animation: draw-ring 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes draw-ring {
  to { stroke-dashoffset: 280; }
}

.ring__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.35rem;
}

.ring__state {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fasting);
}

.ring__time {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ring__plan {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 5.5rem 0;
}

.section--ink {
  background: var(--ink);
  color: #e8eef3;
}

.section--ink .muted {
  color: rgba(232, 238, 243, 0.72);
}

.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fasting-deep);
  margin-bottom: 0.75rem;
}

.section--ink .section__eyebrow {
  color: var(--fasting);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
  margin-bottom: 0.85rem;
}

.section__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 2.5rem;
}

.section--ink .section__lead {
  color: rgba(232, 238, 243, 0.7);
}

/* Steps — not cards */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
  counter-reset: step;
}

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

.step {
  position: relative;
  padding-top: 0.5rem;
  border-top: 2px solid var(--line);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--eating);
  margin-bottom: 0.75rem;
}

.step:has(.step__icon)::before {
  display: none;
}

.step__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 0.85rem;
  object-fit: contain;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--muted);
  font-size: 0.98rem;
}

.section--ink .step {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.section--ink .step::before {
  color: var(--fasting);
}

.section--ink .step p {
  color: rgba(232, 238, 243, 0.65);
}

/* Split feature */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

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

.split__panel {
  background:
    linear-gradient(145deg, rgba(225, 104, 114, 0.28), transparent 48%),
    linear-gradient(160deg, #1a2348, #314acb);
  border-radius: 28px;
  min-height: 300px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.split__panel-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 96px;
  height: 96px;
  object-fit: contain;
  opacity: 0.95;
}

.split__panel span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.split__panel strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.split__copy {
  min-width: 0;
}

.split__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 16ch;
}

.split__copy p {
  color: var(--muted);
  margin-bottom: 1.15rem;
  max-width: 38ch;
}

.split__copy ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  color: var(--ink-soft);
}

.split__copy li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.45;
}

.split__copy li::before {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--eating);
}

/* Dark band: light-theme muted/ink colors fail here */
.section--ink .split__copy p {
  color: rgba(232, 238, 243, 0.78);
}

.section--ink .split__copy ul,
.section--ink .split__copy li {
  color: rgba(232, 238, 243, 0.92);
}

/* Download */
/* Feature grid (plans / progress) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2rem;
}

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

.feature {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: start;
  padding-top: 0.25rem;
}

.feature__icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.feature h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.98rem;
}

.section--ink .feature p {
  color: rgba(232, 238, 243, 0.68);
}

.download {
  text-align: center;
  padding: 5.5rem 0 4rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(225, 104, 114, 0.14), transparent 60%),
    var(--surface);
}

.download h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.download p {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.download__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.disclaimer {
  margin-top: 2.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 52ch;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 800px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .container {
    width: min(100% - 1.75rem, var(--max));
  }

  .site-nav__inner,
  .hero__grid {
    width: min(100% - 1.75rem, var(--max));
  }
}

.site-footer h3 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.site-footer p,
.site-footer a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.site-footer a:hover {
  color: var(--eating);
}

.site-footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Legal pages */
.legal-page {
  padding: 7.5rem 0 4rem;
}

.legal-page .back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.legal-page .updated {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.legal-page .content {
  max-width: 68ch;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.legal-page ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-page a {
  color: var(--eating);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero__atmosphere,
  .ring__progress,
  .ring,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .ring__progress {
    stroke-dashoffset: 280;
  }
}
