/* macrigon.com home (EN /, FR /fr/). Builds on site.css: tokens, Inter.
   Language of the app: warm paper page, ink, teal for actions, fine rules,
   index cards with a red margin and a serif hand, meal tints. */

@font-face { font-family: "Noto Serif"; font-weight: 700; font-display: swap; src: url(/assets/fonts/NotoSerif-Bold.woff) format("woff"); }

:root {
  --paper: #fffdf7;
  --paper-rule: rgba(80, 110, 160, 0.13);
  --paper-margin: #e3a5a5;
  --paper-ink: #2a241d;
  --frame: #16191a;
  --frame-ring: rgba(255, 255, 255, 0.06);
  --lift: 0 1px 2px rgba(17, 20, 18, 0.06), 0 14px 32px -18px rgba(17, 20, 18, 0.28);
  --breakfast: #b8642b; --breakfast-bg: #fbebdd;
  --lunch: #6b7f2e;     --lunch-bg: #eef1dc;
  --dinner: #5559a6;    --dinner-bg: #e8e8f6;
  --snacks: #8e4f86;    --snacks-bg: #f3e6f1;
}

.page { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
main { overflow-x: clip; }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--surface); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 16px; }

/* ── Header ───────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-head.scrolled { border-bottom-color: var(--hairline); }
.site-head .page { display: flex; align-items: center; gap: 28px; height: 72px; }
.site-head .logo { margin-right: auto; line-height: 0; }
.site-head .logo img { height: 34px; width: auto; }
.site-head nav { display: flex; gap: 26px; font-size: 15px; }
.site-head nav a { color: var(--ink-2); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); }
.lang { display: flex; border: 1px solid var(--hairline); border-radius: 999px; padding: 3px; font-size: 13px; font-weight: 600; }
.lang a, .lang span { padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--ink-3); }
.lang [aria-current] { background: var(--ink); color: var(--page); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; gap: 6px; }
.link-arrow::after { content: "↓"; transition: transform 0.15s; }
.link-arrow:hover::after { transform: translateY(2px); }

/* ── Hero ─────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding: 48px 0 56px; }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 78px);
  line-height: 1.02; letter-spacing: -0.04em; margin: 0 0 24px; color: var(--ink);
}
.hero h1 span { display: block; color: var(--accent); }
.hero .lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 27em; margin: 0 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero .avail { margin: 22px 0 0; font-size: 14px; color: var(--ink-3); }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.phone {
  position: relative; width: 320px; padding: 10px; border-radius: 48px;
  background: var(--frame);
  box-shadow: 0 0 0 1px var(--frame-ring) inset, 0 0 0 1px var(--frame-ring), 0 36px 70px -28px rgba(17, 20, 18, 0.45);
}
.phone .screen { position: relative; overflow: hidden; border-radius: 38px; padding-top: 28px; background: #f5f4f0; color: #111412; }
.phone .screen::before { content: "9:41"; position: absolute; top: 8px; left: 26px; font-size: 12px; font-weight: 600; line-height: 1; }
.phone .screen::after {
  content: ""; position: absolute; top: 8px; right: 24px; width: 40px; height: 12px; background: currentColor; opacity: 0.85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 11'%3E%3Cpath d='M1 10h2V7H1zM5 10h2V5H5zM9 10h2V3H9zM13 10h2V1h-2z'/%3E%3Crect x='21' y='1.5' width='14' height='8' rx='2' fill='none' stroke='black' stroke-width='1.2'/%3E%3Crect x='22.6' y='3.1' width='9' height='4.8' rx='1'/%3E%3Cpath d='M36 4v3' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 11'%3E%3Cpath d='M1 10h2V7H1zM5 10h2V5H5zM9 10h2V3H9zM13 10h2V1h-2z'/%3E%3Crect x='21' y='1.5' width='14' height='8' rx='2' fill='none' stroke='black' stroke-width='1.2'/%3E%3Crect x='22.6' y='3.1' width='9' height='4.8' rx='1'/%3E%3Cpath d='M36 4v3' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 2; }

/* ── Paper: the app's index card (ruled, red margin, serif) ─ */
.paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 27px, var(--paper-margin) 27px, var(--paper-margin) 28.5px, transparent 28.5px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-rule) 31px 32px);
  background-position: 0 0, 0 22px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 30px -18px rgba(0, 0, 0, 0.3);
}
.stamp {
  display: inline-grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  border: 2.5px solid var(--accent); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5.5px var(--accent);
  color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  text-align: center; line-height: 1.25; transform: rotate(-12deg);
}

/* ── Benefits strip ───────────────────────────────────── */
.benefits {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin: 0; padding: 18px 0;
  list-style: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  font-weight: 600; color: var(--ink); font-size: 16px;
}
.benefits li { margin: 0; color: var(--ink); padding: 0 22px; position: relative; }
.benefits li + li::before { content: ""; position: absolute; left: -3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }

/* ── Stories ──────────────────────────────────────────── */
.story { padding: 104px 0 0; }
.story-head { max-width: 640px; margin-bottom: 44px; }
.story h2 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 16px; color: var(--ink); }
.story-head p { font-size: 19px; line-height: 1.55; margin: 0; }
.shot { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: var(--lift); }

/* 1. Log it: three steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.steps .label { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); font-size: 17px; }
.steps .label::before {
  counter-increment: step; content: counter(step);
  font-family: "Noto Serif", Georgia, serif; font-size: 18px; color: var(--accent);
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid currentColor;
}
.steps .stack { display: flex; flex-direction: column; gap: 10px; }
.aside {
  display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 36px; align-items: center;
  margin-top: 40px; padding-top: 40px; border-top: 1px dashed var(--hairline);
}
.aside p { font-size: 17px; margin: 0; max-width: 30em; }
.aside strong { display: block; font-size: 19px; margin-bottom: 6px; }

/* 2. Your day */
.day { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.collage { display: flex; flex-direction: column; }
.collage .front { width: 88%; position: relative; z-index: 2; }
.collage .back { width: 68%; align-self: flex-end; margin-top: 14px; }
.day-copy p { font-size: 18px; }
.meals { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; list-style: none; }
.meals li { margin: 0; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.meals .b { color: var(--breakfast); background: var(--breakfast-bg); }
.meals .l { color: var(--lunch); background: var(--lunch-bg); }
.meals .d { color: var(--dinner); background: var(--dinner-bg); }
.meals .s { color: var(--snacks); background: var(--snacks-bg); }
.key { border-top: 1px solid var(--hairline); font-size: 15px; }
.key summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); list-style: none; }
.key summary::-webkit-details-marker { display: none; }
.key summary::after { content: "+"; color: var(--accent); font-size: 18px; }
.key[open] summary::after { content: "−"; }
.key > div { display: grid; grid-template-columns: 30px 1fr; gap: 8px 10px; padding-bottom: 6px; }
.key b { font-size: 19px; color: var(--ink); text-align: center; line-height: 1.35; }
.key span { color: var(--ink-2); }

/* Carousel controls: only where the row swipes (phones). */
.carousel-nav { display: none; }
.carousel-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer;
}
.carousel-nav button:disabled { opacity: 0.35; cursor: default; }
.carousel-nav .pos { min-width: 64px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 3. Pattern */
.pattern .story-head { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; }
.pattern .story-head h2 { margin: 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.cards > img:last-child { margin-top: 56px; }

/* ── Privacy card ─────────────────────────────────────── */
.privacy { padding: 112px 0 0; }
.privacy .paper { position: relative; max-width: 860px; margin: 0 auto; padding: 46px 56px 44px 68px; color: var(--paper-ink); }
.privacy h2 { font-family: "Noto Serif", Georgia, serif; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 26px; color: var(--paper-ink); max-width: 13em; }
.privacy ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.privacy li { margin: 0; color: var(--paper-ink); font-size: 17px; line-height: 1.55; max-width: 36em; }
.privacy li b { color: var(--paper-ink); }
.privacy a { font-weight: 600; }
.privacy .stamp { position: absolute; right: 44px; top: 40px; }

/* ── Sources strip ────────────────────────────────────── */
.sources { margin: 72px auto 0; max-width: 860px; text-align: center; font-size: 15px; color: var(--ink-3); line-height: 1.7; }
.sources b { color: var(--ink-2); font-weight: 600; }

/* ── Get Macrigon (short; details on /early-access/) ─── */
.get {
  margin: 88px 0 0; padding: 40px 48px; border-radius: 28px; background: var(--surface); box-shadow: var(--lift);
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
}
.get img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 6px 16px -8px rgba(13, 110, 95, 0.6); }
.get h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 8px; color: var(--ink); }
.get p { margin: 0; font-size: 17px; }

/* ── Early access page ────────────────────────────────── */
.ea { max-width: 860px; padding-bottom: 72px; }
.back { display: inline-flex; align-items: center; min-height: 48px; margin-top: 16px; font-weight: 600; text-decoration: none; }
.ea-hero { padding: 24px 0 56px; border-bottom: 1px solid var(--hairline); }
.ea-hero img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 24px; box-shadow: 0 8px 20px -10px rgba(13, 110, 95, 0.6); }
.ea-hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 18px; color: var(--ink); }
.ea-hero .lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; max-width: 32em; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.cta .note { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.copy code { font: inherit; font-weight: 600; color: var(--ink); }
.copy button { font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--hairline); border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.copy button:hover { border-color: var(--accent); }
.ea h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; margin: 56px 0 22px; color: var(--ink); }
.ea-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ea-steps li { counter-increment: s; margin: 0; padding: 22px; border-radius: 20px; background: var(--surface); box-shadow: var(--lift); display: flex; flex-direction: column; gap: 8px; }
.ea-steps li::before { content: counter(s); font-family: "Noto Serif", Georgia, serif; font-weight: 700; font-size: 22px; color: var(--accent); }
.ea-steps b { color: var(--ink); font-size: 17px; }
.ea-steps span { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.needs { margin-top: 48px; padding: 30px 40px 26px 60px; color: var(--paper-ink); }
.needs h2 { font-family: "Noto Serif", Georgia, serif; margin: 0 0 14px; color: var(--paper-ink); font-size: 26px; letter-spacing: 0; }
.needs ul { margin: 0; padding-left: 20px; }
.needs li { color: var(--paper-ink); margin: 0 0 6px; line-height: 1.9; }
.ea-note { margin-top: 28px; font-size: 14px; color: var(--ink-3); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; padding: 96px 0 72px; }
.faq h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  min-height: 60px; font-weight: 600; font-size: 17px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; max-width: 40em; }

/* ── Footer ───────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--hairline); padding: 36px 0 52px; font-size: 14px; }
.site-foot .page { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; align-items: flex-start; }
.site-foot img { height: 28px; width: auto; display: block; margin-bottom: 12px; }
.site-foot p { margin: 0 0 4px; color: var(--ink-3); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ── Motion (content shows without JS) ────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .link-arrow::after, .btn { transition: none; }
}

/* ── Narrow screens ───────────────────────────────────── */
@media (max-width: 960px) {
  .site-head nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 8px; padding: 28px 0 40px; }
  .hero-visual { padding: 0; }
  .phone { width: 280px; border-radius: 42px; padding: 9px; }
  .phone .screen { border-radius: 33px; padding-top: 24px; }
  .steps { grid-template-columns: 1fr; gap: 28px; max-width: 460px; }
  .aside { grid-template-columns: 1fr; gap: 18px; }
  .day { grid-template-columns: 1fr; gap: 32px; }
  .pattern .story-head { grid-template-columns: 1fr; gap: 16px; }
  .get { grid-template-columns: auto 1fr; padding: 32px 28px; }
  .get .btn { grid-column: 1 / -1; justify-self: start; }
  .ea-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page { padding: 0 18px; }
  .site-head .page { gap: 12px; height: 64px; }
  .site-head .logo img { height: 30px; }
  .site-head .btn-small { display: none; }
  .hero { padding: 18px 0 28px; gap: 0; }
  .hero h1 { margin-bottom: 14px; }
  .hero .lead { margin-bottom: 20px; font-size: 17px; }
  .hero .actions { gap: 4px 20px; }
  .hero .avail { margin-top: 6px; }
  .hero-visual { margin-top: 18px; }
  .hero .actions .btn { width: 100%; }
  .phone { width: 248px; border-radius: 38px; padding: 8px; }
  .phone .screen { border-radius: 30px; padding-top: 22px; }
  .phone .screen::before { top: 6px; left: 20px; font-size: 10px; }
  .phone .screen::after { top: 6px; right: 18px; width: 34px; height: 10px; }
  .benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; font-size: 15px; }
  .benefits li, .benefits li + li { padding: 0 0 0 16px; }
  .benefits li::before, .benefits li + li::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
  .story { padding-top: 72px; }
  .story-head { margin-bottom: 28px; }
  .story-head p { font-size: 17px; }
  .shot { border-radius: 16px; }
  /* Steps and charts: a row to swipe, instead of a tall stack. */
  .steps, .cards {
    display: grid; grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; max-width: none;
    margin: 0 -18px; padding: 4px 18px 16px; scroll-padding: 18px; scrollbar-width: none;
  }
  .steps::-webkit-scrollbar, .cards::-webkit-scrollbar { display: none; }
  .steps > li, .cards > img { scroll-snap-align: start; }
  .cards > img:last-child { margin-top: 0; }
  .carousel-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; }
  .aside { margin-top: 20px; padding-top: 24px; }
  .privacy { padding-top: 72px; }
  .privacy .paper { padding: 34px 22px 30px 46px; background-image: linear-gradient(90deg, transparent 21px, var(--paper-margin) 21px, var(--paper-margin) 22.5px, transparent 22.5px), repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-rule) 31px 32px); }
  .privacy .stamp { width: 72px; height: 72px; font-size: 8.5px; right: 12px; top: -26px; }
  .privacy h2 { padding-right: 56px; }
  .collage .front { width: 100%; }
  .collage .back { width: 84%; margin-top: 12px; }
  .faq { padding-top: 72px; }
  .get { margin-top: 64px; grid-template-columns: 1fr; gap: 18px; border-radius: 22px; }
  .get img { width: 64px; height: 64px; border-radius: 16px; }
  .get .btn { width: 100%; }
  .needs { padding: 24px 20px 20px 44px; background-image: linear-gradient(90deg, transparent 21px, var(--paper-margin) 21px, var(--paper-margin) 22.5px, transparent 22.5px), repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-rule) 31px 32px); }
  .ea-hero .btn { width: 100%; }
}
