/* Brandon Tinder — personal brand site. Palette and rules from BRAND-BRIEF.md §9. */
:root {
  --navy: #14273F;
  --charcoal: #24282E;
  --ivory: #F5F2EC;
  --ivory-deep: #ECE7DE;
  --blue: #42698D;
  --brass: #B4915D;      /* decorative only; never small text on light backgrounds */
  --line: #D9D2C5;
  --muted: #545A63;      /* 6.5:1 on ivory */
  --white: #FFFFFF;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.dark :focus-visible { outline-color: var(--brass); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--navy); color: var(--white);
  padding: .6rem 1rem; z-index: 100; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

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

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--brass); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--charcoal); max-width: 38rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.5rem; gap: 1rem;
}
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem;
  color: var(--navy); text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .8rem; font: inherit; color: var(--navy); cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; align-items: center; }
.site-nav a { color: var(--charcoal); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ivory); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .site-nav li a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .9rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--navy);
  transition: background .15s, color .15s;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.dark .btn-primary { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.dark .btn-primary:hover { background: var(--white); }
.dark .btn-secondary { color: var(--ivory); border-color: var(--ivory); }
.dark .btn-secondary:hover { background: var(--ivory); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.alt { background: var(--ivory-deep); }
.dark { background: var(--navy); color: #E7E3DB; }
.dark h2, .dark h3 { color: var(--white); }
.dark .eyebrow { color: var(--brass); }
.dark a { color: var(--ivory); }
.section-head { max-width: 42rem; margin-bottom: 2.75rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-name { font-size: clamp(2.6rem, 6.5vw, 4.4rem); margin-bottom: .25rem; }
.hero-title { font-size: clamp(1rem, 1.8vw, 1.15rem); font-weight: 600; color: var(--blue); margin-bottom: 2rem; }
.hero-statement {
  font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy);
  line-height: 1.25; margin-bottom: 1.25rem; font-weight: 500;
  padding-left: 1.25rem; border-left: 3px solid var(--brass);
}
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .portrait { order: -1; max-width: 26rem; }
}

/* Portrait frame. Swap the placeholder for the approved photo; keep object-position on the face. */
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #2B3A4F, var(--navy));
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(20, 39, 63, .45);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 4%; }
.portrait::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--brass);
}
.portrait-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: #C9D2DD; font-size: .9rem; padding: 2rem; gap: .5rem;
}
.portrait-placeholder strong { font-family: var(--serif); font-size: 1.15rem; color: var(--white); font-weight: 500; }
/* Closer headshot from the same photo: scale up and anchor on the face, never stretch. */
.portrait.headshot { aspect-ratio: 1 / 1; }
.portrait.headshot img {
  position: absolute; width: 180%; height: auto; max-width: none;
  left: -41%; top: -7%; object-fit: initial;
}
.portrait.upper { aspect-ratio: 4 / 5; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem;
}
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card .meta { font-size: .9rem; color: var(--muted); }
.card .deliverable { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.card .deliverable strong { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.dark .card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .15); }
.dark .card .meta { color: #C9D2DD; }

.problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.problem-list li {
  padding: 1.1rem 0 1.1rem 2.25rem; border-bottom: 1px solid var(--line); position: relative;
}
.problem-list li::before {
  content: ""; position: absolute; left: 0; top: 1.75rem; width: 1.1rem; height: 2px; background: var(--brass);
}

/* Engagement process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: step; }
.process li { counter-increment: step; border-top: 3px solid var(--brass); padding-top: 1rem; }
.process li::before {
  content: counter(step, decimal-leading-zero); display: block;
  font-family: var(--serif); font-size: 1.75rem; color: var(--brass); margin-bottom: .25rem;
}
.process h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.process p { font-size: .95rem; margin: 0; }
@media (max-width: 60rem) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .process { grid-template-columns: 1fr; } }

.pillars { counter-reset: pillar; }
.pillars .card { counter-increment: pillar; }

/* Split layout */
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split.reverse { grid-template-columns: 1.2fr .8fr; }
@media (max-width: 52rem) { .split, .split.reverse { grid-template-columns: 1fr; } .split .portrait { max-width: 24rem; } }

/* Page header for inner pages */
.page-head { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 46rem; }

/* CTA band */
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2rem; }
.cta-band h2 { margin: 0; max-width: 34rem; }

/* ---------- Forms ---------- */
.route-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.route-tabs button {
  font: inherit; font-weight: 600; padding: .75rem 1.25rem; cursor: pointer;
  background: transparent; color: var(--navy); border: 2px solid var(--navy); border-radius: var(--radius);
}
.route-tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); }

form.inquiry { display: grid; gap: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; color: var(--navy); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; padding: .75rem .9rem; border: 1px solid #A69F92; border-radius: var(--radius);
  background: var(--white); color: var(--charcoal); width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.req { color: #9A2B2B; }
.form-status { padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 4px solid var(--blue); background: var(--white); }
.form-status[hidden] { display: none; }
.form-status.notice { border-left-color: var(--brass); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #C9CDD3; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.site-footer .brand { color: var(--white); }
.site-footer a { color: #E7E3DB; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer .fine { font-size: .82rem; color: #A9AFB8; border-top: 1px solid #3A4048; padding-top: 1.25rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
