/* ============================================================
   RFK CFO Group — v1 "Institutional"
   Minimal, editorial, professional. Modern CSS only.
   ============================================================ */

/* ----------  Design tokens  ---------- */
:root {
  color-scheme: light dark;

  /* Brand palette */
  --navy: #1b2440;
  --navy-deep: #131a30;
  --brass: #b08a4f;
  --brass-soft: #c8a673;
  --cream: #f7f4ee;
  --paper: #fffdf9;
  --ink: #1a1d27;
  --ink-soft: #4a4f5e;
  --hairline: #e3ddd1;

  /* Semantic (light theme defaults) */
  --bg: var(--cream);
  --bg-elevated: var(--paper);
  --bg-invert: var(--navy);
  --text: var(--ink);
  --text-muted: var(--ink-soft);
  --text-invert: #f3efe7;
  --accent: var(--brass);
  --accent-text: #7a5c2c;
  --border: var(--hairline);
  --border-strong: #d2c9b6;

  /* Type families */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Type scale — four sizes only.
     sm: labels, captions, fine print · base: body
     lg: sub-headings & ledes · display: hero + section headings */
  --fs-sm: 0.85rem;
  --fs-base: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --fs-lg: 1.4rem;
  --fs-display: clamp(2.1rem, 1.45rem + 2.9vw, 3.4rem);

  /* Layout */
  --container: 1120px;
  --measure: 44ch; /* comfortable reading width for prose */
  --pad: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 4px;
}

/* Dark theme follows the visitor's system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--navy-deep);
    --bg-elevated: #1b2440;
    --bg-invert: #0d1322;
    --text: #ece8df;
    --text-muted: #9aa0b2;
    --text-invert: #ece8df;
    --accent: var(--brass-soft);
    --accent-text: var(--brass-soft);
    --border: #2a3354;
    --border-strong: #38426a;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

/* ----------  Shared bits  ---------- */
.eyebrow,
.section-label {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
}

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

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
/* Cap the measure on the heading itself so `ch` tracks the display font,
   not the body font of the wrapper. */
.section-head h2 {
  margin-top: 1rem;
  max-width: 24ch;
}

h2 {
  font-size: var(--fs-display);
}

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85em 1.7em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-deep);
}
@media (prefers-color-scheme: dark) {
  .btn-primary {
    background: var(--brass);
    color: var(--navy-deep);
  }
  .btn-primary:hover {
    background: var(--brass-soft);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ----------  Header  ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--serif);
}
.brand-mark {
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: var(--fs-lg);
  color: var(--accent-text);
}
.brand-text {
  font-size: var(--fs-base);
  letter-spacing: 0.02em;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 2rem;
  font-size: var(--fs-sm);
}
.site-nav a {
  color: var(--text-muted);
  position: relative;
  padding-block: 0.25rem;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ----------  Hero  ---------- */
.hero {
  padding-block: clamp(4rem, 9vw, 8rem) clamp(3.5rem, 7vw, 6rem);
}

.eyebrow {
  display: block;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: var(--fs-display);
  max-width: 20ch;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hero-lede {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: 1.5;
}
.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  margin: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}
.stat dt {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  color: var(--text);
  line-height: 1;
}
.stat dd {
  margin: 0.6rem 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ----------  About  ---------- */
.about {
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about-aside {
  position: sticky;
  top: 6rem;
}
.portrait {
  margin-top: 1.5rem;
  width: 100%;
  height: unset;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.portrait-name {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-size: var(--fs-lg);
}
.portrait-name span {
  color: var(--accent-text);
}
.portrait-role {
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.about-body h2 {
  margin: 1rem 0 1.5rem;
  max-width: 18ch;
}
.about-body p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 60ch;
}

.credentials {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.credentials li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.credentials li span {
  flex: 0 0 13rem;
  color: var(--text);
  font-weight: 500;
}
.credentials li {
  color: var(--text-muted);
}

/* ----------  Focus  ---------- */
.focus {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.focus-card {
  background: var(--bg-elevated);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: background-color 0.25s ease;
}
.focus-card:hover {
  background: var(--bg);
}
.focus-num {
  font-family: var(--serif);
  font-size: var(--fs-sm);
  color: var(--accent-text);
  letter-spacing: 0.05em;
}
.focus-card h3 {
  font-size: var(--fs-lg);
  margin: 0.85rem 0 0.6rem;
}
.focus-card p {
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.55;
}

/* ----------  Services  ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.service-col-title {
  font-size: var(--fs-lg);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.service-list {
  margin-top: 0.5rem;
}
.service-list li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.service-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  transform: translateY(-0.18em);
  border-radius: 50%;
  background: var(--accent);
}

/* ----------  Values  ---------- */
.values {
  background: var(--bg-invert);
  color: var(--text-invert);
}
.values .section-label {
  color: var(--brass-soft);
}
.values .section-label::before {
  background: var(--brass-soft);
}
.values-quote {
  margin: 1.75rem 0 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-size: var(--fs-display);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.values-quote em {
  font-style: italic;
  color: var(--brass-soft);
}
.values-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.values-tags li {
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  color: #d8d3c8;
}

/* ----------  Contact  ---------- */
.contact {
  border-top: 1px solid var(--border);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact h2 {
  margin: 1.25rem 0;
  max-width: 16ch;
}
.contact-lede {
  color: var(--text-muted);
  max-width: var(--measure);
  font-size: var(--fs-lg);
}

.contact-methods {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.contact-method {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}
.contact-method:hover {
  color: var(--accent-text);
}
.contact-method-label {
  flex: 0 0 4rem;
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.contact-method-value {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  color: var(--text);
  word-break: break-word;
}

/* Form */
.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.1rem;
}
.field {
  display: grid;
  gap: 0.45rem;
}
.field label {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}
.field .optional {
  color: var(--text-muted);
  font-weight: 400;
}
.field input,
.field textarea {
  font: inherit;
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.7em 0.85em;
  width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.field textarea {
  resize: vertical;
  min-height: 6rem;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.contact-form .btn {
  margin-top: 0.25rem;
  justify-self: start;
}
.form-note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ----------  Footer  ---------- */
.site-footer {
  background: var(--bg-invert);
  color: var(--text-invert);
  padding-block: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand--footer .brand-text {
  color: #f3efe7;
}
.footer-tagline {
  font-size: var(--fs-sm);
  color: #cfc9bd;
}
.footer-legal {
  font-size: var(--fs-sm);
  color: #9b9686;
}

/* ----------  Responsive  ---------- */
@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-aside {
    position: static;
  }
  .portrait {
    max-width: 18rem;
  }
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .credentials li span {
    flex-basis: 11rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-cta {
    display: none;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .focus-grid {
    grid-template-columns: 1fr;
  }
}
