/* =========================================================
   GREENRIDGE ACADEMY — DESIGN SYSTEM
   Palette:  Forest #1F4D3D · Gold #E8A73B · Paper #F7F3EA
             Ink #20261F · Brick #B5473A (sparing accent)
   Type:     Fraunces (display) / Work Sans (body) / IBM Plex Mono (data)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --forest: #1F4D3D;
  --forest-dark: #143327;
  --gold: #E8A73B;
  --gold-soft: #F3D9A6;
  --paper: #F7F3EA;
  --paper-line: #E4DCC9;
  --ink: #20261F;
  --ink-soft: #5B6357;
  --brick: #B5473A;
  --white: #FFFFFF;

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --radius: 6px;
  --shadow: 0 6px 20px rgba(20, 51, 39, 0.10);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

/* subtle ruled-notebook texture on the page background */
body {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    var(--paper-line) 39px
  );
  background-attachment: local;
}

h1, h2, h3, h4 { font-family: var(--display); color: var(--forest-dark); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brick);
  display: inline-block;
  margin-bottom: .6em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  padding: .85em 1.6em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--forest-dark); }
.btn-primary:hover { box-shadow: 0 8px 18px rgba(232,167,59,.4); }
.btn-outline { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { box-shadow: 0 8px 18px rgba(31,77,61,.35); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--forest);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand-crest { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { line-height: 1.1; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; display: block; }
.brand-sub { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; color: var(--gold-soft); text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: .93rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background .15s ease;
}
.main-nav a:hover { background: rgba(255,255,255,.08); }
.main-nav a.active { background: var(--gold); color: var(--forest-dark); font-weight: 600; }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: none; color: var(--paper); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--forest);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 20px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .nav-cta { margin: 10px 0 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--forest);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(232,167,59,.18), transparent 45%),
    linear-gradient(180deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero .container { padding-top: 84px; padding-bottom: 84px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { color: var(--paper); opacity: .85; font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero h1 { color: var(--white); }
.hero-motto { font-family: var(--display); font-style: italic; color: var(--gold-soft); font-size: 1.1rem; margin-top: 4px; }

.hero-crest-wrap { display: flex; justify-content: center; }
.hero-crest { width: 260px; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; text-align: left; padding-top: 48px; padding-bottom: 48px; }
  .hero-crest-wrap { order: -1; }
  .hero-crest { width: 160px; margin: 0 auto; }
}

/* ---------- Stats strip ---------- */
.stats {
  background: var(--forest-dark);
  color: var(--paper);
}
.stats .container { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding: 32px 24px; }
.stat { flex: 1 1 140px; text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: 1.7rem; color: var(--gold); }
.stat span { font-size: .82rem; color: var(--paper); opacity: .75; }

/* ---------- Pillars / feature cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 780px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card .num {
  font-family: var(--mono);
  color: var(--gold);
  background: var(--forest);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  margin-bottom: 14px;
}

/* ---------- Pathway cards (Academics) ---------- */
.pathway-card {
  border-top: 4px solid var(--gold);
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.pathway-card h3 { display: flex; align-items: center; gap: 10px; }
.pathway-card ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.pathway-card li { margin-bottom: .3em; }

/* ---------- Notice board (News) ---------- */
.noticeboard {
  background: var(--forest-dark);
  border-radius: 10px;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 780px) { .noticeboard { grid-template-columns: 1fr; padding: 24px; } }

.notice {
  background: var(--paper);
  padding: 22px 20px 20px;
  border-radius: 3px;
  position: relative;
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
  transform: rotate(var(--tilt, -1deg));
}
.notice:nth-child(2n) { --tilt: 1.2deg; }
.notice:nth-child(3n) { --tilt: -0.6deg; }
.notice::before {
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 46px; height: 18px;
  background: var(--gold-soft);
  opacity: .9;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.notice .date {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--brick);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.notice h3 { font-size: 1.05rem; margin: .3em 0; }
.notice p { font-size: .92rem; margin: 0; }

/* ---------- Timeline (About) ---------- */
.timeline { border-left: 3px solid var(--gold); padding-left: 28px; margin-left: 8px; }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before {
  content: '';
  position: absolute; left: -34px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--forest); border: 3px solid var(--gold);
}
.timeline-item .yr { font-family: var(--mono); color: var(--brick); font-size: .85rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-tile {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--white);
  text-align: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.gallery-tile span.tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.gallery-tile span.cap { font-family: var(--display); font-size: 1.05rem; margin-top: 6px; }
.gallery-tile svg { width: 42px; height: 42px; opacity: .9; margin-bottom: 8px; }

/* ---------- Steps (Admissions) ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--paper-line);
}
.step .step-num {
  counter-increment: step;
  font-family: var(--mono);
  color: var(--gold);
}
.step .step-num::before { content: counter(step, decimal-leading-zero); font-size: 1.4rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border-radius: 10px; padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--forest-dark); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--paper-line);
  border-radius: var(--radius);
  font-family: var(--body);
  font-size: .95rem;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--forest);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* Visible keyboard focus, everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: var(--white);
  border-radius: 10px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin: 0 0 .2em; }
.cta-banner p { color: var(--paper); opacity: .8; margin: 0; }

/* ---------- Quote ---------- */
.quote-strip { text-align: center; max-width: 720px; margin: 0 auto; }
.quote-strip p { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--forest-dark); }
.quote-strip cite { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); font-style: normal; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-dark); color: var(--paper); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--gold-soft); font-family: var(--body); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--paper); opacity: .82; text-decoration: none; font-size: .92rem; margin-bottom: 9px; }
.footer-grid a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; opacity: .7; }

/* ---------- Page header (interior pages) ---------- */
.page-hero {
  background: var(--forest);
  color: var(--paper);
  padding: 56px 0;
}
.page-hero .eyebrow { color: var(--gold-soft); }
.page-hero h1 { color: var(--white); margin-bottom: .3em; }
.page-hero p { color: var(--paper); opacity: .82; max-width: 60ch; }

.map-frame { border: 0; width: 100%; height: 340px; border-radius: var(--radius); filter: sepia(8%) saturate(85%); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; margin-bottom: 12px; color: var(--ink-soft); }
.checklist li::before { content: '✓'; color: var(--forest); font-weight: 700; }
