/* ==========================================================================
   allGaia CVI 3.0 — components
   Every rule reads semantic tokens only (see allgaia-tokens.css), so each
   component works on light AND dark surfaces with no extra classes.
   ========================================================================== */

.ag-root{font-family:var(--ag-font);font-size:var(--ag-fs-body);line-height:var(--ag-lh-body);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-kerning:normal}
.ag-root *,.ag-root *::before,.ag-root *::after{box-sizing:border-box}

/* ---------- Type ---------- */
.ag-display,.ag-h1,.ag-h2,.ag-h3,.ag-h4{font-family:var(--ag-font);font-weight:var(--ag-w-regular);color:var(--ag-heading);letter-spacing:var(--ag-track-head);line-height:var(--ag-lh-head);margin:0;text-wrap:balance}
.ag-display{font-size:var(--ag-fs-display);letter-spacing:var(--ag-track-display);line-height:1.06}
.ag-h1{font-size:var(--ag-fs-h1)}
.ag-h2{font-size:var(--ag-fs-h2)}
.ag-h3{font-size:var(--ag-fs-h3);line-height:1.15}
.ag-h4{font-size:20px;font-weight:var(--ag-w-strong);line-height:1.3;letter-spacing:-.01em}
.ag-lead{font-size:var(--ag-fs-lead);line-height:1.45;color:var(--ag-text-2);margin:0;text-wrap:pretty}
.ag-body{font-size:var(--ag-fs-body);line-height:var(--ag-lh-body);color:var(--ag-text-2);margin:0;text-wrap:pretty}
.ag-small{font-size:var(--ag-fs-small);line-height:1.5;color:var(--ag-text-2);margin:0}
.ag-fine{font-size:var(--ag-fs-micro);line-height:1.45;color:var(--ag-muted);margin:0}
.ag-strong{font-weight:var(--ag-w-strong)}
.ag-hl{color:var(--ag-highlight)}          /* the "light teal line" on dark */
.ag-accent{color:var(--ag-accent)}
.ag-eyebrow{display:block;font-size:13px;font-weight:var(--ag-w-strong);letter-spacing:var(--ag-track-eyebrow);text-transform:uppercase;color:var(--ag-accent);margin:0}
.ag-num{font-variant-numeric:tabular-nums lining-nums}
.ag-mono{font-family:var(--ag-font-mono);font-size:12.5px;letter-spacing:.06em;text-transform:uppercase}
.ag-link{color:inherit;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.ag-link:hover{color:var(--ag-accent)}

/* ---------- Buttons & pills ---------- */
.ag-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:inherit;font-size:16px;font-weight:var(--ag-w-regular);letter-spacing:var(--ag-track-caps);text-transform:uppercase;line-height:1.2;padding:14px 24px;border:0;border-radius:var(--ag-r-pill);background:var(--ag-btn-bg);color:var(--ag-btn-fg);text-decoration:none;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s,box-shadow .15s}
.ag-btn:hover{background:var(--ag-btn-hover)}
.ag-btn:focus-visible{outline:2px solid var(--ag-accent);outline-offset:3px}
.ag-btn--ghost{background:transparent;color:var(--ag-ghost);box-shadow:inset 0 0 0 1.2px currentColor}
.ag-btn--ghost:hover{background:var(--ag-ghost);color:var(--ag-bg)}
.ag-btn--square{border-radius:var(--ag-r-btn)}
.ag-btn--sm{font-size:14px;padding:9px 18px}
.ag-btn svg{width:1em;height:1em;flex:none}

/* Badge: the "New evening supplement" capsule. Sentence case, no caps. */
.ag-badge{display:inline-flex;align-items:center;gap:.4em;padding:.32em .9em;border-radius:var(--ag-r-pill);background:var(--ag-badge-bg);color:var(--ag-badge-fg);font-size:15px;font-weight:var(--ag-w-strong);line-height:1.2;letter-spacing:0;white-space:nowrap}
/* Tag: small outline pill used as a card label ("LAB RESULTS") */
.ag-tag{display:inline-flex;align-items:center;padding:8px 16px;border-radius:var(--ag-r-pill);box-shadow:inset 0 0 0 1.2px currentColor;color:var(--ag-text);font-size:13px;letter-spacing:var(--ag-track-caps);text-transform:uppercase;line-height:1;white-space:nowrap}
/* Chip: trust ticks ("✓ Vegan") */
.ag-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}
.ag-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:var(--ag-r-chip);background:var(--ag-chip-bg);color:var(--ag-chip-fg);font-size:14px;line-height:1.2}
.ag-chip svg{width:13px;height:13px;color:var(--ag-accent);flex:none}

/* ---------- Cards ---------- */
/* A card IS a surface: give it .ag-card plus one surface class.
   <article class="ag-card ag-dark"> … </article>  |  <article class="ag-card ag-paper"> … </article> */
.ag-card{position:relative;isolation:isolate;overflow:clip;border-radius:var(--ag-r-md);padding:var(--ag-pad-card) calc(var(--ag-pad-card) - 6px);display:flex;flex-direction:column;gap:16px;background:var(--ag-bg);color:var(--ag-text)}
.ag-card--tight{padding:30px}
.ag-card--outline{box-shadow:inset 0 0 0 1px var(--ag-line)}
.ag-card__top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ag-card__foot{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding-top:24px}
/* Photo card: image fills, shade keeps text readable. Text is always cream on the shade. */
.ag-card--photo{justify-content:flex-end;min-height:420px}
.ag-card--photo > img,.ag-card--photo > video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;filter:saturate(.75)}
.ag-card--photo::after{content:"";position:absolute;inset:0;z-index:-1;background:var(--ag-grad-photo-top),var(--ag-grad-photo-shade);pointer-events:none}
/* text on the left over a bright photo: add a side shade */
.ag-card--side::after{background:linear-gradient(90deg,rgba(8,20,28,.7) 0%,rgba(8,20,28,.3) 45%,rgba(8,20,28,0) 70%),var(--ag-grad-photo-shade)}
.ag-card--veil::after{background:var(--ag-shade-teal)}
.ag-grain::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.5;mix-blend-mode:overlay;background-image:var(--ag-grain);background-size:200px 200px}
.ag-card--photo.ag-grain::before{z-index:-1}

/* ---------- Rows (ingredient table, lab list) ---------- */
.ag-rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--ag-line-strong)}
.ag-row{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.6fr);gap:12px 32px;align-items:baseline;padding:22px 0;border-bottom:1px solid var(--ag-line-strong)}
.ag-row__k{font-weight:var(--ag-w-strong);color:var(--ag-accent);letter-spacing:-.01em}
.ag-row__v{color:var(--ag-text);margin:0}
.ag-rows--single .ag-row{grid-template-columns:1fr}
/* Linked row box (lab reports) */
.ag-item{display:grid;grid-template-columns:auto 1fr auto;gap:20px;align-items:center;padding:20px 22px;background:var(--ag-card);border:1px solid var(--ag-line);border-radius:var(--ag-r-sm);color:var(--ag-text);text-decoration:none;transition:border-color .15s,transform .15s}
.ag-item:hover{border-color:var(--ag-accent);transform:translateX(3px)}
.ag-item__n{font-size:34px;font-weight:var(--ag-w-strong);line-height:1;color:var(--ag-accent);font-variant-numeric:tabular-nums;min-width:46px}

/* ---------- Facts / stats ---------- */
.ag-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,max-content));gap:8px 32px;margin:0;padding-top:18px;border-top:1px solid var(--ag-line)}
.ag-facts dt{font-size:11px;font-weight:var(--ag-w-strong);letter-spacing:.16em;text-transform:uppercase;color:var(--ag-muted)}
.ag-facts dd{margin:4px 0 0;font-weight:var(--ag-w-strong);color:var(--ag-text);font-variant-numeric:tabular-nums}
.ag-stat{font-size:clamp(48px,6vw,96px);line-height:.95;letter-spacing:-.04em;color:var(--ag-heading);font-variant-numeric:tabular-nums}

/* ---------- Steps (numbered circle on a hairline) ---------- */
.ag-step-n{display:flex;align-items:center;gap:14px;font-size:17px;line-height:1;color:var(--ag-heading)}
.ag-step-n::before,.ag-step-n::after{content:"";flex:1;height:1px;background:var(--ag-line-strong)}
.ag-step-n span{display:grid;place-items:center;width:36px;height:36px;border:1px solid currentColor;border-radius:50%;opacity:.8}

/* ---------- Dividers, dots, arrow ---------- */
.ag-hr{border:0;border-top:1px solid var(--ag-line-strong);margin:0}
.ag-dot{display:inline-block;width:.18em;height:.18em;border-radius:50%;background:currentColor;vertical-align:.23em;margin:0 .25em}
.ag-arrow{display:inline-block;width:1em;height:1em;color:var(--ag-accent)}

/* ---------- Quote ---------- */
.ag-quote{margin:0}
.ag-quote p{font-size:clamp(20px,1.6vw,26px);line-height:1.3;letter-spacing:-.02em;color:var(--ag-heading);margin:0}
.ag-quote p::before{content:"“";display:block;font-size:72px;line-height:.8;opacity:.35}
.ag-quote figcaption{margin-top:16px;font-size:15px;color:var(--ag-muted)}

/* ---------- Logo ---------- */
.ag-logo{display:block;height:36px;width:auto;color:var(--ag-logo)}
.ag-logo svg{height:100%;width:auto;display:block}

/* ---------- Layout helpers ---------- */
.ag-stack{display:flex;flex-direction:column}
.ag-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ag-gap)}
.ag-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ag-gap)}
@media (max-width:900px){.ag-card--side::after{background:linear-gradient(180deg,rgba(8,20,28,.55),rgba(8,20,28,.78))}.ag-grid-3,.ag-grid-2{grid-template-columns:1fr;gap:12px}.ag-card{padding:36px 22px 28px}.ag-row{grid-template-columns:1fr;gap:6px}}
