/* Fonts — bundled locally, SIL Open Font License (see fonts/*-OFL.txt). */
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

/* Tokens */
:root {
  --night: #201322;
  --ivory: #fff3e9;
  --rose: #f3c1bf;
  --muted: #d3bbc8;
  --rule: #795967;
  --serif: "Instrument Serif", Georgia, serif;
  --focus: #ffcf9e;
  --dialog-bg: var(--night);
  --dialog-ink: var(--ivory);
  --dialog-line: var(--muted);
  --dialog-face: "Instrument Serif";
  --dialog-radius: 1.15rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; font: 1rem/1.55 "DM Sans", Arial, sans-serif; -webkit-font-smoothing: antialiased; background: var(--night); color: var(--ivory); }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .23em; }
a, button, input, textarea { touch-action: manipulation; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -6rem; padding: .7rem 1rem; background: #fff; color: #151515; z-index: 20; }
.skip:focus { top: 1rem; }

/* Type */
h1, h2, h3, footer span { font-family: var(--serif); font-weight: 400; }
h1, h2, h3 { letter-spacing: -.038em; }
h1 em, h2 em { font-weight: inherit; color: var(--rose); }
h2 { font-size: clamp(3rem, 4.75vw, 5.1rem); line-height: 1.02; }
h3 { font-size: clamp(1.8rem, 2.35vw, 2.5rem); line-height: 1.1; }
.overline { font: 700 .77rem/1.5 "DM Sans", sans-serif; letter-spacing: .17em; text-transform: uppercase; }

/* Layout */
.wrap { width: min(88%, 82rem); margin-inline: auto; }

/* Buttons — keep .button:hover ahead of .nav-button so the outlined nav button stays transparent on hover. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .7em 1.55rem; font-weight: 700; font-size: .95rem; text-decoration: none; background: var(--rose); border: 1px solid var(--rose); border-radius: 999px; color: var(--night); }
.button:hover { background: var(--ivory); border-color: var(--ivory); }
.button.nav-button { min-height: 40px; padding: .52rem 1.15rem; color: var(--ivory); background: transparent; border-color: var(--rule); font-weight: 400; }
.button.nav-button:hover { border-color: var(--ivory); }
.plain-button { border: 0; padding: .4rem 0; background: transparent; text-decoration: underline; text-underline-offset: .2em; }

/* Masthead */
.mast, .mast nav, footer { display: flex; align-items: center; }
.mast { justify-content: space-between; gap: 1rem; padding-block: 1.12rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 100%; height: auto; }
.mast .brand { width: clamp(10.5rem, 15vw, 13.4rem); }
.mast nav { gap: clamp(1.35rem, 3vw, 3rem); }
.mast a, footer a { font-size: .95rem; }
.mast a { text-decoration: none; }
.mast a:hover, footer a:hover { text-decoration: underline; }

/* Hero */
.vault {
  min-height: clamp(32rem, 41vw, 47rem);
  padding: clamp(8rem, 11vw, 13rem) 5% clamp(2.8rem, 4.1vw, 4.75rem);
  display: grid;
  place-items: end center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 67%, #210c2030 12%, transparent 54%),
              url("hero.webp") center / cover no-repeat, #381c30;
  border-block: 1px solid #745060;
}
.welcome { text-shadow: 0 2px 18px #210e1f; }
.welcome .overline { color: #f2ccce; }
.welcome h1 { margin: .5rem 0 .68rem; font-size: clamp(4.1rem, 6.3vw, 6.4rem); line-height: .93; }
.welcome h1 em { display: block; }
.lead { font: 400 clamp(1.32rem, 1.72vw, 1.82rem)/1.21 var(--serif); max-width: 41ch; margin-inline: auto; text-wrap: balance; color: #fff4ef; }
.welcome .button { margin-top: 1.5rem; text-shadow: none; }

/* Giving strip — no bottom rule: the full-bleed band below is the divider. */
.giving { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem; }
.giving .button { flex: none; }
.giving h2 { font-size: clamp(1.7rem, 2.5vw, 2.3rem); line-height: 1.12; }
.giving p { margin-top: .25rem; color: var(--muted); }

/* Build schedule — the light band */
.courses { color: #422138; background: #f1ddd5; padding: clamp(3.5rem, 5.7vw, 6rem) 0; }
.courses .overline, .courses em { color: #793e54; }
.courses h2 { margin: .85rem 0 2rem; }
.course-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 4.5rem); }
.course-list article { border-top: 1px solid #af8d93; padding-top: 1rem; }
.course-list p { margin-top: .55rem; color: #523f47; }
.schedule-note { display: grid; grid-template-columns: 1fr 2.1fr; gap: 2rem; margin-top: 2.15rem; padding-top: 1.4rem; border-top: 1px solid #af8d93; }
.schedule-note p { max-width: 48rem; color: #523f47; }

/* Studio */
.studio { background: #352136; border-top: 1px solid #5f4158; }
.studio .overline { color: var(--rose); }
.studio-inner { display: grid; grid-template-columns: 1fr 1.05fr; align-items: start; gap: clamp(2rem, 7vw, 7rem); padding-block: clamp(3.5rem, 6vw, 6.5rem); }
.studio-inner h2 { font-size: clamp(2.8rem, 4.1vw, 4.4rem); }
.studio-inner div p { color: var(--muted); max-width: 35rem; margin-top: .55rem; line-height: 1.65; }

/* Footer */
footer { justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); padding: 1.25rem 0 1.85rem; color: var(--muted); }
footer span { font-size: 1.4rem; }

/* Dialogs — application and contribution */
.brief { color: var(--dialog-ink); background: var(--dialog-bg); border: 1px solid var(--dialog-line); width: min(33rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: var(--dialog-radius); box-shadow: 0 30px 120px #09050950; }
.brief::backdrop { background: rgb(16 13 21 / .72); }
.brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.brief h2 { font: 400 clamp(2.2rem, 5vw, 3.2rem)/1.05 var(--dialog-face), sans-serif; letter-spacing: -.045em; }
.brief-close { width: 2.3rem; height: 2.3rem; flex: none; display: grid; place-items: center; background: transparent; border: 1px solid currentColor; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.brief-intro { margin: 1rem 0; }
.brief label { display: block; font-size: .95rem; font-weight: 700; margin: .8rem 0 .28rem; }
.brief label span { font-weight: 400; }
.brief input, .brief textarea { width: 100%; background: transparent; color: inherit; border: 1px solid var(--dialog-line); padding: .65rem .75rem; border-radius: 2px; }
.brief input::placeholder, .brief textarea::placeholder { color: var(--muted); }
.brief textarea { min-height: 5rem; resize: vertical; }
.brief .button { margin-top: 1rem; }
.brief-status { margin-top: .6rem; font-size: .9rem; }
.brief-status:empty { display: none; }
.contact-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: .75rem; }
.contact-row > div { min-width: 0; }
.contribution input { max-width: 11rem; display: block; }
#application-review { margin-top: 1.4rem; }
#application-review h3 { margin-bottom: .55rem; }
.application-summary { margin: 1.25rem 0; border-top: 1px solid var(--rule); }
.application-summary dt { font-weight: 700; margin-top: .8rem; }
.application-summary dd { margin: .15rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.dialog-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1rem; }

/* Responsive — widest first, so narrower rules win. */
@media (max-width: 740px) {
  .wrap { width: 90%; }
  .mast { padding-block: .95rem; }
  .mast nav a { display: none; }
  .vault { min-height: 32rem; padding: 8rem 4% 3.2rem; }
  .welcome h1 { font-size: clamp(3.25rem, 11vw, 5.2rem); }
  .studio-inner { grid-template-columns: 1fr; gap: 1.7rem; }
}
@media (max-width: 680px) {
  .course-list { grid-template-columns: 1fr; gap: 1.65rem; }
  .schedule-note { grid-template-columns: 1fr; gap: .55rem; }
}
@media (max-width: 560px) {
  .giving { flex-direction: column; align-items: flex-start; gap: .8rem; }
}
@media (max-width: 520px) {
  .vault {
    background-size: auto, auto 100%;
    background-image: radial-gradient(ellipse at 50% 70%, #1c0a1c50, transparent 75%), url("hero.webp");
  }
}
@media (max-width: 480px) {
  .contact-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 360px) {
  .mast .brand { width: 9.5rem; }
  .button.nav-button { padding-inline: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
