/* Denman Public School P&C — Tier 1 public styles
   Palette from logo: maroon · school yellow · leaf green · parchment */

:root {
  --maroon: #6e1d14;
  --maroon-deep: #4a120c;
  --maroon-soft: #8b3a2c;
  --gold: #e6c010;
  --gold-soft: #f5e08a;
  --leaf: #699e18;
  --plum: #6e1d14;
  --plum-soft: #8b3a2c;
  --parchment: #f3eee4;
  --parchment-deep: #e8e0d0;
  --ink: #1f1a18;
  --ink-muted: #5a4e48;
  --white: #faf8f4;
  --shadow: 0 18px 40px rgba(74, 18, 12, 0.14);

  /* Legacy aliases used across pages */
  --vine: var(--maroon);
  --vine-deep: var(--maroon-deep);
  --vine-soft: var(--maroon-soft);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", Tahoma, sans-serif;

  --max: 1120px;
  --radius: 4px;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--maroon-deep);
  min-height: 100vh;
}

/* Fixed school photo — stays put while page content scrolls over it */
.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(74, 18, 12, 0.2) 0%, rgba(74, 18, 12, 0.72) 70%, rgba(74, 18, 12, 0.92) 100%),
    linear-gradient(135deg, var(--maroon-deep) 0%, var(--maroon) 50%, #3a0e0a 120%);
  background-size: cover;
  background-position: left center;
}

.site-backdrop.has-image {
  background-image:
    linear-gradient(180deg, rgba(74, 18, 12, 0.28) 0%, rgba(74, 18, 12, 0.5) 42%, rgba(74, 18, 12, 0.82) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

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

a:hover {
  color: var(--vine);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--vine);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* ——— Banner (full-width letterhead, proportional) ——— */
.site-banner {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid rgba(110, 29, 20, 0.1);
}

.site-banner-top {
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.35rem);
  padding: clamp(0.55rem, 1.4vw, 0.9rem) clamp(1rem, 4vw, 2.5rem);
}

.site-banner-logo {
  width: clamp(52px, 7vw, 88px);
  height: clamp(52px, 7vw, 88px);
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
}

.site-banner-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  line-height: 1.1;
}

.site-banner-bar {
  width: 100%;
  background: var(--gold);
  color: #111;
}

.site-banner-bar-inner {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.45rem, 1.1vw, 0.7rem) clamp(1rem, 4vw, 2.5rem);
  font-size: clamp(0.7rem, 1.35vw, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  box-sizing: border-box;
}

.site-banner-bar a {
  color: inherit;
  text-decoration: none;
}

.site-banner-bar a:hover {
  text-decoration: underline;
}

.site-banner-bar-left,
.site-banner-bar-right {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.site-banner-bar-right {
  text-align: right;
  margin-left: auto;
}

@media (max-width: 640px) {
  .site-banner-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-banner-bar-right {
    text-align: left;
    margin-left: 0;
  }
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 238, 228, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(110, 29, 20, 0.12);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--maroon-deep);
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(74, 18, 12, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(110, 29, 20, 0.25);
  background: var(--white);
  color: var(--maroon-deep);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--vine-deep);
}

.nav-login {
  color: var(--plum) !important;
  border: 1px solid rgba(107, 58, 74, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.nav-login:hover {
  background: rgba(107, 58, 74, 0.08);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  color: var(--white);
  background: transparent;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
  animation: fade-up 0.85s ease both;
}

.hero-logo {
  width: clamp(7.5rem, 18vw, 10.5rem);
  height: auto;
  margin: 0 0 1.1rem;
  border-radius: 50%;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
}

.hero-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 3.1rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 38ch;
  margin: 0 0 1.75rem;
  color: rgba(250, 248, 244, 0.92);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gold);
  color: var(--vine-deep);
}

.btn-primary:hover {
  background: var(--gold-soft);
  color: var(--vine-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(250, 248, 244, 0.45);
}

.btn-ghost:hover {
  background: rgba(250, 248, 244, 0.1);
  color: var(--white);
}

.btn-secondary {
  background: var(--vine);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--vine-soft);
  color: var(--white);
}

/* ——— Season line ——— */
.season-line {
  display: block;
  width: 100%;
  height: 28px;
  color: transparent;
  margin: -1px 0;
}

.season-line svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ——— Sections ——— */
/* Opaque panels so page content scrolls cleanly over the fixed photo */
main > .section,
main > .band,
main > .band-vine,
main > .season-line {
  position: relative;
  z-index: 1;
}

main > .section {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(230, 192, 16, 0.12), transparent 55%),
    linear-gradient(180deg, var(--parchment) 0%, var(--parchment-deep) 100%);
}

main > .season-line {
  background: var(--parchment);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 650;
  color: var(--vine-deep);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.section-intro {
  max-width: 52ch;
  color: var(--ink-muted);
  margin: 0 0 2rem;
}

.band {
  background: #efe8da;
}

.band-vine {
  background: linear-gradient(180deg, var(--vine-deep), var(--vine));
  color: var(--white);
}

.band-vine h2,
.band-vine .section-label {
  color: var(--gold-soft);
}

.band-vine .section-label {
  color: var(--gold);
}

.band-vine .section-intro,
.band-vine p {
  color: rgba(250, 248, 244, 0.88);
}

.band-vine a {
  color: var(--gold-soft);
}

/* ——— Welcome ——— */
.welcome-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.welcome-copy p {
  margin: 0 0 1rem;
  max-width: 54ch;
}

.welcome-aside {
  padding: 1.5rem 0 0;
  border-top: 2px solid var(--gold);
}

.welcome-aside h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--vine-deep);
}

.welcome-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.welcome-aside li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(110, 29, 20, 0.12);
  color: var(--ink-muted);
}

.welcome-aside li strong {
  display: block;
  color: var(--vine-deep);
  font-weight: 600;
}

/* ——— Events ——— */
.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.event-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(110, 29, 20, 0.14);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.event-item.is-visible {
  opacity: 1;
  transform: none;
}

.event-date {
  font-family: var(--font-display);
  color: var(--plum);
  line-height: 1.2;
}

.event-date .day {
  display: block;
  font-size: 1.75rem;
  font-weight: 650;
}

.event-date .month {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.event-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: var(--vine-deep);
}

.event-body p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 54ch;
}

.event-meta {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--vine-soft);
  font-weight: 500;
}

.section-cta {
  margin-top: 1.75rem;
}

/* ——— Services (canteen / uniform) ——— */
.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.service-block h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: var(--vine-deep);
}

.service-block p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.hours-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(110, 29, 20, 0.18);
  font-size: 0.95rem;
}

.hours-list span:last-child {
  color: var(--ink-muted);
  text-align: right;
}

.note-placeholder {
  font-size: 0.85rem;
  color: var(--plum);
  background: rgba(107, 58, 74, 0.06);
  border-left: 3px solid var(--plum-soft);
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
}

/* ——— Resources ——— */
.resource-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.resource-link {
  display: block;
  padding: 1.25rem 0;
  border-top: 2px solid var(--gold);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.resource-link:hover {
  border-color: var(--plum);
}

.resource-link h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--vine-deep);
}

.resource-link p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.resource-link .arrow {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--plum);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ——— Contact ——— */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.contact-panel p {
  margin: 0 0 1rem;
}

.email-link {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--gold-soft);
  text-decoration: none;
  word-break: break-word;
}

.email-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.contact-details {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(250, 248, 244, 0.88);
  font-size: 0.95rem;
}

.contact-details li {
  margin: 0.35rem 0;
}

.contact-details a {
  color: var(--gold-soft);
}

.report-latest {
  max-width: 54ch;
}

.report-latest h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--maroon-deep);
  margin: 0 0 0.4rem;
}

.report-latest .report-meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
}

.report-latest .report-body {
  color: var(--ink);
  margin: 0 0 1.25rem;
  white-space: pre-wrap;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--vine-deep);
  color: rgba(250, 248, 244, 0.78);
  padding: 2.5rem 1.25rem 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.footer-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.site-footer .brand-mark {
  color: var(--white);
  margin: 0;
}

.stub-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 0 1.25rem;
  box-shadow: 0 4px 16px rgba(74, 18, 12, 0.18);
}

.site-footer a {
  color: var(--gold-soft);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: flex-end;
  align-content: start;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-note {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(250, 248, 244, 0.12);
  font-size: 0.8rem;
  color: rgba(250, 248, 244, 0.55);
}

/* ——— Animations ——— */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ——— Responsive ——— */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: rgba(243, 238, 228, 0.98);
    border-bottom: 1px solid rgba(110, 29, 20, 0.12);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(110, 29, 20, 0.08);
  }

  .nav-login {
    margin-top: 0.5rem;
    text-align: center;
  }

  .welcome-grid,
  .service-split,
  .resource-row,
  .contact-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: min(78vh, 640px);
  }

  .hero-brand {
    max-width: 22ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-content,
  .event-item {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
