/* ==========================================================================
   H-AGE - one stylesheet for the whole site
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette taken from the Wix pages */
  --ink: #1d1d1d;           /* headings, rule lines */
  --paper: #ffffff;
  --soft: #f7f5f2;          /* off-white: header, footer, panels */
  --stone: #eceae7;         /* warm grey behind the home intro */
  --line: #e6e6e6;
  --muted: #666666;         /* secondary text; dark enough for 4.5:1 contrast */
  --brand: #64246c;         /* H-AGE purple */
  --brand-dark: #4a1752;
  --orange: #d58b1e;        /* hero buttons, publication links */
  --hero-bg: #b9bccb;       /* blue-grey behind the hero photo */
  --radius: 18px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --fast: .2s var(--ease);
  --slow: .6s var(--ease);
  --max: 1120px;
  --display: "Spicy Rice", "Montserrat", system-ui, sans-serif;
  --heading: "Montserrat", system-ui, sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale: small 24px Open Sans, medium 40px Montserrat, large 72px Open Sans.
     Each step shrinks a little on phones so long headings still fit. */
  --fs-sm: clamp(20px, 2.4vw, 24px);
  --fs-md: clamp(30px, 4vw, 40px);
  --fs-lg: clamp(44px, 7vw, 72px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: var(--fs-sm); }  /* 1rem = the small size */
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: clip;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-family: var(--body); font-size: var(--fs-lg); font-weight: 700; }
h2 { font-family: var(--heading); font-size: var(--fs-md); font-weight: 800; }
h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.brand-text { color: var(--brand); }
.justify { text-align: justify; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0; }

/* Smooth scrolling (Lenis) and page-to-page fades (View Transitions) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
@view-transition { navigation: auto; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section.tight { padding: 48px 0; }
.soft { background: var(--soft); }
.lead { font-size: 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.wide-text { grid-template-columns: 2fr 3fr; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stack > * + * { margin-top: 20px; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--soft); }
.nav .wrap { max-width: 1280px; display: flex; align-items: center; gap: 32px; padding: 18px 32px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: clamp(48px, 5.4vw, 70px); width: auto; }
.brand span { font-family: var(--display); font-size: 1.6rem; color: var(--brand); line-height: 1; }
.brand img + span { display: none; }  /* the logo already spells out the name; text shows only if it fails to load */
.nav-links { display: flex; gap: 12px; margin-left: auto; }
.nav-links a {
  padding: 6px clamp(16px, 2.2vw, 30px); border-radius: 999px; white-space: nowrap;
  font-size: clamp(15px, 1.5vw, 20px); font-weight: 700; color: #fff; background: var(--brand); text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  transition: background var(--fast), transform var(--fast);
}
.nav-links a:hover { background: var(--brand-dark); transform: translateY(-2px); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--brand); font-size: 1.6rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1.5px solid var(--brand); cursor: pointer; font-family: inherit;
  transition: transform var(--fast), background var(--fast), color var(--fast);
}
.pill:hover { transform: translateY(-2px); background: var(--brand-dark); border-color: var(--brand-dark); }
.pill.light { background: #fff; color: var(--muted); border-color: #fff; border-radius: 4px; }
.pill.light:hover { background: #fff; color: var(--brand); }
.pill.orange { background: transparent; color: var(--orange); border-color: var(--orange); border-radius: 4px; }
.pill.orange:hover { background: var(--orange); color: #fff; }
.pill.cta { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; border-radius: 2px; padding: 14px 34px; }
.pill.cta:hover { background: #b9761a; border-color: #b9761a; }
.pill.outline { background: transparent; color: var(--brand); }
.pill.outline:hover { background: var(--brand); color: #fff; }
.pill.small { padding: 8px 16px; font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero (home) ---------- */
/* The crop and the .board box are measured from hero.jpg (1448x1086, whiteboard at
   roughly x 150-905, y 70-380 above the robot). Re-measure both if the photo changes. */
.hero {
  position: relative; aspect-ratio: 2 / 1;
  background: var(--hero-bg) no-repeat;
  background-size: 111.4% auto; background-position: 40.5% 2.3%;
}
.hero::before {  /* light wash over the whole photo, as on the Wix page */
  content: ""; position: absolute; inset: 0; background: rgba(214, 218, 232, .45);
}
.board {
  position: absolute; z-index: 1; left: 6.9%; top: 9.2%; width: 58.1%; height: 47.7%; padding: 0 3%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 1.4vw, 20px);
  text-align: center;
}
.tagline { font-family: var(--display); font-weight: 400; letter-spacing: 0; line-height: 1.25; font-size: min(var(--fs-md), 3.1vw); }
.board .actions { margin: 0; justify-content: center; gap: 10px; }
.board .pill { font-size: clamp(13px, 1.25vw, 17px); padding: .6em 1.5em; }
.tagline u { color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Page header (inner pages) ---------- */
.title-band { background: var(--stone); padding: 36px 0; }
.mont-title { font-family: var(--heading); font-weight: 800; color: var(--brand); }
.page-intro { padding-top: 32px; }

/* ---------- Media ---------- */
.photo { width: 100%; border-radius: var(--radius); object-fit: cover; background: var(--soft); }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.wide { aspect-ratio: 16 / 9; }
.photo.square { aspect-ratio: 1; }
.banner { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }

/* Shown in place of an image whose file isn't in assets/ yet */
.ph {
  display: grid; place-items: center; text-align: center; padding: 16px;
  border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--soft) 0 14px, #ecebe8 14px 28px);
  color: var(--muted); font-size: .8rem; min-height: 180px; border: 1px dashed #c9c9c9;
}
.ph.banner { border-radius: 0; }
.partners .ph { min-height: 0; height: 42px; padding: 0 12px; border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform var(--fast), box-shadow var(--fast);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, .08); }
.soft .card { border-color: transparent; }

/* ---------- Home: intro ---------- */
.intro { background: var(--stone); }
.intro h2 { color: var(--brand); }
.intro .sub { font-weight: 700; color: var(--brand); line-height: 1.4; margin: 20px 0 32px; }
.intro .points p { font-weight: 700; text-align: justify; margin: 0; padding: 22px 0; border-top: 1px solid var(--ink); }
.intro .points p:last-child { border-bottom: 1px solid var(--ink); }
.intro-grid { display: grid; grid-template-columns: 11fr 9fr; column-gap: 56px; }
.robot-panel { grid-column: 1; grid-row: 1; position: relative; background: #fefefe; }
.robot-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.intro-grid > .credit { grid-column: 2; font-style: italic; color: #333; font-size: 18px; text-align: justify; margin-top: 24px; }

/* ---------- About ---------- */
main.about { background: var(--soft); padding-bottom: 64px; }
.intro-text { padding: 40px 0 32px; }
.question {
  font-family: var(--display); font-weight: 400; letter-spacing: 0; line-height: 1.3;
  text-align: center; max-width: 900px; margin: 0 auto 28px;
}
.definition-title { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.callout { color: var(--brand); font-weight: 700; }

.vision-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.vision-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vision-row .callout { margin-top: 20px; }
.vision-text { text-align: right; }

.ruled-heading { margin-top: 48px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); margin-bottom: 24px; }
.journey-sub { font-family: var(--display); color: var(--brand); font-size: 1.15rem; margin-bottom: 24px; }
.study { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; padding: 8px 0 40px; border-bottom: 1px solid var(--ink); }
.study-2 { grid-template-columns: 1.4fr 1fr; padding: 32px 0 0; border-bottom: 0; }
.study p { text-align: justify; }
.study .label { color: var(--brand); font-weight: 700; margin: 0; text-align: left; }
.study .years { font-size: .7rem; color: var(--muted); margin-bottom: 14px; }
.study .q { font-style: italic; font-weight: 700; line-height: 1.35; }
.study .photo { border-radius: 14px; aspect-ratio: 4 / 3; box-shadow: 0 16px 34px rgba(0, 0, 0, .15); }
.study-2 .photo { aspect-ratio: 3 / 4; align-self: start; }

.wrap-wide { max-width: 1280px; padding: 0 32px; }  /* same edges as the header: logo to "Get in Touch" */
.card-body { background: var(--stone); padding: 40px; margin-top: 24px; }
.note-text { font-size: 18px; max-width: 920px; }
.note-text.note-full { font-size: 1rem; text-align: justify; max-width: none; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.people .name { color: var(--brand); }
.people .role { font-size: 18px; min-height: 3.3em; margin: 6px 0 14px; }
.portrait { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 6px; }
.committee .portrait { width: 55%; aspect-ratio: 4 / 5; margin: 0 auto; }
.bio { font-size: 18px; font-style: italic; text-align: justify; color: #333; margin-top: 16px; }
.more summary { cursor: pointer; margin-top: 16px; color: var(--brand); font-weight: 700; }
.more summary:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.more .opened, .more[open] .closed { display: none; }
.more[open] .opened { display: inline; }
.council-photo { display: block; width: min(100%, 720px); margin: 0 auto; }

/* ---------- Lists (events, publications) ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: center;
  padding: 22px 4px; border-bottom: 1px solid var(--line); transition: background var(--fast);
}
.row:first-child { border-top: 1px solid var(--line); }
.row:hover { background: var(--soft); }
.row .year { font-weight: 800; font-family: var(--heading); color: var(--brand); align-self: start; padding-top: 2px; }
.row h3 { line-height: 1.4; }
.row .cite { color: #555; margin-top: 6px; }
.row .cite b { color: var(--ink); }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: #ecebe8; color: var(--ink);
}
.tag.brand { background: var(--brand); color: #fff; }
.tag.award { background: #fbeedb; color: #a8620c; }
.upcoming { display: none; }
.is-upcoming .upcoming { display: inline-block; }

.event { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.event .photo { aspect-ratio: 4 / 3; }
.event .ph { min-height: 165px; }
.event .date { font-size: .8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
.event h3 { margin: 4px 0 8px; }

/* ---------- On our radar (posts) ---------- */
.post { display: flex; flex-direction: column; text-decoration: none; padding: 0; overflow: hidden; }
.post .photo, .post .ph { border-radius: 0; aspect-ratio: 16 / 10; min-height: 0; }
.post .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post .meta { font-size: .8rem; color: var(--muted); }
.post .more { margin-top: auto; color: var(--brand); font-weight: 600; font-size: 1rem; }

/* ---------- Contact ---------- */
.contact-intro { padding: 32px 0 24px; }
.contact-box { padding: 0; }
.fine-print { font-size: 16px; }
.contact-form-section { padding-top: 32px; }
.contact-box a { color: var(--brand); font-weight: 600; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
/* The photo spans from the Name label to the bottom of the Message box */
.contact-photo { grid-column: 1; grid-row: 1; position: relative; }
.contact-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.contact-form .form { grid-column: 2; grid-row: 1; }
.form-foot { grid-column: 2; grid-row: 2; display: grid; gap: 12px; justify-items: start; margin-top: 20px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); transition: border-color var(--fast), box-shadow var(--fast);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(102, 34, 113, .15); }
.form textarea { min-height: 140px; resize: vertical; }
.form-foot .note { font-size: .8rem; color: var(--muted); }

/* ---------- Partners + footer ---------- */
.partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 48px; padding: 44px 20px; background: var(--soft); }
.partners img { height: 42px; width: auto; object-fit: contain; }
.partners img.tall-logo { height: 72px; }
.footer { padding: 28px 38px 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
          font-size: .8rem; color: var(--muted);
          background: linear-gradient(var(--ink), var(--ink)) top center / calc(100% - 76px) 1px no-repeat, var(--soft); }
.footer a { text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--slow), transform var(--slow); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 1000px) {
  .section { padding: 56px 0; }
  .nav .wrap { flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  .menu-btn { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 10px; padding: 8px 0 6px; margin: 0; }
  .nav-links a { text-align: center; padding: 12px 14px; font-size: 1rem; }
  .intro .points p, .intro-grid > .credit { text-align: left; }
  .intro-grid { grid-template-columns: 1fr; row-gap: 28px; }
  .robot-panel, .intro-grid > .credit { grid-column: auto; grid-row: auto; }
  .intro-grid > .credit { margin-top: 0; }
  .robot-panel img { position: static; width: auto; max-width: 100%; height: auto; max-height: min(75vh, 640px); margin: 0 auto; }
  .nav.open .nav-links { display: flex; }
  .split, .split.wide-text, .study, .study-2, .vision-row, .people { grid-template-columns: 1fr; gap: 28px; }
  .vision-text { text-align: left; }
  .wrap-wide { padding: 0 20px; }
  .study p, .bio, .note-text.note-full, .justify { text-align: left; }
  .card-body { padding: 28px 20px; }
  .committee .portrait { width: 60%; }
  .banner { aspect-ratio: 4 / 3; }
  .event { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row .pill { justify-self: start; }
  .row .side { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .contact-form { grid-template-columns: 1fr; row-gap: 24px; }
  .contact-photo, .contact-form .form, .form-foot { grid-column: auto; grid-row: auto; }
  .contact-photo { aspect-ratio: 4 / 3; }
  .title-band { padding: 24px 0; }
}

/* Phones: a taller crop zoomed in on the whiteboard */
@media (max-width: 700px) {
  .hero { aspect-ratio: 10 / 9; background-size: 173.4% auto; background-position: 17.9% 6%; }
  .board { left: 4.8%; top: 9.5%; width: 90.4%; height: 39%; padding: 0 3%; gap: 8px; }
  .tagline { font-size: clamp(16px, 4.8vw, 24px); }
  .board .pill { font-size: 14px; }
}

/* Respect people who turn animations off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
