/*
 * FastMacros.net — brand site stylesheet.
 * Mirrors the app's PAPER skin (warm parchment + paper-cutout cards).
 * Token values copied from src/theme/palette.ts (paperColors) and
 * src/theme/tokens.ts (radius / paperShadow / cardDepth).
 * Plain CSS, no build step — every page works from file://.
 */

/* ----------------------------- reset ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body,
h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}

/* --------------------------- tokens ------------------------------ */
:root {
  /* neutral paper surfaces */
  --bg: #ede3ce; /* warm parchment desk */
  --card: #ffffff; /* white paper card */
  --ink: #1f1b14; /* near-black warm ink */
  --sub: #403b33; /* captions / secondary text */
  --ink-soft: #2a2620;
  --line: rgba(31, 27, 20, 0.12); /* soft pencil outline */
  --line-strong: rgba(31, 27, 20, 0.2);
  --feature: #2b251c; /* dark warm "feature" surface */
  --on-ink: #fbf5e9; /* text on the dark feature surface */
  --on-ink-dim: #d8cdb8;

  /* opaque warm-cream section fills (grain never bleeds through) */
  --fill-faint: #e9dec6;
  --fill-soft: #e2d5ba;
  --fill-med: #d9c9a7;

  /* true brand tri-bar hues (the logo mark, on the dark square) */
  --brand-protein: #ff4d2e;
  --brand-carbs: #ffb300;
  --brand-fat: #7b5cfa;
  --brand-ink: #141418;
  /* accessible brand orange-red for accent TEXT (wordmark, hero) —
     a touch deeper than #ff4d2e so it clears WCAG AA on the light parchment
     (the pure brand red is reserved for the logo mark on its dark square). */
  --brand-accent-text: #c7481f;

  /* softer paper macro accents (bars, chips) */
  --protein: #e0603e;
  --carbs: #e0a33b;
  --fat: #8a72d6;
  --good: #4e9e68;
  --over: #c45a38;
  --water: #5b9fd4;
  --success: #13a05a;

  /* radii (src/theme/tokens.ts radius) */
  --r-card: 24px;
  --r-inner: 16px;
  --r-btn: 16px;
  --r-control: 12px;
  --r-pill: 999px;

  /* warm paper-cutout shadow (tokens.ts paperShadow) */
  --shadow: 0 8px 16px rgba(90, 74, 51, 0.18);
  --shadow-lift: 0 14px 30px rgba(90, 74, 51, 0.22);

  --maxw: 1120px;
  /* the app's paper skin renders in Klee One (handwritten) — headings mirror
     it; body/legal text stays Inter for long-form readability */
  --font-display: "Klee One", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* --------------------------- base -------------------------------- */
body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* the signature: subtly tiled paper grain over the parchment desk */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/paper-grain.png");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
.store-badge:focus-visible {
  outline: 3px solid var(--brand-fat);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --------------------------- type -------------------------------- */
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600; /* Klee One tops out at 600 — its stroke carries the weight */
  letter-spacing: -0.01em;
  line-height: 1.14;
}
h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.3rem);
}
h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
p {
  color: var(--ink-soft);
}
.kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sub);
}
.lead {
  font-size: 1.08rem;
  color: var(--sub);
}
.muted {
  color: var(--sub);
}

/* --------------------------- logo -------------------------------- */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.lockup .mark {
  flex: 0 0 auto;
}
.wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
}
.wordmark .accent {
  color: var(--brand-accent-text);
}

/* --------------------------- header ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 234, 216, 0.92);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sub);
}
.nav-links a:hover {
  color: var(--ink);
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--fill-soft);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}
.header-cta .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* --------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
}

/* store badges — clearly-marked pre-launch PLACEHOLDERS (no real links yet) */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.store-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 18px;
  border-radius: var(--r-btn);
  border: 1.5px dashed var(--line-strong);
  background: var(--fill-faint);
  color: var(--ink);
  min-width: 172px;
}
.store-badge .store-soon {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
}
.store-badge .store-name {
  font-size: 1.02rem;
  font-weight: 800;
}

/* --------------------------- cards ------------------------------- */
/* the app's cardDepth on paper: 1.5px pencil hairline + warm cutout shadow */
.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ---------------------------- hero ------------------------------- */
.hero {
  padding-block: clamp(36px, 5vw, 72px);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.6rem + 3.2vw, 3.9rem);
  margin-top: 14px;
}
.hero h1 .accent {
  color: var(--brand-accent-text);
}
.hero .lead {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 1.15rem;
}
.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: radial-gradient(
    120% 90% at 50% 15%,
    #f6efdd 0%,
    var(--fill-faint) 62%,
    #e4d7bc 100%
  );
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lift);
  padding: 26px 26px 0;
  overflow: hidden;
}
.hero-stage img {
  width: auto;
  height: clamp(320px, 42vw, 460px);
}
.coming-soon-line {
  margin-top: 22px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.coming-soon-line .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}

/* decorative "remaining macros" chip row (illustrative) */
.macro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}
.macro-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: var(--shadow);
}
.macro-chip .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.macro-chip .val {
  color: var(--sub);
  font-weight: 600;
}

/* --------------------------- sections ---------------------------- */
section {
  padding-block: clamp(40px, 6vw, 76px);
}
.section-head {
  max-width: 52ch;
  margin-bottom: 34px;
}
.section-head h2 {
  margin-top: 10px;
}
.section-head p {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--sub);
}

/* the core loop (how it works) */
.loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.loop .step {
  position: relative;
  padding: 22px;
  background: var(--fill-faint);
  border: 1.5px solid var(--line);
  border-radius: var(--r-inner);
}
.loop .step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.loop .step h3 {
  font-size: 1.02rem;
}
.loop .step p {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--sub);
}

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card h3 {
  margin-top: 16px;
}
.feature-card p {
  margin-top: 8px;
  font-size: 0.96rem;
  color: var(--sub);
}
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--fill-soft);
  border: 1px solid var(--line);
}
.icon-tile svg {
  width: 24px;
  height: 24px;
}
/* icon-tile color modifiers (avoids inline styles) */
.ic-protein {
  color: var(--protein);
}
.ic-carbs {
  color: var(--carbs);
}
.ic-fat {
  color: var(--fat);
}
.ic-good {
  color: var(--good);
}
.ic-water {
  color: var(--water);
}
.ic-over {
  color: var(--over);
}
.ic-ink {
  color: var(--feature);
}
.ic-brandfat {
  color: var(--brand-fat);
}
/* macro swatch color modifiers */
.sw-protein {
  background: var(--protein);
}
.sw-carbs {
  background: var(--carbs);
}
.sw-fat {
  background: var(--fat);
}
.sw-cal {
  background: var(--good);
}

/* meet Mac */
.meet-mac {
  background: var(--feature);
  border-radius: var(--r-card);
  border: 1.5px solid rgba(236, 227, 207, 0.12);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.meet-mac .inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
}
.meet-mac .kicker {
  color: var(--on-ink-dim);
}
.meet-mac h2 {
  color: var(--on-ink);
  margin-top: 10px;
}
.meet-mac p {
  color: var(--on-ink-dim);
  margin-top: 14px;
}
.mac-lineup {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(
    110% 80% at 50% 12%,
    rgba(251, 245, 233, 0.08),
    rgba(251, 245, 233, 0) 70%
  );
  border-radius: var(--r-inner);
  padding-top: 12px;
}
.mac-lineup img {
  height: clamp(210px, 26vw, 320px);
  width: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}
.mac-lineup img.small {
  height: clamp(170px, 21vw, 260px);
}

/* honest-app rules */
.rules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.rule {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--fill-faint);
  border: 1.5px solid var(--line);
  border-radius: var(--r-inner);
}
.rule .check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rule h3 {
  font-size: 1rem;
}
.rule p {
  margin-top: 5px;
  font-size: 0.93rem;
  color: var(--sub);
}

/* closing CTA band */
.cta-band {
  text-align: center;
}
.cta-band .card {
  padding: clamp(30px, 5vw, 56px);
}
.cta-band h2 {
  max-width: 22ch;
  margin-inline: auto;
}
.cta-band p {
  max-width: 46ch;
  margin: 14px auto 0;
  color: var(--sub);
}
.cta-band .store-badges {
  justify-content: center;
}

/* --------------------------- footer ------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(30px, 5vw, 60px);
  padding-block: 40px 48px;
}
.site-footer .top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--sub);
}
.footer-links a:hover {
  color: var(--ink);
}
.attribution {
  margin-top: 26px;
  font-size: 0.82rem;
  color: var(--sub);
  line-height: 1.7;
}
.attribution a {
  color: var(--sub);
}
.footer-contact {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--sub);
}
.footer-contact a {
  color: var(--ink);
  font-weight: 700;
}

/* --------------------------- legal ------------------------------- */
.legal {
  padding-block: clamp(28px, 4vw, 48px);
}
.legal .container {
  max-width: 820px;
}
.draft-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-inner);
  background: #f6e6dc; /* paper overBg */
  border: 1.5px solid #e6cdbc;
  color: #7a3f28;
  font-weight: 600;
  margin-bottom: 30px;
}
.draft-banner strong {
  color: #6a2f1c;
}
.legal h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem);
}
.legal .updated {
  margin-top: 8px;
  color: var(--sub);
  font-weight: 600;
  font-size: 0.9rem;
}
.legal h2 {
  font-size: 1.4rem;
  margin-top: 40px;
}
.legal h3 {
  font-size: 1.08rem;
  margin-top: 24px;
}
.legal p,
.legal li {
  color: var(--ink-soft);
  margin-top: 12px;
  font-size: 1rem;
}
.legal ul.bullets {
  list-style: disc;
  padding-left: 22px;
}
.legal ul.bullets li {
  margin-top: 8px;
}
.legal .toc {
  background: var(--fill-faint);
  border: 1.5px solid var(--line);
  border-radius: var(--r-inner);
  padding: 20px 22px;
  margin-top: 26px;
}
.legal .toc h2 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.legal .toc ol {
  list-style: decimal;
  padding-left: 20px;
}
.legal .toc li {
  margin-top: 6px;
  font-size: 0.95rem;
}
.legal .toc a {
  color: var(--ink-soft);
  text-decoration: none;
}
.legal .toc a:hover {
  text-decoration: underline;
}
.legal .callout {
  background: var(--fill-faint);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--over);
  border-radius: var(--r-inner);
  padding: 18px 20px;
  margin-top: 20px;
}
.legal .callout p {
  margin-top: 0;
}
.mailbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 13px 20px;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--on-ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.back-home {
  display: inline-block;
  margin-top: 40px;
  font-weight: 700;
  color: var(--sub);
  text-decoration: none;
}
.back-home:hover {
  color: var(--ink);
}

/* ------------------------- responsive ---------------------------- */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-stage {
    order: -1;
    padding-bottom: 0;
  }
  .loop {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .meet-mac .inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mac-lineup {
    order: -1;
  }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .feature-grid,
  .rules {
    grid-template-columns: 1fr;
  }
  .loop {
    grid-template-columns: 1fr;
  }
  .hero .lead {
    max-width: none;
  }
}

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