/* ============================================================
   The Focus Classroom — shared design system
   Adapted from the "Analog Learning" slide deck (15–19):
   Newsreader / Public Sans / Caveat, cream-and-ink palette.
   ============================================================ */

:root {
  --paper:       #F7F3EC;
  --paper-2:     #F1ECE1;
  --card:        #FFFDF8;
  --card-2:      #FFFEFA;
  --ink:         #26231E;
  --ink-soft:    #4A463E;
  --muted:       #6F6A60;
  --line:        #D8D2C4;
  --line-strong: #C9C2B4;
  --red:         #A33B2E;
  --red-deep:    #8A3025;
  --navy:        #1B2A4A;
  --navy-tint:   #EEF1F6;
  --red-tint:    #FBF4EF;
  --gold:        #C79A5F;

  --serif: "Newsreader", Georgia, Cambria, "Times New Roman", serif;
  --sans:  "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hand:  "Caveat", "Segoe Script", cursive;

  --shadow-sm: 0 4px 14px rgba(38, 35, 30, 0.08);
  --shadow-md: 0 12px 30px rgba(38, 35, 30, 0.12);
  --shadow-lg: 0 24px 60px rgba(38, 35, 30, 0.18);
  --radius: 4px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1rem;
}

.hand { font-family: var(--hand); color: var(--red); font-size: 1.7rem; line-height: 1.2; }

.lede { font-size: clamp(1.2rem, 2vw, 1.55rem); color: var(--ink-soft); line-height: 1.5; }

.muted { color: var(--muted); }

/* ---- layout helpers ---- */
.wrap { width: min(100% - 3rem, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 3rem, 860px); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-tint { background: var(--paper-2); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.1rem; }

/* ============================================================
   Site header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--navy);
  display: grid; place-items: center;
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
}
.site-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(38,35,30,0.06); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--navy); color: var(--paper); }
.nav-toggle { display: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.72rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: rgba(27,42,74,0.06); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-deep); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.8rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* nav cards on landing */
.navcard {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.navcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--red); }
.navcard__step {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.navcard h3 { margin: 0; }
.navcard p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.navcard__go { font-family: var(--sans); font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-top: auto; padding-top: 0.4rem; }

/* framed image */
.framed {
  background: var(--card-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 14px;
  border-radius: var(--radius);
}
.framed img { border-radius: 2px; }

/* pill / tag */
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.tag--navy { background: var(--navy); color: var(--paper); }
.tag--red  { background: var(--red);  color: var(--paper); }
.tag--line { border: 1.5px solid var(--line-strong); color: var(--muted); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 2.6rem 0;
  margin-top: 2rem;
}
.site-footer__inner {
  width: min(100% - 3rem, var(--maxw));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--red); }
.footer-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .nav-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--card);
    cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after  { position: absolute; top: 6px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0.6rem; border-radius: 8px; }
}
