:root {
  --navy: #082f4d;
  --navy-deep: #05243a;
  --green: #0d4935;
  --green-deep: #063729;
  --green-black: #04271f;
  --gold: #c98f28;
  --gold-light: #e3b34f;
  --cream: #f7f2e7;
  --cream-deep: #e9dfcc;
  --ink: #18312b;
  --muted: #5b625d;
  --white: #fff;
  --shadow: 0 18px 50px rgba(1, 27, 20, .22);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --container: 1380px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.section { padding: 72px 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 9999; top: 12px; left: 12px; transform: translateY(-150%); background: var(--white); color: var(--navy); padding: 12px 16px; font-weight: 700; border-radius: 4px; }
.skip-link:focus { transform: translateY(0); }

.top-pattern,
.footer-pattern {
  height: 20px;
  background-color: var(--green-deep);
  background-image:
    linear-gradient(45deg, transparent 38%, var(--gold) 38% 45%, transparent 45% 55%, var(--gold) 55% 62%, transparent 62%),
    linear-gradient(-45deg, transparent 38%, var(--gold) 38% 45%, transparent 45% 55%, var(--gold) 55% 62%, transparent 62%);
  background-size: 42px 20px;
  border-bottom: 2px solid var(--gold);
}

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(250, 247, 239, .96); border-bottom: 1px solid rgba(8,47,77,.18); backdrop-filter: blur(10px); transition: box-shadow .2s ease; }
.site-header.scrolled { box-shadow: 0 8px 25px rgba(4, 34, 25, .13); }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: max-content; }
.brand-emblem { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(3, 34, 26, .16)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-family: var(--serif); font-size: clamp(20px, 2vw, 31px); letter-spacing: .055em; color: var(--navy); }
.brand-copy span { margin-top: 7px; font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--green); }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); }
.main-nav > a { position: relative; text-decoration: none; text-transform: uppercase; font-size: 12px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.main-nav > a:not(.nav-apply)::after { content: ""; position: absolute; height: 2px; left: 50%; right: 50%; bottom: -11px; background: var(--gold); transition: left .2s, right .2s; }
.main-nav > a:hover::after,
.main-nav > a:focus-visible::after,
.main-nav > a.active::after { left: 0; right: 0; }
.nav-apply { display: inline-flex; align-items: center; gap: 7px; padding: 13px 19px; background: var(--gold); color: var(--white) !important; border-radius: 3px; box-shadow: 0 8px 18px rgba(138, 85, 5, .2); transition: transform .2s, background .2s; }
.nav-icon { width: 17px; height: 17px; fill: currentColor; }
.nav-apply:hover { background: #b37a1c; transform: translateY(-2px); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--navy); font-weight: 800; align-items: center; gap: 10px; cursor: pointer; }
.menu-bars { width: 27px; display: grid; gap: 5px; }
.menu-bars i { display: block; height: 3px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }

.hero { position: relative; min-height: 570px; overflow: hidden; color: var(--white); background: url("../images/meduxnekeag-river.jpg") center 47% / cover no-repeat; border-bottom: 3px solid var(--gold); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 39, 30, .96) 0%, rgba(3, 44, 33, .84) 36%, rgba(3, 43, 32, .34) 69%, rgba(4, 35, 28, .18) 100%), linear-gradient(0deg, rgba(2, 29, 23, .25), transparent 48%); }
.hero-grid { position: relative; z-index: 1; min-height: 570px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px; padding-block: 54px; }
.hero-copy { max-width: 700px; }
.eyebrow { margin: 0 0 14px; color: var(--gold-light); font-size: 14px; font-weight: 900; letter-spacing: .12em; }
.eyebrow span { padding-inline: 5px; font-size: 9px; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(52px, 5vw, 80px); line-height: .96; letter-spacing: .018em; color: var(--cream); text-shadow: 0 4px 20px rgba(0,0,0,.25); }
.hero h1 em { display: inline-block; margin-top: 7px; color: var(--gold-light); font-style: normal; }
.hero-intro { max-width: 640px; margin: 22px 0 0; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.95); text-shadow: 0 2px 9px rgba(0,0,0,.28); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border: 2px solid transparent; border-radius: 3px; text-decoration: none; text-transform: uppercase; font-size: 13px; font-weight: 900; letter-spacing: .03em; transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s; }
.button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(0,0,0,.18); }
.button:focus-visible, .main-nav a:focus-visible, .contact-item:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.button-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.button-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--green-black); }
.button-outline { color: var(--white); border-color: var(--gold-light); background: rgba(3, 37, 29, .38); }
.button-outline:hover { background: var(--white); border-color: var(--white); color: var(--green-deep); }
.button-green { background: var(--green); border-color: var(--green); color: var(--white); }
.button-green:hover { background: var(--green-deep); border-color: var(--green-deep); }
.hero-emblem-wrap { display: flex; align-items: center; justify-content: center; }
.hero-emblem { width: min(440px, 90%); filter: drop-shadow(0 22px 30px rgba(0, 20, 15, .5)); animation: emblem-in .7s ease-out both; }
@keyframes emblem-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.medicines { padding-top: 34px; padding-bottom: 38px; background: radial-gradient(circle at center, #fffdf7 0, var(--cream) 70%); border-bottom: 1px solid #d8c8a6; }
.ornament-heading { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 25px; }
.ornament-heading span { width: 90px; height: 1px; background: var(--gold); position: relative; }
.ornament-heading span::after { content: "◆"; position: absolute; top: 50%; color: var(--gold); font-size: 10px; transform: translateY(-53%); }
.ornament-heading span:first-child::after { right: -3px; }
.ornament-heading span:last-child::after { left: -3px; }
.ornament-heading h2 { margin: 0; text-align: center; font-family: var(--serif); color: var(--green-deep); font-size: clamp(20px, 2.2vw, 29px); letter-spacing: .04em; }
.medicine-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.medicine-card { min-width: 0; display: grid; grid-template-columns: 43% 57%; align-items: center; gap: 10px; padding: 10px 22px; border-right: 1px solid rgba(201,143,40,.58); }
.medicine-card:last-child { border-right: 0; }
.medicine-art { height: 148px; display: flex; align-items: center; justify-content: center; }
.medicine-art img { max-height: 138px; width: 100%; object-fit: contain; filter: drop-shadow(0 7px 5px rgba(54, 54, 31, .12)); }
.medicine-card h3 { margin: 0 0 2px; font-family: var(--serif); color: var(--green-deep); font-size: 21px; }
.medicine-card h4 { margin: 0 0 8px; color: var(--green); font-size: 11px; line-height: 1.3; }
.medicine-card p { margin: 0; font-size: 13px; line-height: 1.45; color: #243b35; }

.mission-certification { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 285px; }
.mission-panel { position: relative; overflow: hidden; background: var(--cream); }
.mission-trees { position: absolute; inset: 0; opacity: .16; background: linear-gradient(90deg, rgba(13,73,53,.7), transparent 58%), repeating-linear-gradient(110deg, transparent 0 18px, rgba(13,73,53,.22) 19px 22px, transparent 23px 41px); clip-path: polygon(0 28%, 18% 8%, 34% 40%, 53% 16%, 72% 50%, 100% 34%, 100% 100%, 0 100%); }
.mission-content { position: relative; z-index: 1; max-width: 760px; margin-left: auto; padding: 39px 6% 35px; }
.section-label, .section-kicker { margin: 0 0 2px; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.mission-content h2, .living h2, .resources h2 { margin: 0 0 10px; font-family: var(--serif); color: var(--navy); font-size: clamp(29px, 3vw, 42px); line-height: 1.1; }
.mission-content > p:not(.mission-quote) { margin: 0; max-width: 720px; font-size: 14px; line-height: 1.5; }
.mission-quote { margin: 16px 0 0; font-family: var(--serif); color: var(--green-deep); font-size: 15px; font-weight: 900; line-height: 1.28; }
.certification-panel { display: flex; align-items: center; gap: 32px; padding: 32px 7%; color: var(--white); background: linear-gradient(120deg, #0c4a34, #073a2c 70%, #062d24); }
.marr-logo-card { width: 170px; min-width: 170px; text-align: center; background: var(--white); border-radius: 50%; aspect-ratio: 1; border: 4px solid var(--gold); outline: 3px solid var(--cream); padding: 25px 18px 12px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); overflow: hidden; }
.marr-logo-card img { width: 100%; height: auto; }
.marr-logo-card span { margin-top: 2px; color: var(--navy); font-family: var(--serif); font-weight: 900; font-size: 13px; text-transform: uppercase; }
.certification-copy { max-width: 440px; }
.certification-copy .section-label { color: var(--gold-light); font-size: 16px; }
.certification-copy p:nth-child(2) { margin: 8px 0 12px; line-height: 1.5; font-size: 14px; }
.certification-copy a { color: var(--gold-light); font-size: 13px; font-weight: 900; text-transform: uppercase; text-underline-offset: 4px; }

.living { background: #fffdf8; }
.living .section-kicker { text-align: center; }
.living > .container > h2 { text-align: center; }
.section-intro { max-width: 820px; margin: 0 auto 36px; text-align: center; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { padding: 27px 24px; background: var(--cream); border-top: 4px solid var(--gold); box-shadow: 0 9px 25px rgba(26,47,40,.08); }
.feature-icon { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: var(--gold-light); font-family: var(--serif); font-weight: 900; font-size: 18px; }
.feature-card h3 { margin: 14px 0 7px; font-family: var(--serif); color: var(--navy); font-size: 20px; }
.feature-card p { margin: 0; font-size: 14px; color: #4e5954; }

.admissions-strip { padding: 22px 0; background: linear-gradient(90deg, #f6f1e6, #fffdf9, #f3ecdf); border-top: 1px solid #dacaa9; border-bottom: 1px solid #dacaa9; }
.admissions-grid { display: grid; grid-template-columns: 80px 1.15fr 1fr .72fr; gap: 24px; align-items: center; }
.admissions-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--white); }
.admissions-icon svg { width: 35px; height: 35px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.admissions-grid h2 { margin: 0 0 1px; color: var(--green-deep); font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.admissions-grid p { margin: 0; font-size: 14px; }
.admissions-button { text-align: center; }

.resources { background: var(--cream); }
.resources-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.resources-grid > div:first-child > p:last-child { max-width: 760px; color: var(--muted); }
.resources-actions { border-left: 3px solid var(--gold); padding-left: 32px; }
.resources-actions p { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

.contact-bar { background: linear-gradient(90deg, #083f31, #052c24); color: var(--white); border-bottom: 2px solid var(--gold); }
.contact-grid { min-height: 92px; display: grid; grid-template-columns: 1fr .8fr 1.3fr 1.3fr; align-items: stretch; }
.contact-item { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 18px 24px; border-right: 1px solid rgba(255,255,255,.32); text-decoration: none; font-size: 13px; }
.contact-item:last-child { border-right: 0; }
.contact-item svg { width: 39px; height: 39px; flex: 0 0 auto; fill: none; stroke: var(--gold-light); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact-item span { overflow-wrap: anywhere; }
.contact-item small { display: block; color: var(--gold-light); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.contact-item a { color: var(--white); text-decoration: none; }
a.contact-item:hover, .contact-item a:hover { color: var(--gold-light); }

.site-footer { background: var(--green-deep); color: var(--cream); text-align: center; }
.footer-pattern { border-top: 0; border-bottom: 0; }
.footer-inner { padding: 12px 0 22px; }
.footer-inner p { margin: 0 0 4px; color: var(--gold-light); font-family: var(--serif); font-size: clamp(18px, 2vw, 26px); font-weight: 900; letter-spacing: .05em; }
.footer-inner small { display: block; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.footer-inner small span { color: var(--gold); padding-inline: 10px; }
.footer-inner .copyright { margin-top: 11px; opacity: .68; font-size: 9px; }

@media (max-width: 1220px) {
  .header-inner { min-height: 82px; }
  .brand-emblem { width: 68px; height: 68px; }
  .brand-copy strong { font-size: 23px; }
  .main-nav { gap: 13px; }
  .main-nav > a { font-size: 10px; }
  .nav-apply { padding: 11px 13px; }
  .hero-grid { grid-template-columns: 1fr .72fr; }
  .medicine-grid { grid-template-columns: repeat(2, 1fr); row-gap: 15px; }
  .medicine-card:nth-child(2) { border-right: 0; }
  .medicine-card:nth-child(-n+2) { border-bottom: 1px solid rgba(201,143,40,.45); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .admissions-grid { grid-template-columns: 70px 1fr 1fr; }
  .admissions-grid .button-green { grid-column: 2 / 4; justify-self: start; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-item:nth-child(2) { border-right: 0; }
  .contact-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.25); }
}

@media (max-width: 920px) {
  html { scroll-padding-top: 86px; }
  .top-pattern { height: 14px; background-size: 34px 16px; }
  .site-header { position: sticky; }
  .header-inner { min-height: 72px; }
  .brand-emblem { width: 58px; height: 58px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy span { font-size: 10px; }
  .menu-toggle { display: flex; }
  .main-nav { position: absolute; display: none; top: 100%; left: 0; right: 0; padding: 14px 20px 24px; background: rgba(250,247,239,.99); border-bottom: 3px solid var(--gold); box-shadow: 0 20px 35px rgba(0,0,0,.15); flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 13px 8px; font-size: 13px; border-bottom: 1px solid rgba(8,47,77,.1); }
  .main-nav > a::after { display: none; }
  .nav-apply { margin-top: 10px; text-align: center; border-bottom: 0 !important; }
  .menu-toggle[aria-expanded="true"] .menu-bars i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars i:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-bars i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 62px; }
  .hero-copy { max-width: 730px; }
  .hero-emblem-wrap { position: absolute; right: 1%; bottom: -40px; opacity: .22; }
  .hero-emblem { width: 380px; }
  .mission-certification { grid-template-columns: 1fr; }
  .mission-content { max-width: none; margin: 0; }
  .certification-panel { justify-content: center; }
  .resources-grid { grid-template-columns: 1fr; gap: 30px; }
  .resources-actions { border-left: 0; border-top: 3px solid var(--gold); padding: 25px 0 0; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, var(--container)); }
  .section { padding: 54px 0; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy span { letter-spacing: .07em; }
  .menu-toggle-label { display: none; }
  .hero { min-height: auto; background-position: 57% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(3,39,30,.97), rgba(3,44,33,.78)); }
  .hero-grid { padding-block: 52px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .eyebrow { font-size: 11px; line-height: 1.6; }
  .hero-intro { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .hero-emblem-wrap { display: none; }
  .ornament-heading span { display: none; }
  .ornament-heading h2 { font-size: 21px; }
  .medicine-grid { grid-template-columns: 1fr; }
  .medicine-card { grid-template-columns: 120px 1fr; padding: 17px 4px; border-right: 0; border-bottom: 1px solid rgba(201,143,40,.45); }
  .medicine-card:last-child { border-bottom: 0; }
  .medicine-art { height: 112px; }
  .medicine-art img { max-height: 110px; }
  .certification-panel { flex-direction: column; text-align: center; padding: 42px 28px; }
  .marr-logo-card { width: 145px; min-width: 145px; }
  .feature-grid { grid-template-columns: 1fr; }
  .admissions-grid { grid-template-columns: 58px 1fr; gap: 14px; }
  .admissions-grid .button { grid-column: 1 / -1; width: 100%; }
  .admissions-grid .button-green { grid-column: 1 / -1; justify-self: stretch; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-item { justify-content: flex-start; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.22); }
  .contact-item:last-child { border-bottom: 0; }
  .footer-inner small { line-height: 2; }
  .footer-inner small span { padding-inline: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
