/* site-chrome.css — THE ONE shared header + footer for the whole site.
   Edit here and it changes the main site (Nav.astro / Footer.astro inject the
   matching markup in src/shared/) AND every /learn page (they link this file).
   Self-contained: the chrome's design tokens are defined + scoped to .nav/.foot
   so it renders identically on any page regardless of that page's own tokens. */
.nav, .foot {
  --ink:#1B1815; --paper:#F2E8D5; --rule:#d6cdb8;
  --orange:#EE6F2D; --orange-dark:#D85F23; --accent:#EE6F2D; --accent-dark:#D85F23;
  --muted:#6A5A48; --soft:#6A5A48; --muted-2:#a89e88;
  --r-md:8px; --r-pill:999px; --sh-cta:0 10px 24px -8px rgba(238,111,45,0.4);
  --fs-sm:clamp(13.5px,0.8vw + 11.5px,15.5px);
  --fs-xs:clamp(12px,0.7vw + 10px,13.5px);
  --fs-2xs:clamp(10px,0.6vw + 8px,11px);
  --fw-regular:400; --fw-semibold:600;
  --lh-normal:1.55; --tr-wide:0.06em; --tr-wider:0.18em;
}
/* pages that opt out of the nav CTA (e.g. the homepage) add <body class="tsc-no-navcta"> */
.tsc-no-navcta .nav-cta { display:none; }

/* When a full-width promo bar directly follows the nav (the /learn pages), drop the
   nav's underline + bottom gap so it sits flush against the bar instead of floating a
   centered rule above it. Other pages keep the underline that separates nav from content. */
.nav:has(+ .promo) { border-bottom: none; margin-bottom: 0; }

/* /learn pages use a wider 1120px content shell (detectable by their promo bar), so the
   nav + footer widen to match and stay aligned with the content edges. Main site stays 960. */
body:has(.promo) .nav,
body:has(.promo) .foot-inner { max-width: 1120px; }

/* ===== NAV ===== */
.nav {
  display: flex; justify-content: flex-start; align-items: center;
  max-width: 960px;
  margin: 0 auto clamp(28px, 3vw, 48px);
  padding: clamp(20px, 2.5vw, 32px) 28px 18px;
  border-bottom: 1px solid var(--rule);
  gap: 18px;
  flex-wrap: wrap;
}
.lockup {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.lockup:hover { transform: translateX(2px); }
.lockup svg.mark {
  width: 30px; height: 42px;
  color: var(--ink);
  flex-shrink: 0;
}
.wm {
  display: inline-block;
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1;
  letter-spacing: -0.012em;
  font-size: 26px;
  color: var(--ink);
  white-space: nowrap;
}
.wm .the {
  font-style: italic;
  font-size: 14px;
  color: var(--soft);
  margin-right: 2px;
}
.wm .nm { font-weight: 400; font-size: 26px; color: var(--ink); }
/* Wordmark period — bold orange period. Plain inline text, flows after "creators". */
.wm .tsc-dot { color: var(--accent); font-weight: 600; }

.nav-cta {
  font-family: 'Geist', sans-serif;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  background: var(--accent); color: var(--paper);
  padding: 12px 20px; border-radius: var(--r-md);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: var(--sh-cta);
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
@media (max-width: 520px) {
  .nav .wm { font-size: 20px; }
  .nav .wm .nm, .nav .wm .tsc-dot { font-size: 20px; }
  .nav .wm .the { font-size: 12px; }
  .nav .lockup svg.mark { width: 22px; height: 30px; }
}

/* Mobile: logo + Learn + AI Studio stay on the top row (like /studio); the orange
   CTA drops to its own centered row below. The zero-height ::after forces the break. */
@media (max-width: 600px) {
  .nav { row-gap: 0; }
  .nav::after { content: ""; flex: 0 0 100%; height: 0; order: 1; }
  .lockup, .nav-links { order: 0; }
  .nav-cta { order: 2; margin: 16px auto 0; font-size: 15px; padding: 14px 30px; }
}

/* nav links (previously Nav.astro scoped styles) */
.nav-links { margin-left:auto; display:inline-flex; align-items:center; gap:clamp(18px,2.5vw,28px); }
.nav-link { font-family:'Geist',-apple-system,'Segoe UI',system-ui,sans-serif; font-size:15px; font-weight:500; color:var(--ink,#1b1815); text-decoration:none; background:linear-gradient(var(--accent,#ee6f2d),var(--accent,#ee6f2d)) left bottom / 0 1.5px no-repeat; transition:background-size 0.25s ease; padding-bottom:2px; }
.nav-link:hover { background-size:100% 1.5px; }

/* ===== FOOTER ===== */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 32px 32px;
  position: relative;
  overflow: hidden;
}
.foot::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--orange) 50%, transparent 100%);
  opacity: 0.5;
}
.foot::after {
  content: '';
  position: absolute; top: -20%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(238, 111, 45, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.foot-inner { max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.foot-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 52px;
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; } .foot-brand { grid-column: span 2; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; gap: 30px; } .foot-brand { grid-column: span 1; } }
.foot-lockup {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 24px; text-decoration: none;
  transition: transform 0.2s ease;
}
.foot-lockup:hover { transform: translateX(2px); }
.foot-lockup svg.mark {
  width: 26px; height: 36px;
  color: var(--paper);
  flex-shrink: 0;
}
.foot-lockup .wm {
  display: inline-block;
  font-size: 22px;
  color: var(--paper);
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.foot-lockup .wm .the {
  font-style: italic;
  font-size: 12px;
  color: var(--muted-2);
  margin-right: 2px;
}
.foot-lockup .wm .nm { font-size: 22px; color: var(--paper); }
.foot-lockup .wm .tsc-dot { color: var(--accent); font-weight: 600; }
.foot-brand .foot-tag {
  font-family: 'Geist', sans-serif;
  font-size: var(--fs-sm); color: var(--muted-2); line-height: var(--lh-normal);
  margin-bottom: 18px; max-width: 320px;
  font-weight: var(--fw-regular);
}
.foot-brand .foot-built {
  font-family: 'Geist', sans-serif;
  font-size: var(--fs-sm); color: var(--muted-2);
  line-height: var(--lh-normal); max-width: 320px;
  font-weight: var(--fw-regular);
}
.foot-brand .foot-built strong { color: var(--paper); font-weight: var(--fw-semibold); }
.foot-col h4 {
  font-family: 'Geist Mono', monospace;
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--orange);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(245, 237, 224, 0.08);
}
.foot-col a {
  display: block;
  font-family: 'Geist', sans-serif;
  font-size: var(--fs-sm); color: var(--paper);
  text-decoration: none; padding: 6px 0;
  transition: color 0.15s ease, transform 0.15s ease;
  font-weight: var(--fw-regular);
}
.foot-col a:hover { color: var(--orange); transform: translateX(4px); }
.foot-col .foot-note {
  font-family: 'Geist', sans-serif;
  font-size: var(--fs-sm); color: var(--muted-2);
  line-height: var(--lh-normal);
  margin-top: 12px; max-width: 200px;
  font-weight: var(--fw-regular);
  margin-bottom: 0;
}
.foot-rule { height: 1px; background: rgba(245, 237, 224, 0.08); margin-bottom: 26px; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  letter-spacing: 0.06em;
}
.foot-bottom .foot-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot-bottom .foot-meta-sep { color: rgba(245, 237, 224, 0.15); }
.foot-back-top {
  color: var(--muted-2); text-decoration: none;
  padding: 7px 16px;
  border: 1px solid rgba(245, 237, 224, 0.12);
  border-radius: var(--r-pill);
  transition: all 0.15s ease;
  font-family: 'Geist Mono', monospace;
  font-size: var(--fs-2xs);
  letter-spacing: var(--tr-wide);
}
.foot-back-top:hover { color: var(--orange); border-color: var(--orange); background: rgba(238, 111, 45, 0.08); }
