:root {
    --olive: #6B7B3C;
    --olive-deep: #55622F;
    --olive-soft: rgba(107, 123, 60, 0.12);
    --brown: #5C4033;
    --ink: #4A3A30;
    --text: #6B5B4F;
    --gold: #C9A961;
    --cream: #FAF7F2;
    --sand: #F2ECE1;
    --white: #FFFFFF;
    --line: rgba(92, 64, 51, 0.12);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Outfit', system-ui, sans-serif;
    --radius: 20px;
    --shadow: 0 8px 30px rgba(92, 64, 51, 0.08);
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 96px; }
  body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--cream); font-weight: 300; line-height: 1.65; font-size: 17px; }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  h1, h2, h3 { font-family: var(--serif); color: var(--brown); line-height: 1.1; margin: 0 0 0.5em; font-weight: 700; }
  h2 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
  h3 { font-size: 1.6rem; font-weight: 600; }
  p { margin: 0 0 1em; }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
  section { padding: 96px 0; }
  .eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--olive-soft); color: var(--olive); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }
  .lead { font-size: 1.2rem; max-width: 680px; }
  .center { text-align: center; }
  .center .lead { margin-left: auto; margin-right: auto; }

  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font-family: var(--sans); font-size: 1rem; font-weight: 500; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
  .btn-primary { background: var(--olive); color: var(--cream); }
  .btn-primary:hover { background: var(--olive-deep); }
  .btn-outline { border-color: var(--gold); color: var(--brown); background: transparent; }
  .btn-light { background: var(--white); color: var(--brown); }
  .btn-sm { padding: 10px 20px; font-size: 0.9rem; }
  .btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
  .center .btn-row { justify-content: center; }

  /* Nav */
  .nav { position: fixed; inset: 0 0 auto 0; z-index: 50; background: rgba(250, 247, 242, 0.95); backdrop-filter: blur(10px); transition: box-shadow .3s; }
  .nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 88px; }
  .brand { display: flex; align-items: center; gap: 12px; }
  .brand img { height: 64px; width: auto; }
  .nav-links { display: flex; align-items: center; gap: 28px; }
  .nav-links a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--text); }
  .nav-links a:not(.btn):hover { color: var(--olive); }
  .menu-btn { display: none; background: none; border: 0; color: var(--brown); padding: 8px; cursor: pointer; }
  @media (max-width: 960px) {
    .menu-btn { display: block; }
    .nav-links { position: absolute; top: 88px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); padding: 8px 20px 20px; border-bottom: 1px solid var(--line); display: none; }
    .nav-links.open { display: flex; }
    .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
    .nav-links .btn { margin-top: 16px; }
  }

  /* Hero */
  .hero { position: relative; min-height: 92vh; display: flex; align-items: center; padding: 140px 0 80px; overflow: hidden; }
  .hero::before { content: ""; position: absolute; inset: 0; background: url("/images/gallery/herohelp1.jpg") center/cover; opacity: 0.35; }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,247,242,0.4), var(--cream)); }
  .hero .wrap { position: relative; z-index: 1; text-align: center; }
  .hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); margin-bottom: 20px; }
  .hero h1 span { color: var(--olive); display: block; }
  .hero .lead { margin: 0 auto 36px; font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
  .trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 40px; font-size: 0.9rem; font-weight: 500; color: var(--brown); }
  .trust span::before { content: "✓ "; color: var(--olive); }

  /* Mission */
  .mission { background: var(--white); }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  @media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }
  .photo { aspect-ratio: 1 / 1; border-radius: 28px; background-size: cover; background-position: center; position: relative; }
  .photo-badge { position: absolute; left: -16px; bottom: -20px; background: var(--white); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
  @media (max-width: 860px) { .photo-badge { left: 16px; } }
  .photo-badge strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--brown); line-height: 1.1; }
  .photo-badge small { font-size: 0.85rem; }
  .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
  .chip { background: var(--cream); color: var(--brown); padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; }
  .chip::before { content: "✓ "; color: var(--olive); }

  /* Model */
  .model { background: var(--sand); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; counter-reset: step; }
  @media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
  .step { background: var(--white); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); position: relative; }
  .step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--olive); color: var(--cream); font-weight: 600; margin-bottom: 18px; }
  .step h3 { font-size: 1.5rem; }
  .step p { margin: 0; }
  .model-note { margin-top: 36px; font-size: 1.05rem; }

  /* Cards */
  .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  @media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
  .card { background: var(--white); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
  .card h3 { margin-bottom: 0.35em; }
  .card p { flex: 1; }
  .card .tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
  .card ul { margin: 0 0 1.2em; padding-left: 1.1em; }
  .card li { margin-bottom: 4px; }
  .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--olive-soft); color: var(--olive); display: grid; place-items: center; margin-bottom: 18px; }
  .icon svg { width: 24px; height: 24px; }

  /* Feature programs */
  .feature { padding: 88px 0; }
  .feature.alt { background: var(--white); }
  .olive-pattern { background-color: var(--cream); background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%236B7B3C' fill-opacity='0.07'%3E%3Cpath d='M30 30c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10zm-20 0c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/svg%3E"); }
  .gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; }
  .gallery a:first-child { margin-top: 40px; }
  .partner-badge { display: inline-flex; align-items: center; gap: 14px; background: var(--brown); border-radius: 16px; padding: 14px 20px; text-decoration: none; color: var(--cream); font-size: 0.9rem; font-weight: 500; }
  .partner-badge img { height: 56px; width: auto; }
  .small-note { font-size: 0.9rem; color: #7a6a5e; }

  /* Services */
  .services { background: var(--white); }
  .services .card { background: var(--cream); box-shadow: none; border: 1px solid var(--line); }

  /* Cornerstone */
  .cornerstone { background: var(--brown); color: rgba(250,247,242,0.85); }
  .cornerstone h2, .cornerstone h3 { color: var(--cream); }
  .cornerstone .eyebrow { background: rgba(201,169,97,0.2); color: var(--gold); }
  .cornerstone .card { background: rgba(250,247,242,0.06); box-shadow: none; border: 1px solid rgba(250,247,242,0.14); color: rgba(250,247,242,0.85); }
  .cornerstone .card .tag { color: var(--gold); }
  .callout { margin-top: 40px; padding: 28px 30px; border-radius: var(--radius); background: rgba(201,169,97,0.14); border: 1px solid rgba(201,169,97,0.4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
  .callout p { margin: 0; max-width: 640px; color: var(--cream); }

  /* School vision */
  .vision { background: var(--sand); }
  .vision blockquote { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--brown); line-height: 1.3; margin: 0 auto 24px; max-width: 820px; font-style: italic; }

  /* Sponsors */
  .logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 36px 56px; margin-top: 40px; }
  .logos img { height: 72px; width: auto; filter: grayscale(100%); opacity: 0.65; transition: all .3s; }
  .logos img:hover { filter: none; opacity: 1; transform: translateY(-3px); }

  /* Testimonial */
  .testimonial { position: relative; overflow: hidden; text-align: center; }
  .testimonial::before { content: ""; position: absolute; inset: 0; background: url("/images/emandmatt2.png") center/cover; opacity: 0.18; }
  .testimonial .wrap { position: relative; }
  .testimonial blockquote { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--brown); line-height: 1.25; margin: 0 auto 24px; max-width: 860px; }
  .testimonial cite { font-style: normal; font-weight: 600; color: var(--olive); display: block; }

  /* Get involved */
  .involve { background: var(--white); }
  .tiers { margin-top: 64px; }
  .tier { border-radius: var(--radius); padding: 32px 28px; background: var(--cream); }
  .tier.featured { background: var(--white); border: 2px solid var(--gold); box-shadow: 0 12px 35px rgba(201,169,97,0.22); }
  .tier .price { color: var(--gold); font-weight: 600; margin-bottom: 16px; }
  .tier ul { list-style: none; padding: 0; margin: 0; }
  .tier li { padding: 6px 0; border-bottom: 1px solid var(--line); }
  .tier li::before { content: "✓ "; color: var(--olive); }

  /* Donate */
  .donate { background: linear-gradient(135deg, var(--cream), var(--sand)); }
  .donate-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
  @media (max-width: 900px) { .donate-grid { grid-template-columns: 1fr; } }
  .donate-frame { background: var(--white); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); }
  .donate-frame iframe { width: 100%; height: 800px; border: 0; display: block; }
  .give-list { list-style: none; padding: 0; margin: 24px 0; }
  .give-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .give-list strong { color: var(--brown); font-weight: 600; }

  /* Newsletter */
  .newsletter { background: var(--olive); color: var(--cream); padding: 72px 0; }
  .newsletter h2 { color: var(--cream); font-size: clamp(1.9rem, 4vw, 2.6rem); }
  .newsletter .split { gap: 40px; }
  .ml-form-embedContainer .row-form form { display: flex; gap: 12px; flex-wrap: wrap; }
  .ml-form-embedContainer input[type=email] { flex: 1 1 240px; padding: 15px 20px; border-radius: 999px; border: 0; font-family: var(--sans); font-size: 1rem; }
  .ml-form-embedSubmit button.primary { background: var(--gold); color: var(--brown); border: 0; }
  .ml-form-embedSubmit button.loading { display: none; }
  .ml-form-successBody h4 { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 6px; color: var(--cream); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

  /* Footer */
  footer { background: var(--brown); color: rgba(250,247,242,0.7); padding: 64px 0 32px; font-size: 0.95rem; }
  .foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
  @media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
  footer h4 { color: var(--cream); font-family: var(--sans); font-weight: 600; margin: 0 0 14px; font-size: 1rem; }
  footer ul { list-style: none; padding: 0; margin: 0; }
  footer li { margin-bottom: 8px; }
  footer a { text-decoration: none; }
  footer a:hover { color: var(--cream); }
  .foot-brand { font-family: var(--serif); font-size: 1.6rem; color: var(--cream); font-weight: 600; margin-bottom: 10px; }
  .foot-bottom { border-top: 1px solid rgba(250,247,242,0.12); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: rgba(250,247,242,0.5); }

  /* Reveal (only when JS is running) */
  .js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
  .js .reveal.active { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn:hover, .logos img:hover { transform: none; }
  }

  /* Page header (inner pages) */
  .page-head { padding: 160px 0 72px; background: var(--sand); text-align: center; }
  .page-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
  .page-head .lead { margin: 0 auto; }
  /* Teaser strip */
  .teaser { background: var(--olive); color: var(--cream); padding: 56px 0; }
  .teaser .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
  .teaser h2 { color: var(--cream); font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; }
  .teaser p { margin: 0; max-width: 620px; }
  .nav-links a[aria-current="page"] { color: var(--olive); }

/* ===== Feature cards (homepage) ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr; } }
.feature-card { position: relative; display: block; width: 100%; min-height: 460px; border: 0; padding: 0; border-radius: 28px; overflow: hidden; cursor: pointer; text-align: left; background: var(--brown) center/cover no-repeat; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s; font: inherit; color: var(--cream); }
@media (max-width: 960px) { .feature-card { min-height: 340px; } }
.feature-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,28,22,0) 30%, rgba(40,28,22,0.85) 100%); transition: background .35s; }
.feature-card:hover, .feature-card:focus-visible { transform: translateY(-6px); box-shadow: 0 20px 45px rgba(92,64,51,0.22); }
.feature-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.feature-card .fc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 28px; }
.feature-card .fc-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(201,169,97,0.9); color: var(--brown); padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.feature-card h3 { color: var(--cream); font-size: 2.1rem; margin: 0 0 6px; }
.feature-card p { margin: 0 0 16px; color: rgba(250,247,242,0.85); }
.feature-card .fc-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.feature-card .fc-more span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--brown); font-size: 1.2rem; line-height: 1; transition: transform .3s; }
.feature-card:hover .fc-more span { transform: rotate(90deg); }

/* ===== Slide-out drawer ===== */
dialog.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(560px, 100%); max-width: 100%; padding: 0; border: 0; background: var(--cream); color: var(--text); box-shadow: -10px 0 40px rgba(0,0,0,0.2); }
dialog.drawer[open] { animation: drawer-in .45s cubic-bezier(.22,1,.36,1); }
dialog::backdrop { background: rgba(40, 28, 22, 0.55); backdrop-filter: blur(2px); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-inner { min-height: 100%; display: flex; flex-direction: column; }
.drawer-hero { height: 240px; background: var(--brown) center/cover no-repeat; position: relative; flex-shrink: 0; }
.drawer-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream); color: var(--brown); font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow); }
.drawer-body { padding: 32px 32px 40px; }
.drawer-body h2 { font-size: 2.4rem; }
.drawer-body .btn-row { margin-top: 24px; }
.drawer-list { list-style: none; padding: 0; margin: 20px 0; }
.drawer-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.drawer-list strong { display: block; color: var(--brown); font-weight: 600; }
.drawer .gallery a:first-child { margin-top: 0; }
.drawer .partner-badge { margin-top: 8px; }
.home-note { background: var(--olive-soft); border-radius: 16px; padding: 18px 20px; margin-top: 20px; color: var(--brown); }

/* ===== Sponsor tiers (compact) ===== */
.mini-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px auto 0; max-width: 860px; }
@media (max-width: 700px) { .mini-tiers { grid-template-columns: 1fr; } }
.mini-tier { background: var(--white); border-radius: 18px; padding: 22px; text-align: center; box-shadow: var(--shadow); }
.mini-tier strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--brown); }
.mini-tier span { color: var(--gold); font-weight: 600; font-size: 0.95rem; }

/* ===== Volunteer ===== */
.volunteer { background: var(--white); }

/* ===== Enquiry modal ===== */
dialog.modal { width: min(620px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 24px; background: var(--cream); color: var(--text); box-shadow: 0 30px 60px rgba(0,0,0,0.25); }
dialog.modal[open] { animation: modal-in .35s cubic-bezier(.22,1,.36,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.modal-inner { padding: 36px 32px 32px; position: relative; }
.modal-inner .drawer-close { top: 14px; right: 14px; box-shadow: none; background: var(--sand); }
.modal-inner h2 { font-size: 2.2rem; margin-right: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--brown); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(92,64,51,0.2); background: var(--white); font-family: var(--sans); font-size: 1rem; color: var(--ink); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--olive); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 12px; display: none; }
.form-status.ok { display: block; background: var(--olive-soft); color: var(--olive-deep); }
.form-status.err { display: block; background: rgba(180, 60, 40, 0.1); color: #8a2e1c; }
.form-actions { margin-top: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions small { color: #7a6a5e; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

body.locked { overflow: hidden; }
