/* Jim Wagner Golf Design  |  site.css
   One stylesheet for every page. Edit the tokens in :root to change
   colours, fonts and spacing across the site. */

/* Fonts (self-hosted, SIL Open Font License): Outfit for headings, Mulish for text */
@font-face { font-family: "Outfit"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/mulish-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/mulish-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/mulish-latin-600-normal.woff2") format("woff2"); }

:root {
  --navy: #1d2740;          /* brand navy, from the JW seal */
  --navy-deep: #141b2e;
  --green: #2f7a4f;         /* fairway green, buttons and accents */
  --green-dark: #23603d;
  --sage: #d5e6da;          /* soft panel colour */
  --sand: #f6f3ed;
  --white: #ffffff;
  --ink: #1d2740;
  --muted: #5d667a;
  --line: rgba(29, 39, 64, 0.14);

  --font-head: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Mulish", "Helvetica Neue", Arial, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(64px, 9vw, 128px);
  --header-h: 92px;
  --radius: 0px;
  --shadow: 0 30px 80px -30px rgba(20, 27, 46, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5.4rem); }
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); }
h4 { font-size: 1rem; letter-spacing: 0.12em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(880px + 2 * var(--gutter)); }
.section { padding: var(--section) 0; }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}
.lead { font-size: clamp(1.1rem, 0.4vw + 1rem, 1.35rem); line-height: 1.75; }

/* Hand-drawn stroke under headings */
.stroke { display: block; width: 72px; height: 12px; margin: 0.35em 0 0; color: var(--green); }
.center .stroke { margin-left: auto; margin-right: auto; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  padding: 0.85em 1.4em; border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-deep); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.8); }
.btn--ghost:hover { background: #fff; color: var(--navy); }

.more {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.more .ring {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border: 1.5px solid currentColor; border-radius: 50%;
  transition: transform 0.3s var(--ease), background-color 0.3s ease;
}
.more svg { width: 12px; height: 12px; }
.more:hover .ring { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  color: var(--navy);
  background: rgba(255,255,255,0.97);
  box-shadow: 0 10px 30px -18px rgba(20,27,46,0.45);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, height 0.35s ease, color 0.35s ease;
}
.has-hero .site-header:not(.is-solid) {
  background: linear-gradient(180deg, rgba(10,16,30,0.55), rgba(10,16,30,0));
  box-shadow: none; color: #fff;
}
.site-header.is-solid { --header-h: 76px; }
.header-inner {
  height: 100%; display: flex; align-items: center; gap: 24px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 64px; height: 64px; transition: width 0.35s ease, height 0.35s ease; }
.is-solid .brand img { width: 54px; height: 54px; }
.brand span {
  font-family: var(--font-head); font-weight: 600; font-size: 0.82rem; line-height: 1.2;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 500; font-size: 0.86rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 10px 10px; background: none; border: 0; color: inherit; cursor: pointer; white-space: nowrap;
}
.nav-link svg { width: 10px; height: 10px; transition: transform 0.25s ease; }
.nav-link[aria-current="page"], .nav-link.is-section { box-shadow: inset 0 -2px 0 var(--green); }
.nav-link:hover { color: var(--green); }
.has-hero .site-header:not(.is-solid) .nav-link:hover { color: #cfe6d6; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px;
  list-style: none; margin: 0; padding: 12px 0;
  background: #fff; color: var(--navy); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.dropdown a {
  display: block; padding: 9px 22px; text-decoration: none;
  font-size: 0.95rem; line-height: 1.35;
}
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--sage); }
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown, .has-drop.is-open .dropdown {
  opacity: 1; visibility: visible; transform: none;
}
.has-drop.is-open .nav-link svg { transform: rotate(180deg); }
.nav-cta { display: flex; gap: 10px; margin-left: 12px; }
.nav-cta .btn { white-space: nowrap; padding: 0.8em 1.15em; }
@media (max-width: 1380px) { .brand span { display: none; } }
.burger {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 0; background: none; color: inherit; cursor: pointer;
}
.burger span, .burger span::before, .burger span::after {
  display: block; width: 26px; height: 2px; background: currentColor; margin: 0 auto; position: relative;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -8px; } .burger span::after { top: 8px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(8px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 49; background: var(--navy); color: #fff;
  padding: calc(var(--header-h) + 16px) var(--gutter) 40px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open .site-header { background: var(--navy) !important; color: #fff !important; box-shadow: none !important; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu > ul > li { border-bottom: 1px solid rgba(255,255,255,0.14); }
.mobile-menu a, .mobile-menu button.sub-toggle {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 16px 0; color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; text-align: left;
}
.mobile-menu .sub { display: none; padding: 0 0 12px 14px; }
.mobile-menu .sub a { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1rem; padding: 9px 0; color: rgba(255,255,255,0.85); }
.mobile-menu li.is-open .sub { display: block; }
.mobile-menu .sub-toggle svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.mobile-menu li.is-open .sub-toggle svg { transform: rotate(180deg); }
.mobile-menu .cta-row { display: grid; gap: 12px; margin-top: 28px; }
.mobile-menu .cta-row .btn { font-size: 0.95rem; padding: 1em; }

@media (max-width: 1180px) {
  .nav, .nav-cta { display: none; }
  .burger { display: block; }
  :root { --header-h: 76px; }
  .brand img { width: 54px; height: 54px; }
}
@media (min-width: 1181px) { .mobile-menu { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 72vh; min-height: 72svh;
  display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate;
  background: var(--navy);
}
.hero--full { min-height: 100vh; min-height: 100svh; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero--full .hero__media img { animation: drift 24s ease-out both; }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(10,16,30,0.72) 0%, rgba(10,16,30,0.25) 45%, rgba(10,16,30,0.1) 70%, rgba(10,16,30,0.35) 100%);
}
.hero__content { width: 100%; padding-bottom: clamp(48px, 8vw, 110px); padding-top: calc(var(--header-h) + 40px); }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 0.3em; }
.hero--page h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.6rem); max-width: 18ch; }
.hero__sub {
  font-family: var(--font-head); font-weight: 500; font-size: clamp(0.85rem, 0.3vw + 0.8rem, 1.05rem);
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.9); max-width: 46ch;
}
.hero .stroke { color: #9fd3b0; width: 96px; margin-bottom: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Card that sits on the bottom edge of the home hero */
.hero-card {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 0;
  width: min(360px, calc(100% - 2 * var(--gutter)));
  background: var(--navy); color: #fff; padding: 26px 28px 24px; text-decoration: none;
  transition: background-color 0.3s ease;
}
.hero-card:hover { background: var(--green); }
.hero-card small { display: block; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #9fd3b0; }
.hero-card strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; line-height: 1.15; text-transform: uppercase; margin: 8px 0 6px; }
.hero-card span { font-size: 0.92rem; color: rgba(255,255,255,0.8); }
.hero-card:hover small { color: #fff; }
@media (min-width: 1400px) { .hero-card { right: calc((100% - var(--max)) / 2); } }
@media (max-width: 720px) {
  .hero--full { min-height: 92svh; }
  .hero--full .hero__content { padding-bottom: 170px; }
  .hero-card { left: var(--gutter); right: auto; }
}

/* ---------- Intro ---------- */
.intro { padding: var(--section) 0; }
.intro__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (min-width: 900px) { .intro__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.intro h2 { margin-bottom: 0; }
.intro .sig { width: 120px; margin-top: 28px; }

/* ---------- Navy band ---------- */
.band { background: var(--navy); color: rgba(255,255,255,0.86); text-align: center; padding: var(--section) 0; }
.band h2 { color: #fff; }
.band .stroke { color: #9fd3b0; margin-left: auto; margin-right: auto; }
.band p { max-width: 62ch; margin-left: auto; margin-right: auto; }
.band .seal { width: 76px; margin: 32px auto 0; opacity: 0.95; }
.band--lift { padding-bottom: calc(var(--section) + 160px); }
.band--lift + .tiles-wrap { margin-top: -160px; }

/* ---------- Feature tiles (image + coloured panel) ---------- */
.tiles-wrap { position: relative; z-index: 1; padding-bottom: var(--section); }
.tiles { box-shadow: var(--shadow); background: #fff; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .tile { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 440px; }
  .tile:nth-child(even) .tile__media { order: 2; }
}
.tile__media { position: relative; overflow: hidden; min-height: 260px; display: block; }
.tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover .tile__media img { transform: scale(1.04); }
.tile__body { padding: clamp(36px, 5.5vw, 76px); display: flex; flex-direction: column; justify-content: center; }
.tile__body h3 { margin-bottom: 0.35em; }
.tile__body h3 a { text-decoration: none; }
.tile__meta { margin-bottom: 0.4em; }
.tile__status {
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin-bottom: 1.4em;
}
.tile__body .more { margin-top: 1.2em; }
.tile--sage .tile__body { background: var(--sage); }
.tile--white .tile__body { background: #fff; }
.tile--navy .tile__body { background: var(--navy); color: rgba(255,255,255,0.86); }
.tile--navy h3 { color: #fff; }
.tile--navy .tile__status { color: #9fd3b0; }
.tile--navy .more { color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0.6em 0 0; padding: 0; }
.tags li {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 10px; border: 1px solid currentColor; opacity: 0.85;
}

/* ---------- Horizontal card scroller ---------- */
.scroller-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.scroller-head h2 { margin: 0; }
.scroller-head p { max-width: 54ch; margin: 12px 0 0; color: var(--muted); }
.scroller-btns { display: flex; gap: 10px; }
.scroller-btns button {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--navy); background: #fff; color: var(--navy);
  display: grid; place-items: center; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease;
}
.scroller-btns button:hover { background: var(--navy); color: #fff; }
.scroller-btns svg { width: 16px; height: 16px; }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  scrollbar-width: thin;
}
@media (min-width: 900px) { .scroller { grid-auto-columns: calc((100% - 60px) / 4); } }
.card { scroll-snap-align: start; text-decoration: none; display: block; }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card__img img { transform: scale(1.05); }
.card__num { display: block; margin-top: 18px; font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2em; color: var(--green); }
.card h3 { font-size: 1.15rem; margin: 6px 0 0; letter-spacing: 0.04em; }

/* ---------- Grids (portfolio, news) ---------- */
.group-head { margin: 0 0 32px; }
.group + .group { margin-top: clamp(64px, 8vw, 110px); }
.grid { display: grid; gap: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 32px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pcard { text-decoration: none; display: block; }
.pcard__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); position: relative; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
a.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard h3 { font-size: 1.2rem; letter-spacing: 0.03em; margin: 18px 0 4px; }
.pcard__loc { color: var(--muted); font-size: 0.95rem; margin: 0; }
.pcard__status { font-family: var(--font-head); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin: 8px 0 0; }
a.pcard .pcard__img::after {
  content: "View project"; position: absolute; left: 16px; bottom: 16px;
  font-family: var(--font-head); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  background: #fff; color: var(--navy); padding: 8px 12px; opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
a.pcard:hover .pcard__img::after, a.pcard:focus-visible .pcard__img::after { opacity: 1; transform: none; }

.ncard { background: var(--sand); display: flex; flex-direction: column; }
.ncard__img { aspect-ratio: 4 / 5; padding: 28px 28px 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ncard__img img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 18px 40px -18px rgba(20,27,46,0.55); }
.ncard__body { padding: 24px 28px 30px; background: #fff; flex: 1; border: 1px solid var(--line); border-top: 0; }
.ncard__src { font-family: var(--font-head); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin: 0; }
.ncard__date { color: var(--muted); font-size: 0.9rem; margin: 2px 0 10px; }
.ncard h3 { font-size: 1.2rem; letter-spacing: 0.03em; margin: 0 0 6px; }
.ncard__quote { margin: 0; font-style: italic; }

/* ---------- Course page ---------- */
.course-intro { padding: var(--section) 0 calc(var(--section) * 0.7); }
.course-intro__grid { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .course-intro__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.course-aside { display: grid; gap: 24px; align-content: start; }
.course-logos { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.course-logos img { max-height: 120px; width: auto; max-width: 220px; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts b { display: block; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.awards { background: var(--sage); padding: 22px 24px; }
.awards h4 { margin-bottom: 10px; }
.awards ul { margin: 0; padding-left: 1.1em; }
.awards li + li { margin-top: 6px; }
.course-body h2 { margin-bottom: 0.2em; }
.course-body .stroke { margin-bottom: 1.4em; }
.course-body .ext { margin-top: 1.6em; }

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 240px; } }
.gallery button { padding: 0; border: 0; background: var(--sand); cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .gallery button { aspect-ratio: auto; }
  .gallery button:first-child { grid-column: span 2; grid-row: span 2; }
  .gallery--1 { grid-template-columns: 1fr; grid-auto-rows: 560px; }
  .gallery--1 button:first-child { grid-column: auto; grid-row: auto; }
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }
@media (max-width: 899px) { .gallery button:first-child { grid-column: span 2; } }

.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(10,16,30,0.94); }
.lightbox::backdrop { background: rgba(10,16,30,0.94); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; padding: 64px 72px; }
.lightbox button { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.7); background: rgba(10,16,30,0.5); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox button svg { width: 18px; height: 18px; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox img { padding: 70px 12px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------- About ---------- */
.bio { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .bio { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.bio__portrait { position: relative; }
.bio__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.bio__portrait { margin-right: 14px; }
.bio__portrait::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; background: var(--sage); z-index: -1; }
@media (min-width: 960px) { .bio__portrait { margin-right: 22px; } .bio__portrait::before { inset: 22px -22px -22px 22px; } }
@media (min-width: 960px) { .bio__portrait { position: sticky; top: calc(var(--header-h) + 32px); } }
.bio__portrait figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.title-line { font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); margin: -0.2em 0 1.4em; }

/* ---------- Contact ---------- */
.contact { background: var(--sand); padding: var(--section) 0; }
.contact__grid { display: grid; gap: clamp(36px, 5vw, 80px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .contact__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; }
.contact-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list b { display: block; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.form { background: #fff; padding: clamp(28px, 4vw, 52px); box-shadow: var(--shadow); }
.form .row { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .form .row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form .row + .row { margin-top: 18px; }
.form label { display: block; font-family: var(--font-head); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.form label small { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 0.85rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--sand);
  border: 1px solid transparent; border-bottom: 2px solid var(--line); border-radius: 0;
  padding: 12px 14px; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; background: #fff; border-color: var(--green); }
.form .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form .note { font-size: 0.9rem; color: var(--muted); margin: 0; }
.form .status { font-weight: 600; color: var(--green); }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.8); }
.footer-main { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); padding: clamp(56px, 7vw, 96px) 0; }
@media (min-width: 760px) { .footer-main { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); } }
.footer-brand img { width: 120px; }
.footer-brand p { margin-top: 18px; max-width: 32ch; font-size: 0.95rem; }
.site-footer h4 { color: #fff; font-size: 0.8rem; letter-spacing: 0.2em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.social { display: flex; gap: 12px; margin-top: 14px; }
.social a { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; display: grid; place-items: center; }
.social a:hover { background: #fff; color: var(--navy); text-decoration: none; }
.social svg { width: 17px; height: 17px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px 0; background: #fff; }
@media (min-width: 900px) { .strip { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.strip a { aspect-ratio: 1; overflow: hidden; display: block; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), opacity 0.3s ease; }
.strip a:hover img { transform: scale(1.06); opacity: 0.9; }
.footer-base { background: #fff; color: var(--muted); font-size: 0.88rem; }
.footer-base .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; padding-bottom: 22px; }
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.to-top.is-visible { opacity: 0.9; visibility: visible; }
.to-top svg { width: 16px; height: 16px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 60px) var(--gutter) 80px; }

@media print {
  .site-header, .mobile-menu, .to-top, .strip, .form { display: none !important; }
  .hero { min-height: 0; color: var(--ink); }
  .hero h1 { color: var(--ink); }
}

/* ---------- Added for the editor ---------- */
.img-missing { display: block; width: 100%; height: 100%; min-height: 200px; background: repeating-linear-gradient(45deg, var(--sand), var(--sand) 12px, #ebe6dc 12px, #ebe6dc 24px); }
.text-block .prose { margin-top: 1.4em; }
.text-block .more { margin-top: 1.6em; }
a.ncard { text-decoration: none; color: inherit; }
a.ncard:hover h3 { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 0.2em; }
.prose a, .lead a, .tile__body p a, .course-body p a, .bio p a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.no-hero main { padding-top: var(--header-h); }
@media (min-width: 900px) {
  .gallery--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery--grid button:first-child { grid-column: auto; grid-row: auto; }
}
@media (max-width: 899px) { .gallery--grid button:first-child { grid-column: auto; } }
.no-hero .notfound { padding-top: 60px; }
