/* Looper — shared across every page of the marketing site.

   The nav lives here rather than being pasted into each page, because a
   navigation bar that differs page to page is worse than none: people learn
   where things are by the bar staying put. Each page still carries its own
   page-specific styles; this is the furniture they have in common. */

:root {
  --turf: #2F7D36; --turf-deep: #16351B;
  --ink: #121A11; --ink-soft: #4A5548; --ink-faint: #7C867A;
  --paper: #FAFAF6; --paper-2: #F1F2EA; --rule: #D5D9CC;
  --on-turf: #F4F7F0; --on-turf-dim: #B8CFB6; --sand: #D9C9A3;
  --nav-h: 4rem;
}
:root:not([data-theme="light"]) {
  --turf: #3E9647; --turf-deep: #0D2010;
  --ink: #E9EFE6; --ink-soft: #A9B5A6; --ink-faint: #7A8677;
  --paper: #0E140D; --paper-2: #161E15; --rule: #2A342A;
  --on-turf: #F2F7EF; --on-turf-dim: #BBD3B8; --sand: #C9B68B;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --turf: #2F7D36; --turf-deep: #16351B;
    --ink: #121A11; --ink-soft: #4A5548; --ink-faint: #7C867A;
    --paper: #FAFAF6; --paper-2: #F1F2EA; --rule: #D5D9CC;
  }
}

/* ---------------------------------------------------------------------
   The navigation bar
   ------------------------------------------------------------------ */

.topnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--turf-deep); color: var(--on-turf);
}
.topnav__inner {
  width: 100%; max-width: 76rem; margin: 0 auto;
  padding: 0 1.3rem; min-height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
}
.topnav__brand { display: flex; align-items: center; margin-right: .5rem; }
.topnav__brand img { height: 1.45rem; width: auto; display: block; }

.topnav__links { display: flex; align-items: center; gap: 1.6rem; }
.topnav__links a {
  color: var(--on-turf); text-decoration: none; font-size: .97rem;
  font-weight: 500; white-space: nowrap; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.topnav__links a:hover { border-bottom-color: var(--on-turf-dim); }
/* The page you are on, said plainly, so the bar answers "where am I?" */
.topnav__links a[aria-current="page"] { border-bottom-color: var(--on-turf); }

.topnav__end { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.topnav__cta {
  background: var(--paper); color: var(--turf-deep);
  padding: .55rem 1.1rem; border-radius: 999px;
  font-size: .95rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.topnav__cta:hover { background: var(--on-turf-dim); }

.topnav__burger {
  display: none; background: none; border: 0; color: var(--on-turf);
  font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer;
  padding: .5rem; margin-right: -.5rem; align-items: center; gap: .5rem;
}
.topnav__burger svg { display: block; }

/* Below this width the links do not fit, so they fold into a menu -- the
   pattern every phone user already knows. The burger only appears once
   nav.js has run: without JavaScript the links stay visible and stacked
   rather than hiding behind a button that cannot open. */
@media (max-width: 54rem) {
  .js .topnav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--turf-deep); padding: .5rem 1.3rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .js .topnav.is-open .topnav__links { display: flex; }
  .js .topnav__links a {
    padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .js .topnav__links a[aria-current="page"] { color: var(--on-turf-dim); }
  .js .topnav__burger { display: inline-flex; }
  .topnav { position: relative; }
  .topnav__links { flex-wrap: wrap; gap: .4rem 1.1rem; }
}
@media (max-width: 26rem) {
  .topnav__cta { padding: .5rem .8rem; font-size: .88rem; }
}

/* ---------------------------------------------------------------------
   Page furniture
   ------------------------------------------------------------------ */

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, .97rem + .16vw, 1.09rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Heavier and tighter than the serif it replaced: a sans headline at serif
   weight reads limp, because the serif carried its presence in the
   letterforms rather than in the weight. */
h1, h2, h3 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 800; letter-spacing: -.025em; line-height: 1.08;
}
.rows h3, .row h3 { font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; }

.shell { width: 100%; max-width: 54rem; margin: 0 auto; padding-inline: 1.3rem; }

.label {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; display: block; margin-bottom: .5rem;
}

.page-hero { background: var(--turf); color: var(--on-turf); }
.page-hero .shell { padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-hero .label { color: var(--on-turf-dim); }
.page-hero h1 {
  font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.2rem); font-weight: 800;
  letter-spacing: -.025em; margin: 0 0 1rem; max-width: 20ch;
}
.page-hero p { color: var(--on-turf-dim); font-size: 1.1rem; margin: 0; max-width: 48ch; }

/* The ruled list used on every page.

   It asks about its OWN width, not the window's: the same list appears
   full-width on one page and inside a narrow column on another, and a media
   query cannot tell those apart. On the home page that mistake produced a
   14rem label beside a column of single words on a perfectly wide screen. */
.rows { display: grid; container-type: inline-size; }
.rows > .row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem 2.5rem;
  padding-block: clamp(1rem, 2.5vw, 1.4rem);
  border-top: 1px solid var(--rule);
}
.rows > .row:last-child { border-bottom: 1px solid var(--rule); }
@container (min-width: 34rem) {
  .rows > .row { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); align-items: baseline; }
}
.row h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.row p { margin: 0; color: var(--ink-soft); }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .8rem 1.4rem; border-radius: 3px;
}
.btn--turf { background: var(--turf); color: var(--on-turf); }
.btn--sand { background: var(--sand); color: #1B2416; }
.btn--ghost { border: 1px solid currentColor; }

.site-foot {
  border-top: 1px solid var(--rule); margin-top: 3rem;
  padding-block: 2rem 3rem; color: var(--ink-faint); font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: space-between;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--turf); text-decoration: underline; }

/* ---------------------------------------------------------------------
   Print — these pages are meant to be handed to someone at a course
   ------------------------------------------------------------------ */

@media print {
  .topnav, .site-foot, .no-print { display: none !important; }
  .page-hero { background: none !important; color: var(--ink) !important; }
  .page-hero .label, .page-hero p { color: var(--ink-soft) !important; }
  .page-hero .shell { padding-block: 0 1rem; }
  body { font-size: 10.5pt; }
  .shell { max-width: none; padding-inline: 0; }
  h1 { font-size: 22pt !important; }
  h2 { font-size: 14pt !important; }
  .rows > .row { break-inside: avoid; padding-block: .45rem; }
  a[href]::after { content: ""; }
}
