/* Melrose PTAN - melroseptan.com */

:root {
  --maroon: #6b1f26;
  --maroon-dark: #4e161b;
  --maroon-light: #8c2a33;
  --accent: #f2b632;
  --accent-dark: #d99a12;
  --ink: #1f1d1b;
  --ink-2: #4b4744;
  --muted: #706b66;
  --bg: #f6f4f1;
  --card: #ffffff;
  --line: #e4dfd8;
  --heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px -18px rgba(31, 29, 27, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--maroon-light); }
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 800; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.5vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child, table:last-child, .btn-row:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li + li { margin-top: .3em; }
.lead { font-size: 19px; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.eyebrow { font: 700 13px/1.4 var(--heading); letter-spacing: .12em; text-transform: uppercase; color: var(--maroon); margin-bottom: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- buttons ---------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid var(--maroon);
  background: var(--maroon);
  color: #fff;
  font: 500 16px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover, .btn:focus { background: var(--maroon-light); border-color: var(--maroon-light); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--ink); }
.btn-outline { background: transparent; color: var(--maroon); }
.btn-outline:hover, .btn-outline:focus { background: var(--maroon); color: #fff; }
.btn-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-light:hover, .btn-light:focus { background: #fff; border-color: #fff; color: var(--maroon); }
.btn-lg { padding: 15px 30px; font-size: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }

/* --- header ----------------------------------------------------------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 800 20px var(--heading); }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav li + li { margin: 0; }
.nav ul a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.nav ul a:hover, .nav ul a:focus { background: var(--bg); color: var(--maroon); }
.nav li.active > a { color: var(--maroon); box-shadow: inset 0 -3px 0 var(--maroon); border-radius: 8px 8px 0 0; }
.nav-cta { padding: 9px 18px; font-size: 15px; }
.nav-toggle { display: none; }

/* --- hero ------------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--maroon-dark) url("/assets/photos/school-m-aerial.jpg") center 45% / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(78, 22, 27, .95) 0%, rgba(107, 31, 38, .85) 45%, rgba(107, 31, 38, .35) 100%);
}
.hero .container { min-height: 500px; display: flex; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { color: #fff; max-width: 14em; }
.hero .eyebrow { color: var(--accent); }
.hero .lead { color: rgba(255, 255, 255, .88); max-width: 34em; }
.hero-inner { max-width: 680px; }

.page-hero { background: var(--maroon); color: #fff; }
.page-hero .container { padding-top: 44px; padding-bottom: 44px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .eyebrow { color: var(--accent); }
.page-hero p { color: rgba(255, 255, 255, .85); max-width: 40em; margin: 8px 0 0; }

/* --- sections & cards ------------------------------------------------- */
.section { padding: 56px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); }
.card .btn-row { margin-top: auto; padding-top: 12px; }
.card.featured { grid-column: 1 / -1; background: var(--maroon); color: #fff; border-color: var(--maroon); }
.card.featured.wide { flex-direction: row; gap: 24px; align-items: flex-start; }
.card.featured.wide .card-icon { flex: 0 0 48px; margin: 0; }
.card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.card-body .tag { align-self: flex-start; }
.card-body .btn-row { margin-top: 12px; padding-top: 0; }
.card.featured h3, .card.featured p { color: #fff; }
.card.featured .card-icon { background: rgba(255, 255, 255, .12); }
.card.featured p { color: rgba(255, 255, 255, .88); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #fbeede; color: var(--maroon);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 26px; height: 26px; }
.card.featured .card-icon { color: var(--accent); }
.tag { display: inline-block; font: 700 12px/1.6 var(--heading); letter-spacing: .08em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; background: #fbeede; color: var(--maroon); margin-bottom: 12px; }
.card.featured .tag { background: var(--accent); color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.stat-value { font: 800 30px/1.1 var(--heading); color: var(--maroon); margin-bottom: 4px; }
.stat-label { color: var(--ink-2); }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: start; }
.prose { max-width: 42em; }
.prose h3 { margin-top: 1.4em; }
.prose h3:first-child { margin-top: 0; }

.photo { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.photo-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.photo-band figure { margin: 0; }
.photo-band img { aspect-ratio: 4 / 3; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.photo-pair img { aspect-ratio: 4 / 3; }
.photo-pair.portrait img { aspect-ratio: 3 / 4; }
.split .photo.tall { aspect-ratio: 3 / 4; max-height: 520px; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* in-page section navigation (Support page) */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.subnav a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.subnav a:hover { border-color: var(--maroon); color: var(--maroon); }
.anchor { scroll-margin-top: 96px; }

/* callout */
.callout { background: var(--maroon); color: #fff; border-radius: var(--radius); padding: 32px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.callout h2, .callout h3 { color: #fff; margin: 0 0 4px; }
.callout p { margin: 0; color: rgba(255, 255, 255, .88); }

/* tables */
table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 15.5px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--bg); font-family: var(--heading); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; background: var(--bg); }
table.roles th { width: 45%; font-weight: 500; color: var(--ink-2); }

details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
details summary { cursor: pointer; padding: 18px 0; font: 700 18px var(--heading); color: var(--maroon); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "\2013"; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
details .prose { padding-bottom: 20px; }

/* forms */
.form-row { margin-bottom: 16px; }
.form-label { display: block; font-weight: 500; margin-bottom: 6px; }
.form-req { color: var(--maroon); }
.form-value { width: 100%; padding: 11px 14px; border: 1px solid #c9c3bb; border-radius: 10px; background: #fff; font: 400 16px/1.4 var(--body); color: var(--ink); }
.form-value:focus { outline: 2px solid var(--maroon); outline-offset: 1px; border-color: var(--maroon); }
textarea.form-value { min-height: 150px; resize: vertical; }
.opt-in-label { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.form-message { margin-top: 14px; font-weight: 500; color: var(--maroon); }
address { font-style: normal; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list strong { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-family: var(--heading); }

/* --- footer ----------------------------------------------------------- */
.site-footer { background: var(--maroon-dark); color: rgba(255, 255, 255, .85); margin-top: 24px; font-size: 15px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-title { font: 800 16px var(--heading); color: #fff; margin-bottom: 10px; letter-spacing: .02em; }
.footer-tag { color: var(--accent); font-weight: 500; }
.footer-links { list-style: none; padding: 0; margin: 0 0 16px; }
.footer-links li { margin: 0 0 6px; }
.district-chip { display: inline-block; background: #fff; border-radius: 10px; padding: 8px 12px; }
.district-chip img { width: 150px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13.5px; color: rgba(255, 255, 255, .7); }
.footer-bottom p { margin: 0; }
.footer-bottom span { display: block; }
.back-to-top { text-decoration: none; }

/* --- responsive ------------------------------------------------------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card.featured.wide { flex-direction: column; }
  .photo-band, .photo-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: 12px; min-height: 68px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
  }
  .nav-toggle-bar::before { position: absolute; top: -6px; }
  .nav-toggle-bar::after { position: absolute; top: 6px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 0 14px; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav ul a { padding: 10px 12px; }
  .nav li.active > a { box-shadow: inset 3px 0 0 var(--maroon); border-radius: 8px; }
  .nav-cta { text-align: center; }
  .brand-sub { display: none; }
  .hero .container { min-height: 0; padding-top: 48px; padding-bottom: 48px; }
  .section { padding: 40px 0; }
  .callout { padding: 24px; }
}
