:root {
  --ground: #ffffff;
  --ink: #000000;
  --muted: #4d4d4d;
  --tint: #f5f5f5;
  --line: #b3b3b3;
  --accent: #0051cc;
  --accent-ink: #ffffff;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --display: "Mulish", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
img { display: block; width: 100%; height: auto; object-fit: cover; }
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(44px, 7vw, 90px); }
h2 { font-size: clamp(36px, 5vw, 72px); }
h3 { font-size: clamp(26px, 3vw, 40px); }
p { margin: 0 0 1em; color: var(--ink); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 22px 6vw; border-bottom: 1px solid var(--tint); }
.brand { font-family: var(--display); font-size: 24px; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 17px; padding: 6px 0; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a[aria-current="page"] { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 80vh; }
main { overflow-x: clip; }
.hero-text { padding: 8vw 6vw; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hero-image { position: relative; }
.hero-image .card { position: absolute; left: 24px; bottom: 24px; background: var(--ground); padding: 18px 20px; max-width: min(320px, calc(100% - 48px)); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: 17px; border: 0; cursor: pointer; border-radius: 0; }
.btn:hover { background: #0042a8; }
.btn:focus-visible { outline-color: var(--ink); }

.section { padding: 9vw 6vw; }
.section.tint { background: var(--tint); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.split.flip .split-media { order: 2; }
.pair { display: grid; grid-template-columns: 1fr 1fr; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--tint); }
.block { padding: 48px 36px; background: var(--ground); }
.block.tinted { background: var(--tint); }
.block h3 { margin-bottom: 14px; }
.center { text-align: center; max-width: 760px; margin: 0 auto; }
.page-intro { padding: 8vw 6vw 4vw; max-width: 1000px; }
.form-wrap { max-width: 620px; }
.form-wrap label { display: block; font-weight: 600; margin: 18px 0 6px; }
.form-wrap input, .form-wrap textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); }
.form-wrap textarea { min-height: 140px; }
.form-wrap .err { color: #b00020; font-size: 15px; margin-top: 6px; }
.thanks { font-size: 20px; padding: 24px; background: var(--tint); }
.links li { margin-bottom: 14px; }
.site-footer { padding: 6vw 6vw 9vw; background: var(--tint); }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 6vw; }
.foot-cols nav { display: flex; flex-direction: column; gap: 10px; }
.foot-name { font-family: var(--display); font-size: 24px; }
.emergency { margin-top: 36px; font-size: 15px; color: var(--muted); max-width: 900px; }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .hero, .split, .pair { grid-template-columns: 1fr; }
  .split.flip .split-media { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .blocks { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 80px; }
}

/* Motion: the hero enters on load and drifts as the page scrolls; sections rise into view. */
.hero-text > * { animation: rise 1.2s cubic-bezier(.23, 1, .32, 1) both; }
.hero-text > *:nth-child(2) { animation-delay: .1s; }
.hero-text > *:nth-child(3) { animation-delay: .2s; }
.hero-image { animation: settle 1.6s cubic-bezier(.23, 1, .32, 1) both; }
.mt { margin-top: 48px; }
@keyframes rise { from { opacity: .5; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { filter: blur(6px); transform: scale(1.04); } to { filter: none; transform: none; } }
@supports (animation-timeline: view()) {
  .hero-image img { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
  @keyframes drift { from { transform: scale(1); } to { transform: scale(1.12) translateY(-30px); } }
  .section, .split, .pair, .gallery, .blocks { animation: sectionIn linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes sectionIn { from { opacity: .35; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}
@supports not (animation-timeline: view()) {
  .hero-image img, .section, .split, .pair, .gallery, .blocks { animation: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Template layout (Chuli Earth): text buttons, centred name header, home sections in template order. */
.btn { background: transparent; color: var(--ink); text-decoration: underline; border-radius: 6px; padding: 8px 0; min-height: 42px; font-size: 15px; }
.btn:hover { background: transparent; color: var(--accent); }
.site-header { flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
.brand { display: block; text-align: center; font-size: clamp(18px, 4.6vw, 26px); letter-spacing: .02em; line-height: 1.3; padding: 22px 6vw 18px; overflow-wrap: anywhere; max-width: 100%; }
.site-header nav { justify-content: flex-start; gap: 0; border-top: 1px solid #e8e5dc; }
.site-header nav a { flex: 1 1 0; justify-content: center; font-size: 14px; min-height: 44px; border-right: 1px solid #e8e5dc; }
.site-header nav a:last-child { border-right: 0; }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 601px; }
.hero-text { text-align: center; align-items: center; padding: 6vw; }
.hero-text h1 { font-size: clamp(44px, 6.5vw, 90px); }
.hero-text p { max-width: 420px; }
.hero-image img { height: 100%; min-height: 601px; }
.hero-image .card { background: var(--tint); }
.pair-a img { aspect-ratio: .89 / 1; }
.pair-b img { aspect-ratio: .91 / 1; }
.pair img { height: auto; }
.t-text { display: flex; justify-content: center; align-items: center; min-height: 652px; background: var(--ground); }
.colour-panel { width: min(640px, 100%); min-height: 652px; background: #7fcce7; padding: 96px 56px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.colour-panel h2 { max-width: 360px; margin: 0 auto .5em; }
.colour-panel p { max-width: 460px; margin: 0 auto 1em; }
.gallery2 { display: grid; grid-template-columns: 1fr 1fr; }
.gallery2 img:nth-child(-n+2) { aspect-ratio: .89 / 1; }
.gallery2 img:nth-child(n+3) { aspect-ratio: .94 / 1; }
.t-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.t-split-text { padding: 96px 6vw 96px 122px; display: flex; flex-direction: column; justify-content: center; }
.t-split-text h2 { text-align: center; }
.t-split-text p { text-align: justify; font-size: 15px; line-height: 1.7; }
.t-split-text .btn { align-self: center; }
.t-split-media { min-height: 651px; }
.t-split-media img { height: 100%; min-height: 651px; }
.t-fees { background: var(--tint); padding: 107px 6vw 107px; text-align: center; }
.t-fees h2 { margin-bottom: 48px; }
.t-fees p { max-width: 720px; margin: 0 auto 48px; }
.t-form { padding: 131px 6vw 137px; text-align: center; }
.t-form h2 { margin-bottom: 24px; }
.t-form > p { max-width: 720px; margin: 0 auto 36px; }
.t-form-wrap { max-width: 515px; margin: 0 auto; text-align: left; }
.t-form-wrap .btn { padding: 8px 0; }
@media (max-width: 900px) {
  .hero, .t-split { grid-template-columns: 1fr; }
  .t-split-text { padding: 64px 6vw; }
  .gallery2 { grid-template-columns: 1fr 1fr; }
  .colour-panel { padding: 64px 28px; min-height: 0; }
}

/* Owner portrait beside About Me: portrait shape, cropped toward the face. */
.portrait { width: 260px; max-width: 70%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 22%; margin: 0 auto 32px; }

/* Owner portrait as the large right-hand image of the home About Me section, cropped toward the face. */
.t-split-media img.split-portrait { width: 100%; max-width: none; height: 100%; min-height: 651px; aspect-ratio: auto; object-fit: cover; object-position: 50% 22%; margin: 0; }

/* Owner logo in the footer brand block: modest size, unaltered. */
.foot-logo { width: 160px; height: auto; display: block; margin: 0 0 16px; }

/* New home section in the gap between the pictures: sage background, comfortable reading width, AA contrast (#2b2b2b on #DDE5DA). */
.t-note { background: #DDE5DA; color: #2b2b2b; padding: 96px 6vw; }
.t-note-inner { max-width: 680px; margin: 0 auto; }
.t-note p { font-size: 17px; line-height: 1.7; margin: 0 0 22px; text-align: left; }
.t-note p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .t-note { padding: 64px 6vw; } .t-note p { font-size: 16px; } }

.t-note h2 { color: #2b2b2b; font-size: clamp(30px, 4vw, 44px); text-align: left; margin-bottom: 24px; }

/* Owner's second logo, enlarged in the second picture row: contained, never cropped, centred on a cream panel. */
.pair-b .pair-logo { background: #fffdf7; display: flex; align-items: center; justify-content: center; aspect-ratio: .91 / 1; padding: 10%; box-sizing: border-box; }
.pair-b .pair-logo img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }

/* Resources page: resource cards in a scannable grid, sage panels, readable on phone. */
.res-grid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.res-card { background: #DDE5DA; color: #2b2b2b; border-radius: 6px; padding: 28px; margin: 0; }
.res-card a { color: #0051cc; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.res-card strong { display: block; font-weight: 600; margin-bottom: 8px; }
.res-card p { margin: 0; line-height: 1.6; }

/* Home page only: pictures about 25% smaller so the written content leads; text gets more size and room. */
main:has(.t-note) .hero { min-height: 450px; }
main:has(.t-note) .hero-image img { min-height: 450px; max-height: 520px; }
main:has(.t-note) .pair-a, main:has(.t-note) .pair-b, main:has(.t-note) .gallery2 { max-width: 1080px; margin-left: auto; margin-right: auto; }
main:has(.t-note) .t-split { grid-template-columns: 1.15fr .85fr; }
main:has(.t-note) .t-split-media, main:has(.t-note) .t-split-media img.split-portrait { min-height: 480px; }
main:has(.t-note) .t-split-text { padding: 80px 5vw 80px 8vw; }
main:has(.t-note) h2 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.15; }
main:has(.t-note) .t-note { padding: 104px 6vw; }
main:has(.t-note) .t-note-inner { max-width: 720px; }
main:has(.t-note) .t-note p { font-size: 19px; line-height: 1.75; margin-bottom: 26px; }
main:has(.t-note) .t-split-text p { font-size: 18px; line-height: 1.75; text-align: left; }
main:has(.t-note) .t-fees { padding: 112px 6vw; }
main:has(.t-note) .t-fees p { font-size: 19px; line-height: 1.75; max-width: 720px; }
main:has(.t-note) .t-form > p { font-size: 18px; line-height: 1.7; }
main:has(.t-note) .hero-text p { font-size: 19px; line-height: 1.6; max-width: 460px; }
main:has(.t-note) .btn { font-size: 17px; }
@media (max-width: 900px) {
  main:has(.t-note) .hero-image img { min-height: 0; max-height: 300px; height: 300px; }
  main:has(.t-note) .hero { min-height: 0; }
  main:has(.t-note) .pair-a, main:has(.t-note) .pair-b { max-width: 420px; }
  main:has(.t-note) .gallery2 { max-width: 460px; }
  main:has(.t-note) .t-split-media, main:has(.t-note) .t-split-media img.split-portrait { min-height: 0; height: 360px; }
  main:has(.t-note) .t-split-text { padding: 56px 6vw; }
  main:has(.t-note) .t-note { padding: 64px 6vw; }
  main:has(.t-note) .t-note p, main:has(.t-note) .t-fees p, main:has(.t-note) .t-split-text p { font-size: 18px; }
  main:has(.t-note) .t-fees { padding: 64px 6vw; }
}
