/* davidburrells.co.uk — Hybrid Dark/Light design system
   Midnight navy #0A0F1A · Slate #1A2332 · Mid grey #6B7280 · Off-white #F8FAFC · Surface alt #EEF2F7 · Text #101820 · Gold #D4AF37 */

@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("cg-400.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("cg-400i.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("cg-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("inter-600.woff2") format("woff2"); }

:root {
  --navy: #0A0F1A;
  --slate: #1A2332;
  --mid: #6B7280;
  --surface: #F8FAFC;
  --surface-alt: #EEF2F7;
  --text: #101820;
  --gold: #D4AF37;
  --line-light: #DCE2EA;
  --line-dark: rgba(248, 250, 252, 0.16);
  --on-dark: #F8FAFC;
  --on-dark-muted: #A9B3C1;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 76rem;
  --header-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1.1em; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); color: var(--navy); padding: 0.6rem 1rem; border-radius: 999px; z-index: 100; }
.skip:focus { left: 0.75rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--on-dark);
  transition: background-color 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, .site-header.open { background: rgba(10, 15, 26, 0.94); border-bottom-color: var(--line-dark); backdrop-filter: blur(8px); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.mark { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; text-decoration: none; letter-spacing: 0.01em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 2.1rem; }
.nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 0.875rem; font-weight: 500; color: var(--on-dark-muted); transition: color 0.25s; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--on-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); color: var(--on-dark); border-radius: 999px; padding: 0.45rem 1rem; font: 500 0.8125rem var(--sans); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font: 500 0.9375rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn-light { background: var(--surface); color: var(--navy); }
.btn-light:hover { background: #fff; }
.btn-dark { background: var(--navy); color: var(--surface); }
.btn-dark:hover { background: var(--slate); }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-outline.on-dark { color: var(--on-dark); border-color: rgba(248, 250, 252, 0.45); }
.btn-outline.on-dark:hover { border-color: var(--on-dark); }
.btn-outline.on-light { color: var(--navy); border-color: rgba(16, 24, 32, 0.35); }
.btn-outline.on-light:hover { border-color: var(--navy); }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.8125rem; }
.nav .btn { color: var(--on-dark); }
.nav .btn:hover { color: var(--on-dark); }

.link-arrow { display: inline-flex; gap: 0.5rem; align-items: center; font-weight: 500; font-size: 0.9375rem; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: "\2192"; transition: transform 0.25s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Dark sections ---------- */
.dark { background: var(--navy); color: var(--on-dark); }
.dark .muted { color: var(--on-dark-muted); }
.eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 1.5rem; }
.light .eyebrow, .alt .eyebrow { color: var(--mid); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--navy); color: var(--on-dark); overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; background: url("hero-earth.jpg") 70% 55% / cover no-repeat; animation: drift 40s ease-out both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10,15,26,0.9) 0%, rgba(10,15,26,0.6) 38%, rgba(10,15,26,0) 75%),
              linear-gradient(0deg, rgba(10,15,26,0.9) 0%, rgba(10,15,26,0) 42%); }
.hero-body { padding-top: calc(var(--header-h) + 6rem); padding-bottom: 3.5rem; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: 1.06; }
.hero h1 span { display: block; }
.hero h1 .soft { color: var(--on-dark-muted); }
.hero .lede { max-width: 38rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: #D6DCE6; margin: 2.25rem 0 2.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); margin-top: clamp(3rem, 8vh, 5.5rem); }
.pillar { padding: 1.5rem 2rem 0 0; text-decoration: none; display: block; }
.pillar + .pillar { padding-left: 2rem; border-left: 1px solid var(--line-dark); }
.pillar h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.9rem; color: var(--on-dark-muted); margin: 0; max-width: 24rem; }
.pillar:hover h2 { color: var(--gold); }
.pillar h2 { transition: color 0.3s; }

@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .seq { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero .seq:nth-child(2) { animation-delay: 0.15s; }
.hero .seq:nth-child(3) { animation-delay: 0.3s; }
.hero .seq:nth-child(4) { animation-delay: 0.5s; }

/* ---------- Page head (inner pages) ---------- */
.page-head { position: relative; background: var(--navy); color: var(--on-dark); padding: calc(var(--header-h) + 5.5rem) 0 4.5rem; overflow: hidden; isolation: isolate; }
.page-head.has-image::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--head-img) center / cover no-repeat; opacity: 0.5; }
.page-head.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--navy) 10%, rgba(10,15,26,0.35) 100%); }
.page-head h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); max-width: 18ch; }
.page-head .lede { max-width: 40rem; font-size: 1.1875rem; color: #D6DCE6; margin: 1.75rem 0 0; }
.rule { width: 3.5rem; height: 1px; background: var(--gold); border: 0; margin: 0 0 2rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.light { background: var(--surface); }
.alt { background: var(--surface-alt); }
.section h2.h-lg { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split .copy { max-width: 30rem; }
.split .copy p { color: #3A4452; font-size: 1.0625rem; }
.split figure { margin: 0; overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 3.4; }
.split figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line-light); border-radius: 6px; overflow: hidden; text-decoration: none; transition: border-color 0.3s, transform 0.4s; }
.card:hover { border-color: #9AA5B4; }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--slate); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card:hover .thumb img { transform: scale(1.04); }
.thumb.tile { background: radial-gradient(120% 90% at 80% 110%, #1d3a6b 0%, rgba(26,35,50,0) 60%), linear-gradient(160deg, #0A0F1A, #1A2332); position: relative; }
.thumb.tile::after { content: ""; position: absolute; left: 1.25rem; bottom: 1.25rem; width: 2.25rem; height: 1px; background: var(--gold); }
.card-body { padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.9rem; color: #4B5563; flex: 1; margin-bottom: 1.25rem; }
.meta { gap: 1rem; white-space: nowrap; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); display: flex; justify-content: space-between; }

.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.two .card-body { padding: 2rem; }

/* ---------- Perspective ---------- */
.perspective { position: relative; overflow: hidden; isolation: isolate; }
.perspective::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("wave.jpg") 60% 50% / cover no-repeat; opacity: 0.55; }
.perspective::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--navy) 25%, rgba(10,15,26,0.2) 100%); }
blockquote.big { margin: 0; max-width: 44rem; }
blockquote.big p { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.2; margin: 0 0 2rem; }
blockquote.big footer { border-top: 1px solid var(--gold); display: inline-block; padding-top: 1rem; font-size: 0.8125rem; color: var(--on-dark-muted); }
blockquote.big footer strong { display: block; color: var(--on-dark); font-weight: 500; font-size: 1rem; }

/* ---------- Prose ---------- */
.prose { max-width: 40rem; }
.prose h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin: 3.25rem 0 1.1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; }
.prose p, .prose li { font-size: 1.0625rem; color: #2B3440; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--gold); }
.prose .pull { font-family: var(--serif); font-size: 1.75rem; line-height: 1.25; border-left: 1px solid var(--gold); padding-left: 1.5rem; margin: 2.5rem 0; color: var(--text); }

/* ---------- Paper list ---------- */
.papers { border-top: 1px solid var(--line-light); }
.paper { display: grid; grid-template-columns: 9rem 1fr auto; gap: 2rem; padding: 2.25rem 0; border-bottom: 1px solid var(--line-light); align-items: start; }
.paper .num { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); padding-top: 0.6rem; }
.paper h3 { font-size: 1.9rem; margin-bottom: 0.6rem; }
.paper p { margin: 0; max-width: 38rem; color: #3A4452; }

/* ---------- Framework steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-dark); }
.step { padding: 2rem 2rem 0 0; }
.step + .step { padding-left: 2rem; border-left: 1px solid var(--line-dark); }
.step .tag { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted); }
.step h3 { font-size: 1.9rem; margin: 0.6rem 0 0.6rem; }
.step.current h3 { color: var(--gold); }
.step p { font-size: 0.95rem; color: var(--on-dark-muted); margin: 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; padding: 2.1rem 0; border-bottom: 1px solid var(--line-light); }
.timeline .when { font-family: var(--serif); font-size: 1.7rem; line-height: 1.2; }
.timeline h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.timeline p { margin: 0; max-width: 38rem; color: #3A4452; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.25rem; max-width: 34rem; }
.field label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.4rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: 400 1rem var(--sans); padding: 0.85rem 1rem; border-radius: 8px;
  border: 1px solid #C3CBD6; background: #fff; color: var(--text);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.field.check input { margin-top: 0.3rem; accent-color: var(--navy); }
.field.check label { font-weight: 400; font-size: 0.875rem; margin: 0; color: #3A4452; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-status { min-height: 1.5em; font-size: 0.9375rem; margin: 0; }
.dark .field label, .dark .field.check label { color: var(--on-dark); }
.dark .field input[type="text"], .dark .field input[type="email"] { background: rgba(248,250,252,0.06); border-color: rgba(248,250,252,0.3); color: var(--on-dark); }
.dark .field input::placeholder { color: var(--on-dark-muted); }
.dark .field.check input { accent-color: var(--gold); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: end; max-width: 36rem; }
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.follow-grid h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-dark); border-top: 1px solid var(--line-dark); padding: 3rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: center; }
.footer-id { display: flex; gap: 1rem; align-items: center; }
.footer-id .mark { font-size: 2.1rem; }
.footer-id strong { display: block; font-weight: 500; font-size: 0.9rem; }
.footer-id span { font-size: 0.8rem; color: var(--on-dark-muted); }
.footer-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; font-size: 0.8125rem; color: var(--on-dark-muted); }
.footer-nav a:hover { color: var(--on-dark); }
.social { display: flex; gap: 1.1rem; justify-content: flex-end; }
.social a { color: var(--on-dark-muted); display: grid; place-items: center; width: 2rem; height: 2rem; transition: color 0.25s; }
.social a:hover { color: var(--gold); }
.social svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); font-size: 0.75rem; color: var(--on-dark-muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.legal a { color: inherit; }

/* ---------- Consent banner ---------- */
.consent { position: fixed; left: 1rem; bottom: 1rem; z-index: 60; max-width: 24rem; background: var(--slate); color: var(--on-dark); border: 1px solid var(--line-dark); border-radius: 12px; padding: 1.25rem 1.25rem 1.1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.35); }
.consent[hidden] { display: none; }
.consent p { font-size: 0.875rem; line-height: 1.55; margin: 0 0 0.9rem; color: #D6DCE6; }
.consent .consent-title { font-family: var(--serif); font-size: 1.35rem; color: var(--on-dark); margin-bottom: 0.4rem; }
.consent a { color: var(--on-dark); }
.consent-actions { display: flex; gap: 0.6rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 64rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .paper { grid-template-columns: 1fr; gap: 0.5rem; }
  .paper .num { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr; justify-items: start; }
  .footer-nav { justify-content: flex-start; }
  .social { justify-content: flex-start; }
}
@media (max-width: 52rem) {
  .consent { left: 0.75rem; right: 0.75rem; max-width: none; }
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: rgba(10,15,26,0.98); flex-direction: column; align-items: flex-start; gap: 1.5rem; padding: 1.5rem var(--gutter) 2rem; border-bottom: 1px solid var(--line-dark); display: none; }
  .site-header.open .nav { display: flex; }
  .nav ul { flex-direction: column; gap: 1.1rem; }
  .nav a { font-size: 1.0625rem; }
  .hero-body { padding-top: calc(var(--header-h) + 4rem); }
  .hero::before { background: linear-gradient(0deg, rgba(10,15,26,0.96) 0%, rgba(10,15,26,0.7) 55%, rgba(10,15,26,0.45) 100%); }
  .pillars, .steps { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar, .step, .step + .step { padding: 1.4rem 0; border-left: 0; }
  .pillar + .pillar, .step + .step { border-top: 1px solid var(--line-dark); }
  .split, .follow-grid { grid-template-columns: 1fr; }
  .split figure { order: -1; aspect-ratio: 16 / 10; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 0.5rem; }
  .inline-form { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media, .hero .seq { animation: none; }
  .thumb img, .card, .link-arrow::after { transition: none; }
}

.site-header .mark-name { font-size: 1.45rem; white-space: nowrap; }
@media (max-width: 52rem) { .site-header .mark-name { font-size: 1.25rem; } }

/* Contact: direct-contact panel */
.contact-side { background: var(--navy); color: #fff; padding: 2.5rem 2.25rem; border-radius: 4px; }
.contact-side .eyebrow { color: var(--gold); margin: 0 0 0.9rem; }
.contact-side h2 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; line-height: 1.15; margin: 0 0 1.5rem; color: #fff; }
.contact-side .big-mail { display: inline-block; font-size: 1.15rem; color: #fff; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 0.2rem; margin-bottom: 2rem; word-break: break-word; }
.contact-side .big-mail:hover { color: var(--gold); }
.social-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,0.18); }
.social-list li { margin: 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.social-list a { display: flex; align-items: baseline; gap: 0.9rem; padding: 1rem 0; color: #fff; text-decoration: none; }
.social-list a span { font-weight: 500; }
.social-list a small { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.social-list a i { margin-left: auto; font-style: normal; color: var(--gold); transition: transform .2s; }
.social-list a:hover i { transform: translateX(4px); }
.social-list a:hover span { color: var(--gold); }
@media (max-width: 52rem) { .contact-side { padding: 2rem 1.5rem; } }

.paper .soon { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); padding-top: 0.7rem; white-space: nowrap; }
