/* Berriman Estate. Colours from the estate logo and old site: gold #FCBA41, maroon #873731. */
:root {
  --gold: #fcba41;
  --gold-deep: #e9a21f;
  --maroon: #873731;
  --maroon-deep: #5f1107;
  --cream: #fbf6ec;
  --sand: #f4ead6;
  --ink: #2b2523;
  --ink-soft: #5c524e;
  --line: #e7dccb;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(60, 25, 15, .35);
  --wrap: 1180px;
  --head: "Basic", "Raleway", system-ui, sans-serif;
  --body: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.15; color: var(--maroon); margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; color: var(--gold-deep); margin: 0 0 .6em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .6em; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; text-decoration: none; border-radius: 999px; padding: .85em 1.7em; border: 2px solid var(--gold); background: var(--gold); color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: var(--white); border-color: var(--maroon); }
.btn--light { background: transparent; color: var(--white); border-color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--maroon); border-color: var(--white); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Top bar and header */
.topbar { background: var(--maroon); color: var(--white); font-size: .9rem; }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 22px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { text-decoration: underline; }
.topbar svg { width: 15px; height: 15px; }
.header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 0 var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { position: relative; align-self: flex-start; display: block; background: var(--white); border: 3px solid var(--gold); border-top: 0; border-radius: 0 0 22px 22px; padding: 10px 18px 12px; margin-bottom: -38px; box-shadow: var(--shadow); z-index: 2; }
.brand img { width: 170px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--gold); color: var(--maroon); }
.nav .btn { padding: .6em 1.4em; border-bottom-width: 2px; }
.nav .btn:hover, .nav .btn[aria-current="page"] { color: var(--ink); border-color: var(--gold-deep); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--maroon); }
.menu-toggle svg { width: 30px; height: 30px; }

@media (max-width: 900px) {
  .topbar .wrap { justify-content: center; gap: 18px; }
  .topbar .t-email span { display: none; }
  .header .wrap { min-height: 64px; }
  .brand { padding: 8px 12px 9px; margin-bottom: -30px; border-radius: 0 0 16px 16px; }
  .brand img { width: 128px; }
  .menu-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); padding: 34px 24px 24px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.35); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 18px; justify-content: center; border-bottom: 2px solid var(--gold); }
}

/* Hero */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: #2c7fd6; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 70% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,40,70,0) 35%, rgba(20,30,50,.55) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 140px; padding-bottom: 84px; }
.hero .eyebrow { color: var(--gold); text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero h1 { color: var(--white); max-width: 15ch; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero p.lead { color: rgba(255,255,255,.95); max-width: 40ch; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero .btn { margin-top: 10px; }
.hero__scroll { position: absolute; left: 50%; bottom: 20px; z-index: 1; transform: translateX(-50%); color: var(--white); opacity: .85; }
.hero__scroll svg { width: 34px; height: 34px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero__scroll svg { animation: none; } }
@media (max-width: 700px) {
  .hero { min-height: 78vh; }
  .hero picture img { object-position: 80% 20%; }
  .hero .wrap { padding-bottom: 70px; }
}

/* Page banner (inner pages) */
.banner { position: relative; background: var(--maroon) url("/img/banner-maroon-1600.webp") center / cover no-repeat; color: var(--white); padding: 92px 0 56px; text-align: center; }
.banner h1 { color: var(--white); margin: 0; }
.banner .eyebrow { color: var(--gold); }
@media (min-width: 1600px) { .banner { background-image: url("/img/banner-maroon-2560.webp"); } }

/* Sections */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--cream { background: var(--cream); }
.section--sand { background: var(--sand); }
.leaves { position: relative; }
.leaves::before, .leaves::after { content: ""; position: absolute; top: 0; width: 170px; height: 170px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23fcba41' stroke-width='2' stroke-linecap='round' opacity='.55'%3E%3Cpath d='M8 4c18 22 40 40 74 56'/%3E%3Cpath d='M24 18c-6 10-4 20 6 24 4-10 2-18-6-24zM42 30c-4 12 0 20 10 22 2-10-2-18-10-22zM60 40c-2 12 4 18 14 18 0-10-6-16-14-18zM30 22c10-6 20-4 24 6-10 4-18 2-24-6zM50 34c10-4 20 0 22 10-10 2-18-2-22-10z'/%3E%3C/g%3E%3C/svg%3E") no-repeat; pointer-events: none; }
.leaves::before { left: 0; }
.leaves::after { right: 0; transform: scaleX(-1); }
@media (max-width: 700px) { .leaves::before, .leaves::after { width: 90px; height: 90px; } }
.intro { max-width: 760px; margin: 0 auto; text-align: center; }

/* Document cards */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 48px; }
.docs--4 { grid-template-columns: repeat(4, 1fr); }
.doc { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.doc:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -22px rgba(60,25,15,.45); }
.doc__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.doc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.doc:hover .doc__img img { transform: scale(1.04); }
.doc__body { padding: 20px 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.doc__body h3 { margin: 0; color: var(--maroon); }
.doc__body small { display: block; color: var(--ink-soft); font-size: .85rem; }
.doc__dl { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: var(--ink); }
.doc__dl svg { width: 20px; height: 20px; }
.doc--plain .doc__body { padding: 28px 24px 24px; flex-direction: column; align-items: flex-start; height: 100%; gap: 14px; }
.doc--plain .doc__icon { width: 56px; height: 56px; border-radius: 14px; background: var(--cream); color: var(--maroon); display: grid; place-items: center; flex: none; }
.doc--plain .doc__icon svg { width: 28px; height: 28px; }
.doc--plain .doc__text { flex: 1; }
.doc--plain .doc__text small { margin-top: 4px; }
.doc--plain .doc__dl { width: auto; height: auto; border-radius: 999px; padding: 8px 16px; gap: 8px; display: inline-flex; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.doc--plain .doc__dl svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .doc--plain .doc__body { flex-direction: row; align-items: center; } .doc--plain .doc__dl span { display: none; } .doc--plain .doc__dl { padding: 11px; } }
@media (max-width: 980px) { .docs--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .docs, .docs--4 { grid-template-columns: 1fr; gap: 18px; } .doc__img { aspect-ratio: 16 / 9; } }

/* Feature band with photo */
.band { position: relative; color: var(--white); overflow: hidden; }
.band picture, .band picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.band picture img { object-fit: cover; object-position: center 35%; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(95,17,7,.86) 0%, rgba(95,17,7,.6) 45%, rgba(95,17,7,.05) 100%); z-index: 1; }
.band .wrap { position: relative; z-index: 2; padding-top: clamp(80px, 12vw, 150px); padding-bottom: clamp(80px, 12vw, 150px); }
.band__text { max-width: 520px; }
.band h2 { color: var(--white); }
.band p { font-size: 1.15rem; color: rgba(255,255,255,.95); }
@media (max-width: 700px) { .band::before { background: linear-gradient(180deg, rgba(95,17,7,.35) 0%, rgba(95,17,7,.88) 60%); } .band .wrap { padding-top: 260px; } }

/* Highlights (Living page) */
.highlight { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.highlight + .highlight { margin-top: clamp(64px, 9vw, 110px); }
.highlight--flip .highlight__img { order: 2; }
.highlight__img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.highlight__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stats { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stats li { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; padding: 14px 16px; line-height: 1.3; }
.stats strong { display: block; font-family: var(--head); font-weight: 400; font-size: 1.5rem; color: var(--maroon); }
.stats span { font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 860px) { .highlight { grid-template-columns: 1fr; } .highlight--flip .highlight__img { order: 0; } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* Register / form */
.register { position: relative; overflow: hidden; background: var(--maroon); }
.register > picture, .register > picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.register > picture img { object-fit: cover; object-position: center 40%; }
.register::before { content: ""; position: absolute; inset: 0; background: rgba(95,17,7,.55); z-index: 1; }
.register .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.register__intro { color: var(--white); padding-top: 12px; }
.register__intro h2 { color: var(--white); }
.register__intro p { color: rgba(255,255,255,.95); font-size: 1.1rem; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; opacity: .85; }
.contact-list a, .contact-list span.v { color: var(--white); text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.card { background: var(--white); border-radius: 22px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 30px 60px -25px rgba(0,0,0,.5); }
.card h3 { margin-bottom: 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.field input { font: inherit; font-size: 1rem; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(252,186,65,.25); }
.field input[aria-invalid="true"] { border-color: #b3261e; }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--maroon); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form .btn { grid-column: 1 / -1; justify-content: center; font-size: 1.05rem; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form-msg { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.2em; }
.form-msg.err { color: #b3261e; }
.form-done { text-align: center; padding: 26px 6px; }
.form-done svg { width: 64px; height: 64px; color: var(--maroon); margin: 0 auto 10px; }
@media (max-width: 860px) { .register .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

/* Note */
.note { margin: 40px auto 0; max-width: 760px; text-align: center; background: var(--cream); border: 1px dashed var(--gold-deep); border-radius: 14px; padding: 16px 20px; color: var(--ink-soft); }

/* Prose (privacy) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }

/* Footer */
.footer { background: #2b2523; color: rgba(255,255,255,.85); padding: 56px 0 28px; font-size: .95rem; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.footer h4 { font-family: var(--head); font-weight: 400; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; margin: 0 0 14px; }
.footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__brand img.berriman { width: 190px; background: var(--white); border-radius: 14px; padding: 10px 14px; }
.footer__brand p { margin-top: 16px; max-width: 34ch; }
.footer__dev { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; }
.footer__dev img { width: 120px; }
.footer__base { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.65); }
.footer__base a { color: rgba(255,255,255,.75); text-decoration: underline; }
@media (max-width: 860px) { .footer .wrap { grid-template-columns: 1fr; gap: 30px; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
