/* Updated 2026-10-05: first version of the site, built from Starter Template v1 */
/* Copy this whole file as style.css. Fill in BRAND and FEEL. Add anything extra only in CUSTOM at the bottom. */

/* FONTS - load the two fonts named in BRAND from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap");

/* BRAND - change these and the whole site updates */
:root {
  --brand-main: #004AAD;    /* header, buttons, links */
  --brand-accent: #2563C9;  /* small highlights only */
  --on-brand: #FFFFFF;      /* text on top of the main colour */
  --background: #F6F8FC;    /* page background */
  --surface: #FFFFFF;       /* cards and boxes */
  --text: #13213A;          /* main text */
  --text-soft: #4A5874;     /* less important text */
  --heading-font: "Montserrat", Arial, sans-serif;
  --body-font: "Source Sans 3", Arial, sans-serif;
}

/* FEEL - corners: 0 sharp, 8px soft, 20px round. space: 44px compact, 64px normal, 96px airy */
:root {
  --corner: 20px;
  --space: 72px;
  --width: 1040px;
}

/* ---------- Do not edit below this line, except in CUSTOM ---------- */

:root {
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --tint: color-mix(in srgb, var(--brand-main) 8%, var(--background));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--body-font); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-main); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--heading-font); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.inner { max-width: var(--width); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 66ch; }
.inner.narrow { max-width: var(--width); }
.inner.narrow > * { max-width: 66ch; }
.eyebrow { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-accent); margin-bottom: 0.8em; }
.soft { color: var(--text-soft); }
.lead { font-size: 1.2rem; }

/* Sections */
.section { padding: var(--space) 0; }
.section--tinted { background: var(--tint); }
.section--brand { background: var(--brand-main); color: var(--on-brand); }
.section--brand a { color: var(--on-brand); }
.section--brand .eyebrow, .section--brand .soft { color: var(--on-brand); opacity: 0.85; }
.section-head { max-width: 62ch; margin-bottom: 32px; }

/* Buttons */
.button { display: inline-block; background: var(--brand-main); color: var(--on-brand); font-weight: 600; text-decoration: none; padding: 14px 26px; border-radius: var(--corner); border: 2px solid var(--brand-main); }
.button:hover { filter: brightness(1.12); }
.button--light { background: var(--on-brand); color: var(--brand-main); border-color: var(--on-brand); }
.button--outline { background: transparent; color: var(--brand-main); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Header and menu */
.site-header { background: var(--brand-main); color: var(--on-brand); padding: 16px 0; }
.site-header .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; }
.site-name { display: flex; align-items: center; gap: 12px; font-family: var(--heading-font); font-size: 1.35rem; color: var(--on-brand); text-decoration: none; }
.site-name img { height: 44px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { color: var(--on-brand); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--on-brand); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--brand-accent); font-weight: 600; }

/* Footer */
.site-footer { background: var(--text); color: var(--background); padding: 36px 0; font-size: 0.95rem; }
.site-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer a { color: var(--background); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* HERO: photo behind text */
.hero--photo { position: relative; min-height: 460px; display: grid; align-items: end; color: #FFFFFF; overflow: hidden; }
.hero--photo .hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.15)); }
.hero--photo .inner { position: relative; z-index: 1; padding-top: 120px; padding-bottom: var(--space); width: 100%; }
.hero--photo p { max-width: 50ch; font-size: 1.15rem; }

/* HERO: photo beside text */
.hero--split .inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: center; }
.hero--split img { border-radius: var(--corner); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero--split p { font-size: 1.15rem; max-width: 46ch; }

/* HERO: bold text, no photo */
.hero--type { background: var(--tint); padding: calc(var(--space) * 1.4) 0; }
.hero--type h1 { font-size: clamp(2.4rem, 8vw, 4.6rem); max-width: 18ch; }
.hero--type p { font-size: 1.2rem; max-width: 52ch; color: var(--text-soft); }

/* HERO: centred on the main colour */
.hero--centred { background: var(--brand-main); color: var(--on-brand); text-align: center; padding: calc(var(--space) * 1.2) 0; }
.hero--centred img { margin: 0 auto 24px; max-height: 120px; width: auto; }
.hero--centred h1 { margin-left: auto; margin-right: auto; max-width: 20ch; }
.hero--centred p { margin-left: auto; margin-right: auto; max-width: 48ch; font-size: 1.15rem; opacity: 0.9; }
.hero--centred .buttons { justify-content: center; }

/* PAGE INTRO: top of every page except home */
.page-intro { background: var(--tint); padding: calc(var(--space) * 0.8) 0; }
.page-intro h1 { font-size: clamp(2rem, 5.5vw, 3rem); max-width: 22ch; }
.page-intro p { font-size: 1.15rem; color: var(--text-soft); max-width: 58ch; }

/* SERVICES: cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--corner); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.card img { border-radius: calc(var(--corner) / 2); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; margin-bottom: 8px; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-soft); }
.card .price { margin-top: auto; padding-top: 8px; color: var(--text); font-weight: 600; }

/* SERVICES: list with prices */
.price-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.price-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.price-list .item { flex: 1 1 280px; min-width: 0; }
.price-list h3 { margin: 0 0 4px; font-size: 1.15rem; }
.price-list p { margin: 0; color: var(--text-soft); }
.price-list .price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* SERVICES: alternating photo and text rows */
.rows { display: grid; gap: calc(var(--space) * 0.8); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px; align-items: center; }
.row img { border-radius: var(--corner); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 700px) { .row:nth-child(even) img { order: 2; } }

/* ABOUT: photo and story side by side */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 44px; align-items: center; }
.split img { border-radius: var(--corner); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split > div { min-width: 0; }

/* ABOUT: quote-style intro */
.pull-quote { font-family: var(--heading-font); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.3; margin: 0 0 28px; max-width: 30ch; padding-left: 24px; border-left: 4px solid var(--brand-accent); }

/* ABOUT: timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 7.5em 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline .when { font-weight: 600; color: var(--brand-main); font-variant-numeric: tabular-nums; }
.timeline h3 { margin: 0 0 4px; font-size: 1.1rem; }
.timeline p { margin: 0; color: var(--text-soft); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* FACTS: a row of key numbers */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 24px; }
.fact strong { display: block; font-family: var(--heading-font); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; color: var(--brand-main); }
.section--brand .fact strong { color: var(--on-brand); }
.fact span { color: var(--text-soft); }
.section--brand .fact span { color: var(--on-brand); opacity: 0.85; }

/* REVIEWS: one large quote */
.review--single { max-width: 40ch; margin: 0 auto; text-align: center; }
.review--single blockquote { font-family: var(--heading-font); font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.35; margin: 0 0 16px; }
.review--single cite { font-style: normal; color: var(--text-soft); }

/* REVIEWS: row of short quotes */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.review { background: var(--surface); border-radius: var(--corner); padding: 24px; border: 1px solid var(--line); margin: 0; }
.review blockquote { margin: 0 0 12px; }
.review cite { font-style: normal; font-weight: 600; color: var(--text-soft); }

/* GALLERY */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--corner) / 2); }

/* QUESTIONS (no JavaScript needed) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; }
.faq details p { margin: 10px 0 0; color: var(--text-soft); }

/* TABLE: opening hours, prices, lists */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }

/* CALL TO ACTION band */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.cta h2 { margin: 0; }
.cta .buttons { margin-top: 0; }

/* CONTACT */
.contact-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 44px; }
.contact-split > * { min-width: 0; }
.contact-form { max-width: 560px; }
.contact-form--centred { margin: 0 auto; }
.contact-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); border-radius: calc(var(--corner) / 2); }
.contact-form textarea { min-height: 150px; }
.contact-form button { margin-top: 18px; font: inherit; font-weight: 600; background: var(--brand-main); color: var(--on-brand); border: 0; border-radius: var(--corner); padding: 14px 26px; cursor: pointer; }
.contact-form .privacy { font-size: 0.92rem; color: var(--text-soft); margin-top: 12px; }
.details-list { display: grid; gap: 16px; }
.details-list strong { display: block; }
.details--big { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.details--big strong { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }
.details--big span { font-family: var(--heading-font); font-size: 1.35rem; }

/* ---------- CUSTOM: anything extra for this site goes below ---------- */

/* Home page top in the style of Oli's banner: blue with light-blue ovals */
.hero--banner { position: relative; overflow: hidden; background: var(--brand-main); color: var(--on-brand); }
.hero--banner::before, .hero--banner::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero--banner::before { width: 760px; height: 520px; right: -470px; top: 40px; background: #9CC3FF; box-shadow: inset 0 0 0 34px #7AAEF5; }
.hero--banner::after { width: 640px; height: 420px; right: -440px; top: 108px; background: #4380D8; }
.hero--banner .inner { position: relative; z-index: 1; }
.hero--banner p { color: var(--on-brand); opacity: 0.92; }
.hero--banner .eyebrow { color: #9CC3FF; }
@media (max-width: 1000px) {
  .hero--banner { padding-bottom: 200px; }
  .hero--banner::before { width: 460px; height: 300px; right: -120px; top: auto; bottom: -150px; box-shadow: inset 0 0 0 22px #7AAEF5; }
  .hero--banner::after { width: 380px; height: 240px; right: -110px; top: auto; bottom: -150px; }
}
h1, h2 { font-weight: 700; }
.button--on-brand { color: var(--on-brand); border-color: var(--on-brand); }
/* Home page: the opening questions */
.questions { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; }
.questions li { font-family: var(--heading-font); font-weight: 600; font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.35; padding-left: 20px; border-left: 4px solid var(--brand-accent); max-width: 44ch; }
.questions-answer { max-width: 44ch; }
/* Home page: one-word themes */
.words { list-style: none; margin: 8px 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.words li { background: var(--tint); color: var(--brand-main); font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.big-question { font-family: var(--heading-font); font-weight: 700; font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.25; margin: 8px 0 24px; }
.species-note { margin-top: 48px; }
.section--brand .pull-quote { border-left-color: var(--on-brand); }

/* Wide screens: text sections in two columns, heading on the left */
@media (min-width: 900px) {
  .inner.narrow:has(> h2) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 64px; align-items: start; }
  .inner.narrow:has(> h2) > * { grid-column: 2; }
  .inner.narrow:has(> h2) > h2 { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 24px; }
  .inner.narrow:has(> .eyebrow) > .eyebrow { grid-column: 1; grid-row: 1; }
  .inner.narrow:has(> .eyebrow) > h2 { grid-row: 1 / span 40; margin-top: 1.9rem; }
}
/* Book page: opening with Oli's photo */
.book-hero { background: var(--tint); }
.book-hero .inner { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.book-hero img { aspect-ratio: 3 / 4; max-height: 560px; width: auto; max-width: 100%; justify-self: center; object-fit: cover; object-position: center 35%; box-shadow: 0 18px 40px rgba(19, 33, 58, 0.18); }
.book-tagline { font-family: var(--heading-font); font-weight: 600; font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.3; color: var(--brand-main); }
/* v2 (2026-10-06): footer, four-card row, smaller question lists */
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px 40px; }
.footer-grid p { margin: 0 0 8px; }
.footer-name { font-family: var(--heading-font); font-weight: 700; font-size: 1.15rem; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (min-width: 900px) { .cards--four { grid-template-columns: repeat(4, 1fr); } }
.questions--small li { font-size: clamp(1.05rem, 2.2vw, 1.25rem); }
.questions--on-brand li { border-left-color: var(--on-brand); }
/* v3 (2026-10-06): hero summary line, dates on work, document cards, photo band */
.hero-lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); font-weight: 600; max-width: 46ch; margin-top: 8px; }
.price-list .meta { font-size: 0.9rem; font-weight: 600; color: var(--brand-accent); margin: 0 0 6px; }
.doc-card { text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(19,33,58,.12); }
.doc-card img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.doc-card h3 { font-size: 1rem; color: var(--brand-main); }
.doc-card p { font-size: 0.95rem; }
.doc-card--text { background: var(--brand-main); border-color: var(--brand-main); color: var(--on-brand); justify-content: flex-end; min-height: 260px; }
.doc-card--text h3, .doc-card--text p { color: var(--on-brand); }
.doc-journal { font-family: var(--heading-font); font-weight: 700; font-style: italic; font-size: 1.35rem; margin-bottom: auto; }
.photo-band { margin: 0; position: relative; }
.photo-band img { width: 100%; height: clamp(180px, 30vw, 380px); object-fit: cover; }
.photo-band figcaption { position: absolute; left: 20px; bottom: 14px; background: rgba(19,33,58,.75); color: #fff; font-size: .9rem; padding: 6px 12px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .doc-card { transition: none; } .doc-card:hover { transform: none; } }
.doc-card--figure img { object-fit: contain; object-position: center; background: #fff; border: 1px solid var(--line); }
.work-figure { margin: 16px 0 4px; }
.work-figure img { width: 100%; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--corner) / 2); padding: 8px; }
.work-figure figcaption { font-size: .88rem; color: var(--text-soft); margin-top: 6px; max-width: 70ch; }
.doc-card--figure img { aspect-ratio: 3 / 4; }
/* v4 (2026-10-06): organisations row */
.org-section { padding: 36px 0; }
.org-title { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 14px; }
.orgs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.orgs li { font-family: var(--heading-font); font-weight: 700; font-size: clamp(.95rem, 1.8vw, 1.1rem); color: var(--brand-main); opacity: .85; }
/* v5: About page photo */
.about-hero { background: var(--tint); }
.about-photo { margin: 0; }
.about-photo img { aspect-ratio: 4 / 3; object-fit: cover; object-position: left center; box-shadow: 0 18px 40px rgba(19,33,58,.18); }
.about-photo figcaption { font-size: .9rem; color: var(--text-soft); margin-top: 8px; }
.tutoring-hero { background: var(--tint); }
.tall-photo { justify-self: center; }
.tall-photo img { aspect-ratio: 3 / 4; max-height: 520px; width: auto; max-width: 100%; object-position: center; }
/* v6: weevil photo on Species page */
.weevil-photo { margin: 0; }
.weevil-photo img { aspect-ratio: auto; border-radius: var(--corner); box-shadow: 0 18px 40px rgba(19,33,58,.15); }
.weevil-photo figcaption { font-size: .85rem; color: var(--text-soft); margin-top: 8px; }
.weevil-photo { justify-self: center; text-align: left; }
.weevil-photo img { max-height: 520px; width: auto; max-width: 100%; box-shadow: none; }
/* v7: headshot */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero--portrait::before, .hero--portrait::after { display: none; }
.portrait { width: 100%; max-width: 340px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; justify-self: center; box-shadow: 0 0 0 10px #7AAEF5, 0 0 0 22px #9CC3FF; margin: 22px; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
  .portrait { width: 34vw; max-width: 180px; margin: 14px 10px 10px 0; box-shadow: 0 0 0 5px #7AAEF5, 0 0 0 11px #9CC3FF; justify-self: end; }
  .hero--banner { padding-bottom: 56px; }
}
.about-photo img[src*="headshot"] { aspect-ratio: auto; object-position: center top; max-height: 520px; width: auto; max-width: 100%; }
.story-photo { margin: 24px 0 0; }
.story-photo img { border-radius: var(--corner); }
.story-photo figcaption { font-size: .9rem; color: var(--text-soft); margin-top: 6px; }
/* v8: TEDx photo in home hero */
.hero-photo { margin: 22px; justify-self: center; max-width: 440px; width: 100%; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 0 0 8px #7AAEF5, 0 0 0 18px #9CC3FF; }
.hero-photo figcaption { margin-top: 30px; font-family: var(--heading-font); font-weight: 600; font-size: 1.05rem; color: #9CC3FF; text-align: center; }
@media (max-width: 760px) {
  .hero-photo { width: 40vw; max-width: 260px; margin: 12px 8px 8px 0; justify-self: end; }
  .hero-photo img { border-radius: 14px; box-shadow: 0 0 0 4px #7AAEF5, 0 0 0 9px #9CC3FF; }
  .hero-photo figcaption { margin-top: 16px; font-size: .85rem; }
}
/* v9: featured species photo */
.species-feature { margin: 0 auto; max-width: 900px; }
.species-feature img { width: 100%; background: #fff; border-radius: var(--corner); border: 1px solid var(--line); }
.species-feature figcaption { font-size: .92rem; color: var(--text-soft); margin-top: 10px; }
