/* ==========================================================================
   Fryerstown Old School — site stylesheet
   Plain CSS, no frameworks, no build step.
   Palette drawn from the school sign: cream weatherboard, deep green trim,
   goldfields gold.
   ========================================================================== */

:root {
  --bg: #faf7ef;
  --paper: #fffdf7;
  --ink: #2c2a23;
  --muted: #5f5b4f;
  --green: #3f5a24;
  --green-dark: #2c4118;
  --green-panel: rgba(38, 54, 22, 0.88);
  --gold: #a97d1e;
  --gold-dark: #7c5b13;
  --line: #e3dcc9;
  --radius: 10px;
  --maxw: 62rem;
  --shadow: 0 1px 3px rgba(44, 42, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Avenir Next", Avenir, Corbel, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--green-dark);
  color: #f3efdf;
  border-bottom: 4px solid var(--gold);
}

/* The masthead: the vector school sign, centred on its weatherboard wall.
   The artwork is extra-wide (the slats simply continue outward), so it
   reaches the screen edge at any size without stretching the sign. */
.site-banner {
  display: block;
  height: clamp(160px, 28vh, 340px);
  background-color: #e9e1c8;
  background-image: url("../images/school-sign-banner.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: auto 100%;
}

.site-nav {
  padding-top: 0.4rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.9rem;
  color: #e8ecd9;
  text-decoration: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
}

.site-nav a:hover {
  background: var(--green);
  color: #fff;
}

.site-nav a[aria-current="page"] {
  background: var(--bg);
  color: var(--green-dark);
}

/* ---------- hero ---------- */

/* Intro band under the nav on the home page */
.hero-text {
  background: var(--green-dark);
  color: #f6f3e6;
  padding: 1.6rem 0 1.7rem;
}

.hero-text h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  line-height: 1.25;
  color: #fdfaf0;
}

.hero-text .btn-secondary {
  color: #f6f3e6;
}

.hero-text p {
  margin: 0 0 0.7rem;
  max-width: 44rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-text .btn {
  margin: 0;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 2px solid transparent;
}

.btn:hover {
  background: var(--gold-dark);
}

.btn-secondary {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

main .btn-secondary {
  color: var(--green-dark);
}

/* ---------- sections ---------- */

main {
  padding-bottom: 3rem;
}

section {
  margin-top: 2.4rem;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--green-dark);
}

h2 {
  font-size: 1.45rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--line);
}

h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
}

.page-header {
  margin-top: 2rem;
}

.page-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin: 0 0 0.4rem;
}

.page-header .lede {
  margin-bottom: 0;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.2rem;
  margin: 0;
}

.card h3 {
  margin: 0 0 0.4rem;
}

.card p {
  margin-bottom: 0.6rem;
}

.card .more {
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
}

.card .more:hover {
  text-decoration: underline;
}

/* ---------- figures ---------- */

figure {
  margin: 1.6rem 0;
}

figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.45rem;
}

.fig-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.fig-row figure {
  margin: 0;
}

/* ---------- blockquote (history) ---------- */

blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 5px solid var(--gold);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #4a4738;
}

blockquote p {
  margin: 0 0 0.5rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- info tables / rates ---------- */

.rates-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 1.4rem;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rates-table th,
.rates-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.rates-table tr:last-child td {
  border-bottom: none;
}

.rates-table th {
  background: var(--green);
  color: #f3efdf;
}

.rates-table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- notice / placeholder ---------- */

.notice {
  background: #fdf3d7;
  border: 1px solid #e5c96b;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}

.notice p {
  margin: 0;
}

/* ---------- contact page ---------- */

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
  margin: 1.4rem 0;
}

.contact-card dl {
  margin: 0;
}

.contact-card dt {
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 0.8rem;
}

.contact-card dt:first-child {
  margin-top: 0;
}

.contact-card dd {
  margin: 0.1rem 0 0;
}

a.mailto {
  font-weight: 700;
  color: var(--green);
}

/* ---------- news ---------- */

.news-empty {
  background: var(--paper);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.news-post-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--green-dark);
  color: #d9dfc6;
  padding: 1.8rem 0 2rem;
  border-top: 4px solid var(--gold);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer a {
  color: #f0e9c8;
}

.site-footer .fineprint {
  color: #aab590;
  margin-top: 0.8rem;
}

/* ---------- small screens ---------- */

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  .site-banner {
    height: 170px;
  }

  .site-nav a {
    padding: 0.55rem 0.7rem;
  }
}

@media print {
  .site-nav,
  .hero-actions,
  .skip-link {
    display: none;
  }
}
