/* ==========================================================================
   derrickpolder.com
   Brand tokens live in :root. To change the accent colour for the whole
   site, edit --accent and nothing else.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --accent: #2563FF;                 /* <- the one accent colour */

  --bg: #08090B;
  --bg-alt: #17191D;
  --text: #FFFFFF;
  --text-muted: #B8BCC5;
  --line: #2A2D34;

  /* Derived from --accent: a lighter tint that stays readable as small text. */
  --accent-text: #7FA2FF;
  --accent-text: color-mix(in srgb, var(--accent) 55%, white);
  --on-accent: #FFFFFF;

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(5rem, 11vw, 10rem);
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

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

h1, h2, h3 { margin: 0; font-family: var(--font-display); }

h2 {
  font-weight: 800;
  font-stretch: 88%;
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}
h2.display {
  font-size: clamp(3rem, 10.5vw, 9.5rem);
  line-height: .9;
  letter-spacing: -0.02em;
}
h3 {
  font-family: var(--font-body);
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0; color: var(--text-muted); max-width: 38rem; }
.lede { color: var(--text); font-size: clamp(1.1875rem, 1.6vw, 1.4375rem); line-height: 1.5; }
.fine { font-size: .9375rem; }

.eyebrow {
  display: flex; align-items: center; gap: .875rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::after { content: ""; flex: 0 0 3rem; height: 2px; background: var(--accent); }
.eyebrow-num { color: var(--accent-text); }

/* ---------- Buttons & links ---------- */

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .875rem 1.75rem;
  font-family: var(--font-body); font-size: .9375rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ghost { border-color: #5A5F6B; color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--text); color: var(--bg); }

.text-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 600; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: .4em;
}
.text-link:hover { color: var(--accent-text); }
.text-link-subtle { gap: .4rem; font-size: .9375rem; font-weight: 500; color: var(--text-muted); text-decoration-thickness: 1px; transition: color .2s ease; }

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

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.site-header.is-scrolled, .site-header.is-open { background: var(--bg); border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--header-h); padding-inline: var(--gutter);
}
.brand {
  font-family: var(--font-display); font-weight: 800; font-stretch: 88%;
  font-size: 1.25rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  display: inline-flex; align-items: center; min-height: 2.75rem;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--text);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .5rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none; align-items: center; gap: .75rem;
  min-height: 2.75rem; padding: 0 .25rem;
  background: none; border: 0; color: var(--text); cursor: pointer;
  font-family: var(--font-body); font-size: .8125rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.nav-toggle-bars { display: grid; gap: 6px; width: 1.5rem; }
.nav-toggle-bars span { height: 2px; background: currentColor; transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; inset: 100% 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a {
    display: flex; min-height: 3.5rem;
    font-family: var(--font-display); font-stretch: 88%; font-weight: 800;
    font-size: 1.5rem; letter-spacing: 0;
  }
  .site-nav a::after { display: none; }
}

/* ---------- Hero ---------- */
/* Full-bleed photo with the copy laid over it. The photo file is untouched:
   the darkening is the .hero-bg::after overlay, so it can be tuned here. */

.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh;
}
.hero-bg { position: absolute; inset: 0; background: var(--bg); }
/* The photo is sized from the screen HEIGHT, not its width, so Derrick is
   always shown head to shoes whatever the window shape. Its left and bottom
   edges are feathered so no hard edge shows where it stops. */
.hero-bg img {
  position: absolute;
  top: -9.4vh; top: -9.4svh;
  height: 116vh; height: 116svh;
  width: 174vh; width: 174svh;
  max-width: none;
  left: calc(75vw - 87vh); left: calc(75vw - 87svh);
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, #000 82%, transparent 100%);
  mask-composite: intersect;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 11, .8) 0%, rgba(8, 9, 11, 0) 22%, rgba(8, 9, 11, 0) 86%, var(--bg) 100%),
    linear-gradient(90deg, var(--bg) 0%, rgba(8, 9, 11, .92) 24%, rgba(8, 9, 11, .8) 38%, rgba(8, 9, 11, .42) 54%, rgba(8, 9, 11, .34) 100%);
}
.hero-copy {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 1.5rem;
  width: 100%; max-width: 50rem;
  padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}
.hero h1 {
  font-weight: 800; font-stretch: 80%;
  font-size: clamp(3.5rem, 10vw, 10.5rem);
  line-height: .86; letter-spacing: -0.02em; text-transform: uppercase;
}
.hero h1 .accent { display: block; }
.hero-name {
  display: flex; align-items: center; gap: 1rem;
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted);
}
.hero-name::before { content: ""; flex: 0 0 3rem; height: 2px; background: var(--accent); }
.hero-roles {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem;
  max-width: none; color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-stretch: 100%;
  font-size: clamp(1.0625rem, 1.7vw, 1.5rem); letter-spacing: .1em; text-transform: uppercase;
}
.hero-roles span:not(:last-child)::after {
  content: ""; display: inline-block; width: .4em; height: .4em; border-radius: 50%;
  background: var(--accent); margin-left: 1rem; vertical-align: middle; position: relative; top: -.1em;
}
.hero-intro { max-width: 34rem; padding-left: 1.25rem; border-left: 2px solid var(--accent); color: #D5D8DE; }
.hero .button-row { margin-top: 1rem; }

/* Smaller laptop windows: nudge the photo right so his shoe clears the buttons. */
@media (max-width: 75rem) {
  .hero-bg img { left: calc(79vw - 87vh); left: calc(79vw - 87svh); }
}

/* Phones, and windows that are taller than they are wide: photo on top, copy below. */
@media (max-width: 60rem), (max-aspect-ratio: 13/10) {
  .hero-bg img {
    top: 0; left: 0; width: 100%; height: 64%; object-position: 50% 30%;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(8, 9, 11, .75) 0%, rgba(8, 9, 11, .1) 16%, rgba(8, 9, 11, .15) 34%, rgba(8, 9, 11, .9) 56%, var(--bg) 64%);
  }
  .hero-copy { padding-top: 54vh; padding-top: 54svh; padding-bottom: 4rem; }
  .hero h1 { font-size: clamp(3.5rem, 19vw, 7rem); }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem); align-items: center;
}
.split-reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.split-copy h2 { margin-bottom: .5rem; }
.split-copy .btn, .split-copy .text-link { margin-top: .75rem; }
.split-copy .text-link-subtle { margin-top: 0; }
.split-media img { width: 100%; }
.split-media-tall img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
.split-media-top { align-self: start; }   /* full, uncropped photo aligned to the top of the text */

@media (max-width: 60rem) {
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: -1; }
  .split-media { max-width: 34rem; }
}

/* Loan officer: recognition + background */
.lo-more {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}
.lo-more-lede { margin-top: 1.25rem; color: var(--text); }
.lo-more-copy { display: flex; flex-direction: column; gap: 1.25rem; }
.recognition-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.recognition-list li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: center;
  padding-block: 1.125rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-stretch: 92%;
  font-size: clamp(1.1875rem, 1.7vw, 1.5rem); line-height: 1.2; color: var(--text);
}
.recognition-list svg { color: var(--accent-text); }
@media (max-width: 60rem) { .lo-more { grid-template-columns: 1fr; } }

/* Professional education */
.section-education { border-top: 1px solid var(--line); }
.education-top {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 7vw, 7rem); align-items: end;
}
.education-intro { display: flex; flex-direction: column; gap: 1.5rem; }
.education-host {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--bg-alt);
  box-shadow: inset 3px 0 0 var(--accent);
}
.education-host-title {
  color: var(--text); font-family: var(--font-display); font-weight: 800; font-stretch: 88%;
  font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.05; text-transform: uppercase;
}
.education-contact {
  margin-top: clamp(3rem, 6vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
}
.education-contact p { color: var(--text); }
.education-contact .contact-email { font-size: clamp(1.1875rem, 1.8vw, 1.5rem); }
.education-intro .lede { max-width: 44rem; }
.education-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 7vw, 7rem); margin-top: clamp(3rem, 6vw, 5rem);
}
.education-sub { margin-top: .75rem; color: var(--text); }
.course-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.course-list li {
  display: flex; flex-direction: column; gap: .25rem;
  padding-block: 1.125rem; border-bottom: 1px solid var(--line);
}
.course-title {
  font-family: var(--font-display); font-weight: 700; font-stretch: 92%;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.2; color: var(--text);
}
.course-meta { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
@media (max-width: 60rem) { .education-grid, .education-top { grid-template-columns: 1fr; } }

/* Coaching */
.coaching-roles {
  margin-top: -.5rem; color: var(--accent-text);
  font-family: var(--font-display); font-weight: 700; font-stretch: 92%;
  font-size: clamp(1.25rem, 1.9vw, 1.625rem); line-height: 1.25;
}
.coaching-contact { margin-top: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.coaching-contact .contact-email { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); }

/* Featured podcast card */
.podcast-card {
  display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  margin-top: clamp(3.5rem, 7vw, 6rem); padding: clamp(1.5rem, 3.5vw, 3rem);
  background: var(--bg); border: 1px solid var(--line); border-left: 0;
  box-shadow: inset 3px 0 0 var(--accent);
}
.podcast-art {
  aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: cover;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.5rem; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-weight: 800; font-stretch: 88%;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.02; text-transform: uppercase;
}
img.podcast-art { padding: 0; background: none; }
.podcast-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.podcast-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 88%;
  font-size: clamp(1.875rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.01em;
  text-transform: uppercase; color: var(--text);
}
.podcast-byline { color: var(--text); font-weight: 600; }
.podcast-copy .btn { margin-top: .5rem; }
@media (max-width: 44rem) {
  .podcast-card { grid-template-columns: 1fr; }
  .podcast-art { max-width: 14rem; }
}

/* Speaking */
.section-speaking { }
.section-speaking h2.display { margin-top: 2rem; }
.speaking-figure { margin: clamp(2.5rem, 6vw, 5rem) 0 0; padding-inline: var(--gutter); }
.speaking-figure img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: 50% 55%; }
.speaking-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem); margin-top: clamp(3rem, 6vw, 5rem);
}
.speaking-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.speaking-contact { margin-top: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.speaking-contact .contact-email { font-size: clamp(1.1875rem, 1.6vw, 1.4375rem); }
.topic-list { list-style: none; margin: 1.25rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.topic-list li {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: baseline;
  padding-block: 1.5rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-stretch: 92%;
  font-size: clamp(1.375rem, 2.3vw, 2rem); line-height: 1.15;
}
.topic-num {
  font-family: var(--font-body); font-size: .8125rem; font-weight: 600;
  letter-spacing: .12em; color: var(--accent-text);
}

@media (max-width: 60rem) {
  .speaking-body { grid-template-columns: 1fr; }
  .speaking-figure img { aspect-ratio: 3 / 2; }
}

/* Contact */
.section-contact { border-top: 1px solid var(--line); }
.section-contact h2 { margin-top: 2rem; }
h2.display-question { font-size: clamp(2.75rem, 8vw, 7.5rem); max-width: 14ch; }
.contact-lede { margin-top: 2.5rem; max-width: 42rem; }
.contact-direct { margin-top: 2.5rem; display: flex; flex-direction: column; gap: .25rem; }
.contact-direct .contact-email { font-size: clamp(1.375rem, 2.4vw, 2rem); align-self: flex-start; }
.contact-email {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-size: 1.0625rem; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: .4em;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent-text); }

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

.site-footer { background: var(--bg-alt); padding-block: 4rem 3rem; font-size: .9375rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-name {
  font-family: var(--font-display); font-weight: 800; font-stretch: 88%;
  font-size: 1.5rem; text-transform: uppercase; color: var(--text); letter-spacing: .02em;
}
.footer-roles { margin-top: .25rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--text); text-underline-offset: .3em; }
.footer-links a:hover { color: var(--accent-text); }
.footer-legal {
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .75rem;
}
.footer-legal p { max-width: 60rem; font-size: .8125rem; line-height: 1.6; }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
