/* Public Learn pages (glova-lab.com/learn). Built by build-learn-site.mjs.
   Tokens, nav and footer mirror public/landing.html: keep them in step. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

:root {
  --bg: #F6F0E7;
  --band: #EDE5D8;
  --ink: #1D1913;
  --ink-soft: #4A4036;
  --body: #332C24;
  --muted: #8B7B65;
  --hairline: rgba(31, 27, 23, 0.10);
  --accent: #5F6824;
  --accent-deep: #4C531D;
  --bronze: #7D684C;
  --serif: 'Playfair Display', Georgia, serif;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
}

.aura {
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 26%, rgba(120, 134, 66, 0.10), transparent 70%),
    radial-gradient(40% 44% at 82% 70%, rgba(206, 178, 148, 0.10), transparent 72%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
main { position: relative; z-index: 2; }

/* ── Nav (same as landing) ─────────────────────────────────────────── */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 18px;
}
.nav .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav .brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav .brand span { font-family: var(--serif); font-weight: 500; font-size: 16px; letter-spacing: 0.32em; color: #2A2622; }
.nav .links { display: flex; gap: 30px; }
.nav .links a { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; transition: color 160ms ease; }
.nav .links a:hover { color: var(--accent); }
.nav .dl {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--ink); color: #F5EFE6; text-decoration: none;
  padding: 11px 20px; border-radius: 999px;
  transition: background 200ms ease, transform 140ms ease;
}
.nav .dl:hover { background: #38322B; transform: translateY(-1px); }
@media (max-width: 760px) { .nav .links { display: none; } }

/* ── Footer (same as landing) ──────────────────────────────────────── */
footer {
  position: relative; z-index: 2;
  margin-top: 40px;
  padding: 26px 0 30px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--muted);
}
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: #6B6258; text-decoration: none; transition: color 160ms ease; }
footer a:hover { color: var(--accent); }
footer .contact a { display: inline-flex; align-items: center; gap: 6px; }
.copy { color: #B5AEA5; }

/* ── Shared bits ───────────────────────────────────────────────────── */
.eyebrow { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: inherit; text-decoration: none; transition: color 160ms ease; }
.eyebrow a:hover { color: var(--accent); }
.sep { margin: 0 10px; opacity: 0.6; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.meta .sep { margin: 0 6px; }
.lang { color: var(--bronze); text-decoration: none; border-bottom: 1px solid rgba(125, 104, 76, 0.35); transition: color 160ms ease, border-color 160ms ease; }
.lang:hover { color: var(--accent); border-color: var(--accent); }

/* ── Article ───────────────────────────────────────────────────────── */
.article { max-width: 868px; margin: 0 auto; padding: 56px 24px 24px; }
.a-head { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.a-head .eyebrow { margin-bottom: 22px; }
.a-head h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5.4vw, 54px); line-height: 1.1; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 22px;
  text-wrap: balance;
}
.a-head .meta { justify-content: center; }

.a-hero { margin: 0 0 56px; }
.a-hero img { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 18px 50px rgba(74, 63, 46, 0.12); }

.a-body { max-width: 680px; margin: 0 auto; font-size: 18px; line-height: 1.75; color: var(--body); }
.a-body > p { margin-bottom: 1.25em; }
.a-body > p:first-child { font-size: 20px; line-height: 1.7; color: var(--ink); }
.a-body h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(26px, 3.4vw, 32px); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ink); margin: 2.2em 0 0.7em;
  text-wrap: balance;
}
.a-body h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.3; color: var(--ink); margin: 1.8em 0 0.6em; }
.a-body strong { font-weight: 600; color: var(--ink); }
.a-body em { font-style: italic; }
.a-body a { color: var(--bronze); text-underline-offset: 3px; }
.a-body ul { list-style: none; margin: 0 0 1.4em; }
.a-body ul > li { position: relative; padding-left: 26px; margin-bottom: 0.7em; }
.a-body ul > li::before { content: '·'; position: absolute; left: 6px; top: 0; color: var(--bronze); font-weight: 600; }
.a-body ol { margin: 0 0 1.4em 1.3em; }
.a-body ol > li { padding-left: 6px; margin-bottom: 0.7em; }
.a-body blockquote {
  margin: 2.4em 0; padding: 1.6em 8px;
  border-top: 1px solid rgba(139, 115, 85, 0.25);
  border-bottom: 1px solid rgba(139, 115, 85, 0.25);
  text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 3vw, 27px); line-height: 1.4; letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}
.a-body blockquote p { margin: 0; }
.a-body hr { border: 0; height: 1px; width: 96px; margin: 3em auto; background: #D4C5B0; }

/* App components (ArticleFigure, BrickWallDiagram, CycleChart) render with
   Tailwind class names; these are the few they use. */
.a-body figure { margin: 2.6em 0; }
.a-body figure img { width: 100%; height: auto; }
.a-body figcaption {
  text-align: center; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 15px; line-height: 1.5; color: #6E6863; margin-top: 12px; padding: 0 16px;
}
.a-body figure svg { max-width: 440px !important; }
.a-body .flex { display: flex; }
.a-body .items-center { align-items: center; }
.a-body .justify-center { justify-content: center; }
.a-body .gap-5 { gap: 20px; }
.a-body .gap-2 { gap: 8px; }
.a-body .mt-3 { margin-top: 12px; }
.a-body .mb-1 { margin-bottom: 4px; }
.a-body .block { display: block; }
.a-body .text-\[11px\] { font-size: 13px; line-height: 1.4; }
.a-body .font-light { font-weight: 300; }
.a-body .rounded-xl { border-radius: 16px; }

/* Disclaimer */
.a-note {
  max-width: 680px; margin: 48px auto 0; padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px; line-height: 1.6; color: var(--muted); font-style: italic;
}

/* Download block: quiet, one line of intent */
.a-app {
  max-width: 680px; margin: 48px auto 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 22px 24px;
  background: rgba(255, 252, 247, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 20px;
}
.a-app-icon { width: 56px; height: 56px; border-radius: 14px; display: block; }
.a-app .eyebrow { font-size: 10px; margin-bottom: 4px; }
.a-app-heading { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.3; color: var(--ink); }
.a-app-body { font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin-top: 3px; }
.a-app-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--hairline);
  background: #FFFDF9;
  border-radius: 12px; padding: 10px 16px;
  text-decoration: none; color: var(--ink);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: transform 140ms ease, box-shadow 200ms ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(74, 63, 46, 0.10); }
.store-badge svg { width: 17px; height: 17px; }
.store-note { font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) {
  .a-app { grid-template-columns: auto 1fr; }
  .a-app-cta { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; }
}

/* Related */
.a-related { margin: 72px auto 0; }
.a-related-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.all { font-size: 13px; color: var(--bronze); text-decoration: none; }
.all:hover { color: var(--accent); }

/* ── Cards (index + related) ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card-img { display: block; overflow: hidden; border-radius: 16px; background: var(--band); aspect-ratio: 3 / 2; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.6,.2,1); }
.card:hover .card-img img { transform: scale(1.03); }
.card-text { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.card .eyebrow { font-size: 10px; }
.card-title { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); transition: color 160ms ease; }
.card:hover .card-title { color: var(--accent-deep); }
.card .meta { font-size: 12px; }

.card-feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; margin-bottom: 64px; }
.card-feature .card-img { aspect-ratio: 3 / 2; border-radius: 22px; }
.card-feature .card-title { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; }
.card-desc { font-size: 16px; line-height: 1.6; color: var(--ink-soft); max-width: 44ch; }
.card-feature .card-text { gap: 14px; }

/* ── Index ─────────────────────────────────────────────────────────── */
.index { max-width: 1140px; margin: 0 auto; padding: 56px 28px 24px; }
.i-head { max-width: 640px; margin: 0 auto 64px; text-align: center; }
.i-head .eyebrow { margin-bottom: 20px; }
.i-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 6vw, 62px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 20px; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 18px; }
.i-head .meta { justify-content: center; }

@media (max-width: 920px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-feature { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .article { padding: 36px 16px 16px; }
  .index { padding: 36px 16px 16px; }
  .a-head { margin-bottom: 28px; }
  .a-hero { margin: 0 -16px 40px; }
  .a-hero img { border-radius: 0; box-shadow: none; }
  .a-body { font-size: 17px; }
  .a-body > p:first-child { font-size: 18.5px; }
  .grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-related { gap: 16px; }
  .grid-related .card { flex-direction: row; gap: 14px; align-items: center; }
  .grid-related .card-img { width: 104px; flex-shrink: 0; aspect-ratio: 1; border-radius: 12px; }
  .grid-related .card-text { padding-top: 0; gap: 5px; }
  .grid-related .card-title { font-size: 16.5px; }
  .i-head { margin-bottom: 40px; }
  .card-feature { margin-bottom: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-img img, .store-badge, .nav .dl { transition: none; }
}
