/* =========================================================
   Delhi Public School, Sheikhpura — stylesheet
   Theme: handcrafted school, emerald/saffron/ivory/ink
   ========================================================= */

:root {
  /* palette */
  --emerald: #0d6b4d;
  --emerald-deep: #094a35;
  --emerald-soft: #2f8f6a;
  --saffron: #f4a72c;
  --saffron-deep: #d8841a;
  --ivory: #f6efe1;
  --ivory-soft: #fbf6ec;
  --paper: #efe7d4;
  --ink: #1d2a26;
  --ink-soft: #3c4a44;
  --rose: #c64a5b;
  --sage: #a8b89d;
  --sage-soft: #d5dec9;
  --line: rgba(29,42,38,.14);
  --shadow-sm: 0 1px 2px rgba(13,107,77,.08), 0 2px 6px rgba(13,107,77,.05);
  --shadow-md: 0 6px 18px rgba(13,107,77,.10), 0 2px 4px rgba(13,107,77,.06);
  --shadow-lg: 0 20px 50px rgba(13,107,77,.18), 0 6px 12px rgba(13,107,77,.08);

  /* typography */
  --f-display: "Fraunces", Georgia, serif;
  --f-script:  "Caveat", "Brush Script MT", cursive;
  --f-body:    "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout */
  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --gap: clamp(16px, 2.5vw, 28px);
}

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  background-image:
    radial-gradient(rgba(13,107,77,.04) 1px, transparent 1px),
    radial-gradient(rgba(244,167,44,.03) 1px, transparent 1px);
  background-size: 22px 22px, 33px 33px;
  background-position: 0 0, 11px 11px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,svg,picture { max-width: 100%; display: block; }
a { color: var(--emerald-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--saffron-deep); }
button { font: inherit; cursor: pointer; }

/* ---------- typography ---------- */
h1,h2,h3,h4 { font-family: var(--f-display); color: var(--ink); font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
.script { font-family: var(--f-script); color: var(--saffron-deep); font-weight: 500; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-script); font-size: 1.55rem;
  color: var(--saffron-deep); margin-bottom: .25em;
}
.eyebrow::before { content:""; width:34px; height:2px; background: var(--saffron); }
.section-title {
  display:flex; flex-direction:column; gap:.15em;
  margin-bottom: 1.6em;
}
.section-title h2 { margin: 0; }
/* ---- layout ---- */
.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.container-wide { width: min(100% - 24px, 1400px); margin-inline: auto; }
section { padding: clamp(56px, 8vw, 110px) 0; position: relative; }
.row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.grid  { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  border: 2px solid transparent;
  transition: transform .18s, box-shadow .18s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--emerald); color: var(--ivory); }
.btn-primary:hover { background: var(--emerald-deep); color: var(--ivory); }
.btn-saffron { background: var(--saffron); color: var(--ink); }
.btn-saffron:hover { background: var(--saffron-deep); color: var(--ivory); }
.btn-outline { background: transparent; color: var(--emerald-deep); border-color: var(--emerald); }
.btn-outline:hover { background: var(--emerald); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- forms ---- */
input, textarea, select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font: inherit; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(13,107,77,.12); }
textarea { resize: vertical; min-height: 120px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- badges ---- */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--sage-soft); color: var(--emerald-deep); letter-spacing: .03em; }
.badge-saffron { background: rgba(244,167,44,.18); color: var(--saffron-deep); }

.section-title .lead { max-width: 60ch; color: var(--ink-soft); }
.center { text-align:center; }
.center .section-title { align-items: center; }
.center .lead { margin-inline: auto; }

::selection { background: var(--saffron); color: var(--ink); }

/* ---------- base mobile-safe defaults ---------- */
/* overflow-x:clip preserves position:sticky (hidden breaks it) */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
img { height: auto; }

/* utility for inline split grids (about, home) */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* Prevent horizontal scroll from grids/tables (no overflow-wrap here — it breaks nav) */
.container, .container-wide { max-width: 100%; }
p, li, .card p, .page-hero .lead, .hero-lede { overflow-wrap: break-word; }
/* ==========================================================
   NAVBAR
   ========================================================== */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,239,225,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1.5px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brand-text { line-height: 1.05; white-space: nowrap; }
.brand-text .name { font-family: var(--f-display); font-size: 1.18rem; font-weight: 600; color: var(--emerald-deep); white-space: nowrap; }
.brand-text .loc { font-family: var(--f-script); font-size: 1.05rem; color: var(--saffron-deep); margin-top: -2px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex: 1 1 auto; justify-content: center; min-width: 0; }
.nav-links li { flex-shrink: 0; }
.nav-links a { display: inline-block; padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--ink); white-space: nowrap; word-break: keep-all; overflow-wrap: normal; font-size: .96rem; }
.nav-links a:hover, .nav-links a.active { color: var(--emerald-deep); background: rgba(13,107,77,.08); }
.nav-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-toggle { display: none; background: transparent; border: 2px solid var(--emerald); color: var(--emerald-deep); border-radius: 10px; padding: 6px 10px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: transform .2s; }

/* ==========================================================
   HERO
   ========================================================== */
.hero { position: relative; overflow: hidden; padding: clamp(48px,8vw,96px) 0 clamp(64px,10vw,130px); background: linear-gradient(180deg, var(--ivory-soft), var(--ivory)); }
.hero::before { content:""; position: absolute; inset: -40px -40px auto auto; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244,167,44,.22), transparent 70%); pointer-events: none; }
.hero::after { content:""; position: absolute; inset: auto auto -120px -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(13,107,77,.16), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,5vw,60px); align-items: center; position: relative; }
.hero h1 .accent { color: var(--emerald); font-style: italic; font-weight: 400; }
.hero h1 .scribble { font-family: var(--f-script); color: var(--saffron-deep); font-size: 1.25em; line-height: 1; display: inline-block; transform: rotate(-3deg); }
.hero-lede { font-size: 1.1rem; max-width: 56ch; color: var(--ink-soft); margin: 1em 0 1.6em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; font-size: .92rem; color: var(--ink-soft); }
.hero-points div { display: flex; align-items: center; gap: 8px; }
.hero-points div::before { content: "✦"; color: var(--saffron); font-size: 1.1rem; }

/* polaroid */
.polaroid { background: #fff; padding: 14px 14px 42px; box-shadow: var(--shadow-lg); border-radius: 4px; position: relative; transition: transform .35s; }
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 2px; }
.polaroid .caption { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-family: var(--f-script); font-size: 1.35rem; color: var(--emerald-deep); }
.polaroid::before { content: ""; position: absolute; top: -14px; left: 28%; width: 90px; height: 26px; background: linear-gradient(180deg, rgba(244,167,44,.55), rgba(244,167,44,.75)); transform: rotate(-6deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 1; }
.hero-collage { position: relative; min-height: 420px; }
.hero-collage .polaroid { position: absolute; }
.hero-collage .p1 { top: 0; left: 6%; width: 56%; transform: rotate(-2deg); }
.hero-collage .p2 { bottom: 0; right: 0; width: 50%; transform: rotate(4deg); }
.hero-collage .p3 { top: 38%; right: 8%; width: 36%; transform: rotate(-6deg); }

/* ==========================================================
   MARQUEE
   ========================================================== */
.marquee { background: var(--emerald); color: var(--ivory); padding: 14px 0; overflow: hidden; border-block: 1.5px solid var(--emerald-deep); }
.marquee-track { display: flex; gap: 40px; white-space: nowrap; animation: marquee 38s linear infinite; font-family: var(--f-display); font-size: 1.2rem; }
.marquee-track span { display: inline-flex; align-items: center; gap: 14px; }
.marquee-track span::after { content: "✦"; color: var(--saffron); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================
   SECTION COMPONENTS
   ========================================================== */
.wavy { display: block; width: 100%; height: 38px; color: var(--sage); margin: 0; }
.section-head { margin-bottom: clamp(36px,5vw,60px); }
.section-head .num { font-family: var(--f-script); color: var(--saffron-deep); font-size: 1.4rem; }
.page-hero { padding: clamp(60px,9vw,110px) 0 clamp(40px,6vw,70px); background: linear-gradient(180deg, var(--sage-soft), var(--ivory)); position: relative; overflow: hidden; }
.page-hero::after { content:""; position: absolute; inset: auto -80px -120px auto; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244,167,44,.18), transparent 70%); }
.page-hero .breadcrumb { font-size: .88rem; color: var(--ink-soft); margin-bottom: 14px; }
.page-hero .breadcrumb a { color: var(--emerald-deep); }
.page-hero h1 { font-size: clamp(2.2rem,5vw,3.6rem); }
.page-hero .lead { max-width: 64ch; color: var(--ink-soft); font-size: 1.08rem; }
.mission-strip { background: var(--paper); border-top: 1.5px dashed rgba(13,107,77,.25); border-bottom: 1.5px dashed rgba(13,107,77,.25); padding: 22px 0; text-align: center; }
.mission-strip .quote { font-family: var(--f-display); font-size: clamp(1.05rem,2vw,1.35rem); font-style: italic; color: var(--emerald-deep); max-width: 60ch; margin: 0 auto; }
.mission-strip .quote::before, .mission-strip .quote::after { content:"\201C"; font-family: var(--f-script); color: var(--saffron-deep); font-size: 1.6em; line-height: 0; vertical-align: -.25em; margin: 0 4px; }
.sticker { display: inline-block; padding: 6px 16px; font-family: var(--f-script); font-size: 1.4rem; background: var(--saffron); color: var(--ink); border-radius: 4px; transform: rotate(-3deg); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.sticker.rose { background: var(--rose); color: var(--ivory); }
.sticker.emerald { background: var(--emerald); color: var(--ivory); }
.divider-ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 28px auto; color: var(--saffron); }
.divider-ornament::before, .divider-ornament::after { content:""; height: 1.5px; width: 60px; background: currentColor; opacity: .5; }

/* ---- cards ---- */
.card { background: var(--ivory-soft); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage); }
.card .icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(13,107,77,.10); color: var(--emerald-deep); margin-bottom: 16px; font-size: 1.6rem; }
.card .icon.saffron { background: rgba(244,167,44,.18); color: var(--saffron-deep); }
.card .icon.rose { background: rgba(198,74,91,.12); color: var(--rose); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

/* stats */
.stats { background: var(--emerald); color: var(--ivory); border-radius: var(--radius); padding: clamp(28px,4vw,50px); position: relative; overflow: hidden; }
.stats::before { content:""; position: absolute; inset: -40px -60px auto auto; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244,167,44,.30), transparent 70%); }
.stat { text-align: center; }
.stat .num { font-family: var(--f-display); font-size: clamp(2.6rem,6vw,4.2rem); font-weight: 500; line-height: 1; }
.stat .lbl { font-family: var(--f-script); font-size: 1.35rem; color: rgba(246,239,225,.85); margin-top: 6px; }
.stat .small { font-size: .85rem; opacity: .8; margin-top: 6px; }

/* ==========================================================
   GALLERY & LIGHTBOX
   ========================================================== */
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.gallery .tile { position: relative; overflow: hidden; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--ivory-soft); cursor: pointer; aspect-ratio: 4/3; }
.gallery .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery .tile:hover img { transform: scale(1.06); }
.gallery .tile .label { position: absolute; inset: auto 0 0 0; padding: 12px 14px; background: linear-gradient(180deg, transparent, rgba(13,107,77,.85)); color: var(--ivory); font-family: var(--f-script); font-size: 1.2rem; transform: translateY(20%); opacity: 0; transition: .3s; }
.gallery .tile:hover .label { transform: translateY(0); opacity: 1; }
.t-wide  { grid-column: span 6; }
.t-big   { grid-column: span 8; }
.t-tall  { grid-column: span 4; aspect-ratio: 3/4; }
.t-sq    { grid-column: span 4; }
/* Symmetrical home preview gallery — 3x2, uniform aspect, perfectly aligned */
.gallery-home { grid-template-columns: repeat(3, minmax(0,1fr)); }
.gallery-home .tile { grid-column: auto !important; aspect-ratio: 4/3; min-width: 0; }
.gallery-home .tile img { aspect-ratio: auto; }
.lightbox { position: fixed; inset: 0; background: rgba(13,74,53,.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lightbox.open { display: flex; animation: fadeIn .25s; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox .close, .lightbox .prev, .lightbox .next { position: absolute; background: var(--ivory); color: var(--ink); border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; }
.lightbox .close { top: 22px; right: 22px; }
.lightbox .prev  { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .next  { right: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .caption { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--ivory); font-family: var(--f-script); font-size: 1.4rem; }

/* ==========================================================
   DISCLOSURE & TABLES
   ========================================================== */
.dl-section { background: var(--ivory-soft); border-radius: var(--radius); padding: 28px; border: 1.5px solid var(--line); margin-bottom: 20px; }
.dl-section h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dl-section h3 .n { font-family: var(--f-script); color: var(--saffron-deep); font-size: 1.5rem; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.dl-grid .k { font-weight: 600; color: var(--ink); }
.dl-grid .v { color: var(--ink-soft); margin-bottom: 6px; }
table.curr { width: 100%; border-collapse: collapse; background: var(--ivory-soft); border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--line); }
table.curr th, table.curr td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
table.curr th { background: var(--sage-soft); color: var(--emerald-deep); font-family: var(--f-display); font-weight: 600; }
table.curr tr:last-child td { border-bottom: 0; }


/* ==========================================================
   EVENTS, FACULTY, STEPS, CONTACT
   ========================================================== */
.events { display: grid; gap: 18px; }
.event { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; background: var(--ivory-soft); border-radius: var(--radius); border: 1.5px solid var(--line); transition: transform .2s, box-shadow .2s; }
.event:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.event .date { text-align: center; }
.event .date .d { font-family: var(--f-display); font-size: 2.2rem; font-weight: 500; line-height: 1; color: var(--emerald-deep); }
.event .date .m { font-family: var(--f-script); font-size: 1.3rem; color: var(--saffron-deep); }
.faculty-card { background: var(--ivory-soft); border-radius: var(--radius); border: 1.5px solid var(--line); padding: 22px; text-align: center; transition: transform .25s; }
.faculty-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.faculty-card .avatar { width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 14px; background: var(--sage-soft); display: grid; place-items: center; font-family: var(--f-display); font-size: 2rem; color: var(--emerald-deep); overflow: hidden; }
.faculty-card .name { font-family: var(--f-display); font-weight: 600; }
.faculty-card .role { font-family: var(--f-script); font-size: 1.2rem; color: var(--saffron-deep); }
.steps { counter-reset: step; }
.steps .step { counter-increment: step; position: relative; padding-left: 64px; }
.steps .step::before { content: counter(step); position: absolute; left: 0; top: 4px; width: 46px; height: 46px; border-radius: 50%; background: var(--emerald); color: var(--ivory); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.steps .step + .step { margin-top: 24px; }
.contact-card { background: var(--ivory-soft); padding: 32px; border-radius: var(--radius); border: 1.5px solid var(--line); }
.contact-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.contact-row:last-child { border-bottom: 0; }
.contact-row .ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(13,107,77,.10); color: var(--emerald-deep); display: grid; place-items: center; flex-shrink: 0; font-size: 1.1rem; }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer { background: var(--ink); color: rgba(246,239,225,.78); padding: 70px 0 30px; position: relative; overflow: hidden; }
.footer::before { content:""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--emerald), var(--saffron), var(--rose), var(--emerald)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color: var(--ivory); font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.footer h4::after { content:""; position: absolute; bottom: 0; left: 0; width: 36px; height: 2px; background: var(--saffron); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: rgba(246,239,225,.75); }
.footer a:hover { color: var(--saffron); }
.footer .brand-text .name { color: var(--ivory); }
.footer p, .footer li { font-size: .92rem; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(246,239,225,.12); margin-top: 50px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: rgba(246,239,225,.55); }
.socials { display: flex; gap: 10px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(246,239,225,.08); display: grid; place-items: center; transition: background .2s, color .2s; color: rgba(246,239,225,.75); }
.socials a:hover { background: var(--saffron); color: var(--ink); }

/* ==========================================================
   ANIMATIONS
   ========================================================== */
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeUp { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }
/* ==========================================================
   RESPONSIVE — Mobile Optimized (all pages)
   Breakpoints: 1024, 980, 768, 640, 480
   ========================================================== */

/* ---------- 1024px: tablet landscape ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-grid { gap: 36px; }
  .gallery { gap: 14px; }
  .t-wide  { grid-column: span 6; }
  .t-big   { grid-column: span 12; }
  .t-tall  { grid-column: span 6; }
  .t-sq    { grid-column: span 6; }
}

/* ---------- 980px: navbar collapses ---------- */
@media (max-width: 980px) {
  .nav { padding: 12px 0; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    background: var(--ivory-soft);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    gap: 0;
    flex-shrink: 0;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 2.5px;
    background: var(--emerald-deep); margin: 3.5px 0;
    border-radius: 2px; transition: transform .25s ease, opacity .2s ease, width .2s ease;
    transform-origin: center;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .nav-wrap { position: sticky; top: 0; }
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(251,246,236,.98);
    backdrop-filter: blur(12px) saturate(160%);
    border-bottom: 1.5px solid var(--line);
    border-top: 1px solid var(--line);
    padding: 12px 16px 20px;
    gap: 2px;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .22s ease;
    box-shadow: 0 12px 32px rgba(13,107,77,.12);
    z-index: 49;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 500;
    display: flex; align-items: center; justify-content: space-between;
  }
  .nav-links a::after { content: "›"; opacity: .35; font-size: 1.2rem; }
  .nav-links a:hover, .nav-links a.active { background: rgba(13,107,77,.09); color: var(--emerald-deep); }
  .nav-links a:hover::after, .nav-links a.active::after { opacity: 1; color: var(--emerald); }
  .nav-cta .btn { display: none; }
  /* backdrop when menu open */
  body.nav-open { overflow: hidden; }
  body.nav-open::before {
    content:""; position: fixed; inset: 68px 0 0 0;
    background: rgba(13,42,33,.32);
    backdrop-filter: blur(2px);
    z-index: 48; animation: fadeIn .2s ease;
  }
}

/* ---------- 900px: general stacking ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-collage { min-height: auto; margin-top: 8px; }
  .form-row { grid-template-columns: 1fr; }
  .event { grid-template-columns: 88px 1fr; gap: 16px; }
  .dl-grid { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; gap: 32px; }
  /* inline style override for about/index splits */
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ---------- 768px: tablet portrait / large phone ---------- */
@media (max-width: 768px) {
  .container { width: min(100% - 20px, var(--maxw)); }
  section { padding: clamp(42px, 7vw, 64px) 0; }
  .page-hero { padding: 42px 0 32px; }
  .page-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.12; }
  .page-hero .lead { font-size: 1rem; }

  /* typography scale down slightly */
  h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.55rem, 6vw, 2.1rem); }
  .eyebrow { font-size: 1.3rem; }
  .eyebrow::before { width: 26px; }

  /* grids stack */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  /* keep 2 cols for few cases on 768? force 1 col for readability */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer { padding: 48px 0 24px; }
  .footer h4 { margin-bottom: 12px; }

  /* hero */
  .hero { padding: 36px 0 48px; }
  .hero-lede { font-size: 1rem; margin: .9em 0 1.3em; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; min-width: 0; padding: 13px 18px; font-size: .95rem; }
  .hero-points { gap: 12px 16px; margin-top: 20px; font-size: .88rem; }
  .polaroid { padding: 10px 10px 36px; }
  .polaroid .caption { font-size: 1.15rem; bottom: 8px; }
  .polaroid img { aspect-ratio: 4/3.6; }
  /* collage becomes flowing stack, not absolute */
  .hero-collage {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    min-height: auto; padding-top: 4px;
  }
  .hero-collage .polaroid {
    position: relative !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    width: auto !important;
    transform: rotate(-1.2deg) !important;
    margin: 0;
  }
  .hero-collage .p1 { transform: rotate(-1.5deg) !important; }
  .hero-collage .p2 { transform: rotate(1.6deg) !important; }
  .hero-collage .p3 { grid-column: span 2; width: 78% !important; margin: 0 auto; transform: rotate(.6deg) !important; }
  .hero-collage .p3 img { aspect-ratio: 16/10; }

  /* stats: 2x2 */
  .stats { padding: 28px 18px; border-radius: 16px; }
  .stats .grid-4 { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .stat .num { font-size: clamp(2rem, 9vw, 2.6rem); }
  .stat .lbl { font-size: 1.15rem; }
  .stat .small { font-size: .8rem; }

  /* cards */
  .card { padding: 22px 18px; border-radius: 12px; }
  .card .icon { width: 48px; height: 48px; border-radius: 12px; font-size: 1.35rem; margin-bottom: 12px; }

  /* gallery: 2 cols */
  .gallery { grid-template-columns: repeat(12, 1fr); gap: 12px; }
  .t-wide, .t-big { grid-column: span 6; }
  .t-tall, .t-sq { grid-column: span 6; aspect-ratio: 4/3; }
  /* home symmetrical gallery stays 2-col on tablet */
  .gallery-home { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .gallery-home .tile { grid-column: auto !important; aspect-ratio: 4/3; }

  /* events */
  .events { gap: 12px; }
  .event { padding: 16px 16px; border-radius: 12px; align-items: flex-start; }
  .event .date .d { font-size: 1.8rem; }
  .event .date .m { font-size: 1.1rem; }
  .event h3 { font-size: 1.05rem; line-height: 1.3; }
  .event .meta { font-size: .88rem; }

  /* disclosure */
  .dl-section { padding: 22px 18px; border-radius: 12px; }
  .dl-section h3 { font-size: 1.15rem; }
  .dl-grid { gap: 6px 12px; }
  .dl-grid .k { font-size: .92rem; }
  .dl-grid .v { font-size: .92rem; word-break: break-word; }

  /* tables */
  table.curr th, table.curr td { padding: 10px 12px; font-size: .88rem; }

  /* steps */
  .steps .step { padding-left: 56px; }
  .steps .step::before { width: 40px; height: 40px; font-size: 1.15rem; top: 2px; }

  /* contact */
  .contact-card { padding: 20px 16px; border-radius: 12px; }
  .contact-row { gap: 10px; padding: 10px 0; }
  .contact-row .ic { width: 34px; height: 34px; border-radius: 8px; font-size: 1rem; }

  /* marquee */
  .marquee { padding: 10px 0; }
  .marquee-track { font-size: 1rem; gap: 24px; }

  /* buttons */
  .btn { padding: 12px 20px; font-size: .94rem; }
  .btn-sm { padding: 8px 16px; }

  /* back to top */
  .back-to-top { width: 42px !important; height: 42px !important; bottom: 16px !important; right: 16px !important; font-size: 1.2rem !important; }

  /* lightbox larger touch targets */
  .lightbox .close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox .prev { left: 10px; width: 40px; height: 40px; }
  .lightbox .next { right: 10px; width: 40px; height: 40px; }
  .lightbox .caption { bottom: 12px; font-size: 1.1rem; padding: 0 16px; text-align: center; width: 90%; }
}

/* ---------- 640px: large phone ---------- */
@media (max-width: 640px) {
  .container { width: min(100% - 16px, var(--maxw)); }
  .brand img { width: 40px; height: 40px; }
  .brand-text .name { font-size: 1.02rem; }
  .brand-text .loc { font-size: .95rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer p, .footer li { font-size: .9rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 32px; }

  .page-hero .breadcrumb { font-size: .82rem; }

  .hero { padding: 28px 0 36px; }
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .hero-lede { font-size: .96rem; line-height: 1.6; }
  .hero-points { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* stack collage single col */
  .hero-collage { grid-template-columns: 1fr; gap: 12px; }
  .hero-collage .p3 { grid-column: auto; width: 88% !important; }

  /* stats single col on very small? keep 2x2 until 480 */
  .gallery .tile { border-radius: 12px; }
  .gallery .tile .label { opacity: 1; transform: translateY(0); font-size: 1rem; padding: 10px 12px; }

  .mission-strip { padding: 16px 12px; }
  .mission-strip .quote { font-size: 1rem; line-height: 1.5; }

  .sticker { font-size: 1.15rem; padding: 5px 12px; }

  .event { grid-template-columns: 1fr; gap: 10px; }
  .event .date { display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .event .date .d { font-size: 1.6rem; }
  .event .date .m { font-size: .98rem; }

  /* disclosure table scroll hint */
  .dl-section table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .dl-section table th, .dl-section table td { white-space: nowrap; }

  /* forms */
  input, textarea, select { font-size: 16px; /* prevents iOS zoom */ padding: 12px 14px; }

  /* CTA sections padding */
  section[style*="linear-gradient"] { padding: 52px 0 !important; }
  section[style*="linear-gradient"] h2 { font-size: clamp(1.6rem, 7vw, 2rem); line-height: 1.2; }
}

/* ---------- 480px: small phone ---------- */
@media (max-width: 480px) {
  .container { width: min(100% - 16px, var(--maxw)); }
  section { padding: 36px 0; }

  .nav { gap: 10px; }
  .nav-wrap { border-bottom-width: 1px; }

  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }

  .polaroid::before { width: 72px; height: 20px; top: -10px; }

  .stats .grid-4 { grid-template-columns: 1fr; gap: 0; }
  .stats .stat { padding: 18px 8px; border-bottom: 1px solid rgba(246,239,225,.14); }
  .stats .stat:last-child { border-bottom: 0; padding-bottom: 4px; }
  .stats .stat:first-child { padding-top: 4px; }

  .card { padding: 18px 16px; }
  .grid-2, .grid-3, .grid-4 { gap: 14px; }

  .t-wide, .t-big, .t-tall, .t-sq { grid-column: span 12 !important; aspect-ratio: 4/3; }
  .gallery { gap: 10px; }
  /* home symmetrical gallery stacks to 1-col on small phones */
  .gallery-home { grid-template-columns: 1fr; gap: 10px; }
  .gallery-home .tile { grid-column: auto !important; aspect-ratio: 4/3; }

  .page-hero { padding: 32px 0 28px; }
  .page-hero h1 { font-size: clamp(1.7rem, 8.5vw, 2.1rem); }
  .page-hero .lead { font-size: .94rem; }

  .section-head { margin-bottom: 28px; }

  .btn { width: auto; }
  /* make CTA buttons full width on tiny screens */
  section[style*="linear-gradient"] .btn { width: 100%; justify-content: center; }
  section[style*="linear-gradient"] div[style*="display:flex"] { flex-direction: column; align-items: stretch; }

  /* contact page: about split already 1fr */

  /* footer */
  .footer-grid { gap: 24px; }
  .footer h4 { font-size: 1rem; }

  /* lightbox img */
  .lightbox img { max-width: 96vw; max-height: 76vh; }
}

/* ---------- 360px: extra small ---------- */
@media (max-width: 360px) {
  .container { width: min(100% - 12px, var(--maxw)); }
  .brand { gap: 8px; }
  .brand-text .name { font-size: .96rem; }
  .hero h1 { font-size: 1.75rem; }
  .marquee-track { font-size: .92rem; }
}

/* ---------- helpers ---------- */
/* Ensure any flex CTA wrapping behaves on mobile */
@media (max-width: 768px) {
  div[style*="display:flex"][style*="justify-content:center"] {
    flex-wrap: wrap !important;
  }
}

/* Prevent 100vw overflow from absolute blobs */
.hero::before, .hero::after, .page-hero::after, .stats::before { max-width: 100vw; }

/* Make tables scrollable on mobile */
@media (max-width: 768px) {
  div[style*="overflow-x:auto"] { -webkit-overflow-scrolling: touch; }
  table { font-size: .9rem; }
}

/* Fix inline paddings / widths on mobile */
@media (max-width: 768px) {
  div[style*="max-width:800px"] { max-width: 100% !important; padding: 22px 18px !important; }
  div[style*="max-width:700px"] { max-width: 100% !important; padding: 22px 18px !important; }
  section[style*="padding:70px"] , section[style*="padding:80px"] { padding: 48px 0 !important; }
  div[style*="position:relative"] { min-width: 0; }
}
/* Fix gaps for sections with inline padding */
@media (max-width: 640px) {
  section[style*="padding:70px"] , section[style*="padding:80px"] { padding: 48px 0 !important; }
}

/* Desktop: compact nav for 981-1200px so 9 links fit in one line */
@media (min-width: 981px) and (max-width: 1180px) {
  .nav { gap: 10px; padding: 12px 0; }
  .brand-text .name { font-size: 1.02rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 8px; font-size: .88rem; }
  .nav-cta .btn { padding: 8px 14px; font-size: .8rem; }
}

/* Desktop: reset mobile nav states */
@media (min-width: 981px) {
  .nav-toggle { display: none !important; }
  .nav-links { position: static; transform: none !important; opacity: 1 !important; pointer-events: auto !important; flex-direction: row; align-items: center; background: transparent; border: 0; padding: 0; box-shadow: none; max-height: none; overflow: visible; backdrop-filter: none; }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links li { width: auto; }
  .nav-links a { display: inline-block; padding: 8px 12px; font-size: .96rem; }
  .nav-links a::after { content: none !important; }
  body.nav-open { overflow: visible; }
  body.nav-open::before { display: none; content: none; }
}
@media (min-width: 981px) and (max-width: 1180px) {
  .nav-links a { padding: 7px 8px; font-size: .88rem; }
}

