/* Mountfitchet Antenatal: site styles
   Colours, type and layout follow brand.md. Mobile first. */

/* ---------- Fonts: self-hosted, latin subset, SIL Open Font License (fonts/OFL-*.txt) ---------- */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
}

:root {
  --paper: #F2EEE7;
  --paper-warm: #EAE4D9;
  --card: #F7F4EF;
  --ink: #1E2A26;
  --sage: #4F6B5C;
  --sage-dark: #3E5649;
  --sage-tint: #DCE3DA;
  --brass: #B9A88C;
  --hairline: #D3CBBD;
  --text-2: #36403C;
  --text-3: #4A524E;
  --placeholder: #D9D1C3;
  --field-border: #7E837D;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --max: 1200px;
  --gutter: 20px;
  --section: 72px;

  color-scheme: light;
}

@media (min-width: 700px) {
  :root { --gutter: 40px; --section: 96px; }
}

@media (min-width: 1100px) {
  :root { --gutter: 64px; --section: 120px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
}

p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--sage); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.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: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.band-tint { background: var(--sage-tint); }
.band-warm { background: var(--paper-warm); }
.rule-top { border-top: 1px solid var(--hairline); }

/* ---------- Type helpers ---------- */

.label {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (min-width: 900px) {
  .label { font-size: 13px; }
}

.display {
  font-size: clamp(52px, 12vw, 92px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Two names in one heading, one per line */
.display--pair { font-size: clamp(38px, 10.6vw, 76px); line-height: 1.04; }
.display--pair span { display: block; }

.h2 {
  font-size: clamp(38px, 6.4vw, 58px);
  line-height: 1.06;
}

.h2--small { font-size: clamp(30px, 4.6vw, 40px); }

.label + .display,
.label + .h2 { margin-top: 14px; }

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(23px, 3.4vw, 30px);
  line-height: 1.3;
  color: var(--sage);
}

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36em;
}

@media (min-width: 900px) {
  .lead { font-size: 21px; }
}

.body-text { color: var(--text-2); max-width: 38em; }
.body-text p + p { margin-top: 1em; }

.quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.3;
  color: var(--sage);
}

.numeral {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--sage);
  line-height: 1;
}

.placeholder-text { color: var(--text-3); }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid var(--sage);
  border-radius: 0;
  background: var(--sage);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { background: var(--sage-dark); border-color: var(--sage-dark); color: var(--paper); }

.btn--lg { min-height: 56px; padding: 14px 32px; font-size: 18px; }

.text-link {
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--hairline); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  min-height: 76px;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  padding-block: 14px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }

.wordmark-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.wordmark-role {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.site-nav {
  flex-basis: 100%;
  padding-bottom: 20px;
}

.site-nav ul { display: flex; flex-direction: column; }

.site-nav li a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 17px;
  text-decoration: none;
}

.site-nav li a[aria-current="page"] { color: var(--sage); }

.site-nav .btn { margin-top: 16px; width: 100%; }

.js .menu-toggle { display: inline-flex; align-items: center; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

@media (min-width: 960px) {
  .header-inner { flex-wrap: nowrap; min-height: 92px; }
  .wordmark-name { font-size: 26px; }
  .js .menu-toggle { display: none; }
  .site-nav,
  .js .site-nav {
    display: flex;
    flex-basis: auto;
    align-items: center;
    gap: 40px;
    padding: 0;
  }
  .site-nav ul { flex-direction: row; gap: 28px; }
  .site-nav li a { padding: 8px 0; border: 0; font-size: 16px; }
  .site-nav li a:hover { text-decoration: underline; }
  .site-nav .btn { width: auto; margin: 0; min-height: 48px; padding: 12px 20px; font-size: 16px; }
}

/* ---------- Photo placeholder ---------- */

.photo-placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 280px;
  padding: 18px 22px;
  background: var(--placeholder);
}

.photo-placeholder span {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

/* ---------- Hero ---------- */

.hero { padding-block: 48px 72px; }

.hero-grid {
  display: grid;
  gap: 48px;
}

.hero-text .subtitle { margin-top: 24px; }
.hero-text .lead { margin-top: 24px; }
.hero-text .actions { margin-top: 36px; }

.hero-photo { aspect-ratio: 4 / 3.4; }

@media (min-width: 900px) {
  .hero { padding-block: 88px 104px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 56px;
    align-items: center;
  }
  .hero-photo { aspect-ratio: 4 / 5; min-height: 560px; }
}

/* ---------- Next course band ---------- */

.next-course {
  display: grid;
  gap: 28px;
  padding-block: 48px;
}

.next-course-title {
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 300;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.facts dt { margin-bottom: 4px; }
.facts dd { color: var(--ink); line-height: 1.5; }

.next-course .btn { justify-self: start; }

@media (min-width: 900px) {
  .next-course {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 3fr) auto;
    align-items: center;
    gap: 40px;
    padding-block: 56px;
  }
  .next-course .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 40px;
  }
  .next-course .btn { justify-self: end; }
}

/* ---------- Ruled columns (Fewer people, More midwife) ---------- */

.ruled-columns {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.ruled-columns > li {
  padding-top: 24px;
  border-top: 1px solid var(--brass);
}

.ruled-columns h3 {
  font-weight: 400;
  font-size: clamp(23px, 2.4vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.ruled-columns p { margin-top: 12px; color: var(--text-2); }

@media (min-width: 640px) {
  .ruled-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (min-width: 1000px) {
  .ruled-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 64px; }
}

/* ---------- Session topics (two numbered lists side by side) ---------- */

.programmes {
  display: grid;
  gap: 56px;
  margin-top: 40px;
}

.programme-title {
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 300;
  line-height: 1.15;
}

.programme .numbered { margin-top: 20px; }

@media (min-width: 960px) {
  .programmes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; margin-top: 64px; }
  .programme .numbered li { grid-template-columns: 56px minmax(0, 1fr); }
}

/* ---------- Split layouts (About, Venue) ---------- */

.split {
  display: grid;
  gap: 40px;
}

.split-text > * + * { margin-top: 24px; }
.split-text > .label + .h2 { margin-top: 14px; }

.portrait { aspect-ratio: 4 / 5; }

.venue-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 62% 70%;
  background: var(--placeholder);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
  .split--reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .split--reverse .split-media { order: 2; }
}

/* Credentials and venue facts: ruled 2x2 grid */
.ruled-grid {
  display: grid;
  gap: 0 32px;
  margin-top: 32px;
}

.ruled-grid li {
  padding-block: 14px 16px;
  border-top: 1px solid var(--brass);
  color: var(--ink);
  line-height: 1.45;
}

@media (min-width: 560px) {
  .ruled-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ruled-grid--large li {
  padding-block: 20px 22px;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.3;
}

/* ---------- Testimonial ---------- */

.testimonial { text-align: center; }

.testimonial blockquote p {
  max-width: 17em;
  margin-inline: auto;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(27px, 3.6vw, 40px);
  line-height: 1.3;
  color: var(--ink);
}

.testimonial figcaption { margin-top: 28px; }

/* ---------- Questions ---------- */

.qa-layout {
  display: grid;
  gap: 32px;
}

.qa-list > div {
  padding-block: 24px;
  border-top: 1px solid var(--hairline);
}

.qa-list > div:first-child { padding-top: 0; border-top: 0; }

.qa-list dt,
.qa-list h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.qa-list dd,
.qa-list p { margin-top: 10px; color: var(--text-2); }

.qa-list a { color: var(--ink); }

.qa-more { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--hairline); }

@media (min-width: 900px) {
  .qa-layout { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr); gap: 64px; }
}

/* ---------- Closing CTA ---------- */

.cta {
  display: grid;
  gap: 28px;
  padding-block: 64px;
}

.cta .h2 { max-width: 11.5em; font-size: clamp(34px, 5.4vw, 50px); text-wrap: balance; }
.cta p { margin-top: 18px; color: var(--text-2); }
.cta .btn { justify-self: start; }

@media (min-width: 900px) {
  .cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-block: 104px;
  }
  .cta .btn { justify-self: end; }
}

/* ---------- Footer ---------- */

.site-footer { padding-block: 40px 48px; }

.footer-notes {
  display: grid;
  gap: 8px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--text-2);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
}

.footer-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  color: var(--ink);
}

.footer-meta {
  font-size: 14px;
  color: var(--text-3);
}

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { font-size: 15px; }

/* ---------- Page heading (inner pages) ---------- */

.page-head { padding-block: 56px 24px; }
.page-head .lead { margin-top: 24px; }

@media (min-width: 900px) {
  .page-head { padding-block: 96px 40px; }
}

/* ---------- About page ---------- */

.about-hero { padding-block: 0 var(--section); }

.about-hero .split { align-items: stretch; }

.about-hero .portrait { min-height: 360px; }

.about-hero .split-text { padding-top: 8px; }
.about-hero .display { font-size: clamp(54px, 10vw, 104px); }

@media (min-width: 900px) {
  .about-hero .split { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); }
  .about-hero .split-text { align-self: center; padding-block: 64px; }
}

.quote-list { margin-top: 40px; border-bottom: 1px solid var(--brass); }

.quote-list li {
  padding-block: 26px;
  border-top: 1px solid var(--brass);
}

.quote-list blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  color: var(--ink);
}

.quote-list li:last-child blockquote p { color: var(--sage); }

/* Numbered list rows (Early labour) */
.numbered {
  margin-top: 40px;
  border-bottom: 1px solid var(--brass);
}

.numbered li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0 16px;
  padding-block: 24px;
  border-top: 1px solid var(--brass);
}

.numbered .numeral { font-size: 40px; grid-row: span 2; }

.numbered h3,
.numbered h4 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.numbered p { margin-top: 6px; color: var(--text-2); }

@media (min-width: 700px) {
  .numbered li { grid-template-columns: 80px minmax(0, 1fr); padding-block: 28px; }
  .numbered .numeral { font-size: 48px; }
  .numbered h3,
  .numbered h4 { font-size: 21px; }
}

/* ---------- FAQ page ---------- */

.faq-group + .faq-group { margin-top: 64px; }

/* NHS note */
.nhs-note {
  padding: 28px 26px;
  border: 1px solid var(--brass);
  background: var(--card);
}

.nhs-note p + p { margin-top: 10px; }
.nhs-note strong { font-weight: 600; }

/* ---------- Contact form ---------- */

.form { display: grid; gap: 22px; }

.field { display: grid; gap: 8px; }

.field label {
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}

.field .hint { font-weight: 400; color: var(--text-3); }

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: #FBF9F5;
  color: var(--ink);
  font: 400 17px/1.4 var(--sans);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { min-height: 160px; resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.field-row { display: grid; gap: 22px; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form .btn { justify-self: start; }

.form-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  padding: 16px 18px;
  border-left: 3px solid var(--sage);
  background: var(--sage-tint);
  color: var(--ink);
}

.form-status[hidden] { display: none; }
.form-status:focus { outline: none; }

.form-small { font-size: 15px; color: var(--text-3); }

/* ---------- Booking page ---------- */

.booking-facts { padding-block: 40px; }

@media (min-width: 900px) {
  .booking-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 40px; padding-block: 48px; }
}

.booking { display: grid; gap: 64px; }

.booking-session { display: grid; gap: 24px; }

.booking-covers { margin-top: 12px; color: var(--text-2); max-width: 30em; }

/* One row per date: rule on top, date and details on the left, Book on the right */
.date-list { border-bottom: 1px solid var(--brass); }

.date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--brass);
}

.date-row-date {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.4vw, 26px);
  line-height: 1.2;
}

.date-row-meta { margin-top: 4px; color: var(--text-2); font-size: 16px; }

.date-row-full {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.date-row.is-full .date-row-date { color: var(--text-3); }

.date-list-empty {
  padding-block: 22px;
  border-block: 1px solid var(--brass);
  color: var(--text-2);
}

.date-list-empty a { color: var(--ink); }

.booking-notes {
  display: grid;
  gap: 10px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  max-width: 44em;
}

.booking-notes a { color: var(--ink); }

@media (min-width: 900px) {
  .booking-session {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

/* ---------- 404 and confirmation ---------- */

.notfound { padding-block: 96px 120px; }
.notfound .actions { margin-top: 36px; }
.booked-text { margin-top: 24px; }
