/* ==========================================================================
   FrisKit — getfriskit.com
   --------------------------------------------------------------------------
   The palette is lifted from the app (friskit/lib/core/theme/app_colors.dart)
   and keeps that file's central rule: the UI colour set and the logo colour
   set are SEPARATE and must not be merged.

     - Sage Teal (--primary)   nav, links, accents, "you are here"
     - Violet    (--action)    primary buttons only — "press me"
     - Olive->Lime (--lime)    the logo tile and nothing else. Lime is 1.3:1
                               on white, so it can never be a button fill or
                               carry text; it only ever pairs with --lime-ink.
   ========================================================================== */

:root {
  /* brand — UI */
  --primary: #2a9d8f;
  --primary-dark: #1f7a6f;
  --primary-soft: #e8f5f3;
  --action: #8b23ea;
  --action-grad: linear-gradient(90deg, #a22bf5, #7a18e8);

  /* brand — logo only */
  --lime: #c4f249;
  --olive: #5e7a14;
  --lime-ink: #16220a;

  /* neutrals */
  --bg: #f8faf9;
  --card: #ffffff;
  --border: #e0e0e0;
  --surface: #f0f4f3;
  --ink: #212121;
  --muted: #757575;
  --dim: #9e9e9e;
  --midnight: #1b1f3b;

  /* semantic */
  --success: #4caf50;
  --amber: #ffb300;
  --orange: #ff9800;

  /* shape — matches the app: cards 20, buttons 14, hero 24 */
  --r-card: 20px;
  --r-btn: 14px;
  --r-hero: 24px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.1);

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--primary-dark); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 900; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: 1.18rem; font-weight: 800; }
p  { margin: 0; }

.eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary-dark);
}
.lede { font-size: clamp(1.02rem, 1.7vw, 1.22rem); color: var(--muted); }

/* ---------- buttons ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.95rem 1.6rem; border-radius: var(--r-btn);
  font: inherit; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary {
  background: var(--action-grad); color: #fff;
  box-shadow: 0 8px 18px rgba(139, 35, 234, 0.34);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(139, 35, 234, 0.4); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn--onDark { background: #fff; color: var(--lime-ink); }
.btn--onDark:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- header ------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 249, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand__tile {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--lime), var(--olive));
  display: grid; place-items: center; color: var(--lime-ink); flex: none;
}
.brand__tile svg { width: 22px; height: 22px; }
.brand__name { font-weight: 800; font-size: 1.16rem; letter-spacing: -0.02em; }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 600;
}
.nav a:hover { color: var(--primary-dark); }
.site-header .btn { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
@media (max-width: 860px) { .nav { display: none; } .site-header .btn--ghost { display: none; } }
@media (max-width: 860px) { .site-header .wrap > .btn { margin-left: auto; } }

/* ---------- sections ---------------------------------------------------- */

section { padding: clamp(64px, 9vw, 116px) 0; }
.section-head { max-width: 660px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .eyebrow { margin-bottom: 0.8rem; display: block; }
.section-head p { margin-top: 1rem; }

/* ---------- hero -------------------------------------------------------- */

.hero { padding-top: clamp(48px, 7vw, 84px); padding-bottom: 0; overflow: hidden; }
.hero .wrap {
  display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: 1.05fr 0.95fr; align-items: center;
}
@media (max-width: 940px) { .hero .wrap { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lede { max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.hero__note { margin-top: 1.1rem; font-size: 0.84rem; color: var(--dim); }

.stores { display: flex; gap: 0.7rem; margin-top: 1.8rem; flex-wrap: wrap; }
.store {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem; border-radius: 12px;
  border: 1.5px dashed var(--border); background: var(--surface);
  color: var(--dim); cursor: default;
}
.store svg { width: 20px; height: 20px; flex: none; }
.store b { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.store span { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- phone frame ------------------------------------------------- */

.phone {
  position: relative; width: 100%; max-width: 300px; margin: 0 auto;
  border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #2c2c34, #101014);
  box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(255, 255, 255, 0.09) inset;
}
.phone::after {                                   /* speaker notch */
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 20px; border-radius: 12px; background: #101014; z-index: 2;
}
.phone img {
  /* `height: auto` is load-bearing. The <img> carries width/height attributes
     (they reserve the right box and stop layout shift), and without this the
     height attribute wins as a used value — every screenshot renders at its
     intrinsic 1688px and the phones become 1.7m-tall towers. */
  width: 100%; height: auto; aspect-ratio: 780 / 1688;
  border-radius: 30px; display: block; background: var(--bg);
}

.hero__art { position: relative; display: grid; place-items: center; padding-bottom: 40px; }
.hero__art::before {                              /* soft teal pool behind */
  content: ''; position: absolute; inset: -8% -14% 6%;
  background: radial-gradient(60% 55% at 50% 40%, rgba(42, 157, 143, 0.2), transparent 70%);
  z-index: -1;
}
.hero__art .phone:nth-child(2) {
  position: absolute; right: -4%; bottom: 0; width: 46%; max-width: 168px;
  border-radius: 26px; padding: 6px; z-index: 3;
}
.hero__art .phone:nth-child(2)::after { display: none; }
.hero__art .phone:nth-child(2) img { border-radius: 21px; }
@media (max-width: 560px) { .hero__art .phone:nth-child(2) { display: none; } }

/* ---------- the loop ---------------------------------------------------- */

.loop { background: var(--card); border-block: 1px solid var(--border); }
.loop__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
}
@media (max-width: 880px) { .loop__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .loop__grid { grid-template-columns: 1fr; } }

.loop__card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 1.5rem 1.4rem;
}
.loop__card h3 { margin-bottom: 0.5rem; }
.loop__card p { color: var(--muted); font-size: 0.94rem; }
.loop__num {
  counter-increment: step; width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
.loop__num::before { content: counter(step); }

/* ---------- features ---------------------------------------------------- */

.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px); align-items: center;
  padding: clamp(40px, 6vw, 68px) 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature:nth-child(even) .feature__art { order: -1; }
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature:nth-child(even) .feature__art { order: 0; }
}

.feature h3 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); font-weight: 800; margin: 0.7rem 0 0.9rem; }
.feature p { color: var(--muted); }
.feature__art { display: grid; place-items: center; }

.ticks { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.ticks li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; }
.ticks li::before {
  content: ''; flex: none; margin-top: 0.42em;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a6f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ---------- meal-plan explainer ---------------------------------------- */

.plan { background: var(--card); border-block: 1px solid var(--border); }
.plan__lead {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px);
  align-items: end; margin-bottom: clamp(34px, 5vw, 52px);
}
@media (max-width: 880px) { .plan__lead { grid-template-columns: 1fr; align-items: start; } }

.ledger {
  background: var(--midnight); color: #fff; border-radius: var(--r-hero);
  padding: clamp(24px, 3.6vw, 34px);
}
.ledger__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.62rem 0; font-size: 0.95rem; }
.ledger__row + .ledger__row { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.ledger__row span { color: rgba(255, 255, 255, 0.66); }
.ledger__row b { font-variant-numeric: tabular-nums; }
.ledger__row--total b { color: var(--lime); font-size: 1.06rem; }
.ledger__foot { margin-top: 1.1rem; font-size: 0.87rem; color: rgba(255, 255, 255, 0.6); }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 780px) { .rules { grid-template-columns: 1fr; } }
.rules > div {
  border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 1.4rem; background: var(--bg);
}
.rules h4 { margin: 0 0 0.45rem; font-size: 1.02rem; font-weight: 800; }
.rules p { color: var(--muted); font-size: 0.93rem; }

/* ---------- pricing ----------------------------------------------------- */

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: stretch; }
@media (max-width: 1000px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .tiers { grid-template-columns: 1fr; } }

.tier {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 1.7rem 1.5rem;
}
.tier--hero { border-color: var(--action); box-shadow: 0 10px 30px rgba(139, 35, 234, 0.12); }
.tier__tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--action); background: #f3e8ff;
  padding: 0.28rem 0.6rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.tier h3 { margin-bottom: 0.35rem; }
.tier__price { font-size: 1.85rem; font-weight: 900; letter-spacing: -0.03em; margin: 0.7rem 0 0.15rem; }
.tier__price small { font-size: 0.85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tier__note { font-size: 0.86rem; color: var(--muted); }
.tier .ticks { margin-top: 1.2rem; margin-bottom: 1.5rem; }
.tier .ticks li { font-size: 0.9rem; }
.tier .btn { margin-top: auto; width: 100%; }

.pricing__foot { margin-top: 1.6rem; font-size: 0.86rem; color: var(--dim); }

/* ---------- faq --------------------------------------------------------- */

.faq { max-width: 780px; }
.faq details {
  border-bottom: 1px solid var(--border); padding: 1.15rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.02rem; list-style: none;
  display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--muted); flex: none; line-height: 1;
}
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); margin-top: 0.75rem; font-size: 0.96rem; }

/* ---------- final cta --------------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, #2b3d10, var(--lime-ink));
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.76); max-width: 40rem; margin: 1rem auto 0; }
.cta-band .btn { margin-top: 2rem; }
.cta-band .hero__note { color: rgba(255, 255, 255, 0.5); }

/* ---------- footer ------------------------------------------------------ */

.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: clamp(48px, 6vw, 72px) 0 2rem; }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; gap: 2rem; } }
.footer__blurb { color: var(--muted); font-size: 0.93rem; margin-top: 0.9rem; max-width: 24rem; }
.site-footer h4 {
  margin: 0 0 0.9rem; font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--dim);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--primary-dark); }

.socials { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.socials a {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--muted); background: var(--bg);
}
.socials a:hover { color: var(--primary-dark); border-color: var(--primary); }
.socials svg { width: 17px; height: 17px; }

.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.6rem; font-size: 0.85rem; color: var(--dim);
}

/* ---------- reveal ------------------------------------------------------ */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- legal pages ------------------------------------------------- */

.doc { max-width: 760px; padding-top: clamp(48px, 6vw, 80px); }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 0.6rem; }
.doc .updated { color: var(--dim); font-size: 0.88rem; margin-bottom: 2.5rem; }
.doc h2 { font-size: 1.28rem; font-weight: 800; margin: 2.4rem 0 0.7rem; }
.doc p, .doc li { color: #3f3f3f; font-size: 0.97rem; }
.doc p + p { margin-top: 0.9rem; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; margin: 0.9rem 0 0; }
.doc .callout {
  background: #fff4e6; border: 1px solid #f5d9b0; color: #7c3a06;
  border-radius: var(--r-card); padding: 1.1rem 1.3rem; margin: 1.6rem 0; font-size: 0.93rem;
}

/* ---------- 404 --------------------------------------------------------- */

.oops { min-height: 62vh; display: grid; place-content: center; text-align: center; gap: 1rem; }
