/* ==========================================================================
   TRN — trncor.net
   Design system per TRN Brand Guideline v2 (docs/04-design-system.md)
   Olive/sage/warm-neutral · Jost headings · Source Sans 3 body
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subsets) ---------- */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jost-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jost-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-sans-3-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-sans-3-600-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --accent: #7C7A2B;        /* large text (>=24px) + graphics only */
  --accent-dark: #4F4D1C;   /* links, buttons, small accent text — 8.71:1 */
  --accent-hover: #3E3C14;
  --accent-sage: #8C9970;   /* graphics + focus ring only */
  --accent-soft: #C3CCB4;
  --accent-wash: #EEF1E8;
  --ink: #1C1B17;
  --ink-muted: #5A584F;
  --ink-inverse-muted: #B8B6AC;
  --surface: #FFFFFF;
  --surface-alt: #F7F7F4;
  --line: #E3E2DB;
  --error: #A64545;
  --font-head: 'Jost', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --radius: 10px;
  --radius-btn: 8px;
  --maxw: 1120px;
  --shadow-card: 0 2px 16px rgba(28, 27, 23, 0.07);
}

/* ---------- Reset / base ---------- */
*, *::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;
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
ul, ol { margin: 0 0 16px; padding-left: 24px; }
strong { font-weight: 600; }
:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
  border-radius: 2px;
}
.final-cta :focus-visible,
.trust-bar :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 var(--radius-btn) 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--wash { background: var(--accent-wash); }
.section--alt { background: var(--surface-alt); }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 16px;
}
.lead { font-size: 1.1875rem; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.small { font-size: 0.9375rem; }
.center { text-align: center; }
.section-intro { max-width: 720px; }
.section-intro--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  min-height: 48px;
  border-radius: var(--radius-btn);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn--primary { background: var(--accent-dark); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--secondary { background: transparent; color: var(--accent-dark); border-color: var(--accent-dark); }
.btn--secondary:hover { background: var(--accent-wash); color: var(--accent-dark); }
.btn--on-dark { background: #fff; color: var(--accent-dark); }
.btn--on-dark:hover { background: var(--accent-wash); color: var(--accent-hover); }
.btn--ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn--ghost-on-dark:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.final-cta .btn:focus-visible, .site-footer .btn:focus-visible { outline-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.site-header__logo { display: inline-flex; align-items: center; flex-shrink: 0; order: 1; }
.site-header__logo img { height: 30px; width: auto; }
/* DOM places the nav after the actions so the open mobile menu follows its
   toggle in focus order; flex order restores the desktop visual sequence. */
.site-nav { margin-left: auto; order: 2; }
.site-header__actions { order: 3; }
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-dark); }
.site-nav a[aria-current="page"] { box-shadow: 0 2px 0 0 var(--accent-dark); }
.site-header__actions { display: flex; align-items: center; gap: 16px; }
.site-header__phone {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--accent-dark);
  text-decoration: none;
  white-space: nowrap;
}
.site-header__phone:hover { color: var(--ink); }
.site-header__cta { padding: 10px 18px; min-height: 44px; font-size: 0.9375rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 10px;
  cursor: pointer;
  line-height: 0;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 920px) {
  .site-header__inner { gap: 12px; min-height: 64px; }
  .site-header__logo img { height: 26px; }
  .nav-toggle { display: inline-flex; order: 4; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .site-nav li:last-child a { border-bottom: none; }
  .site-header__actions { margin-left: auto; gap: 10px; }
  .site-header__phone { font-size: 0.875rem; }
  .site-header__cta { padding: 9px 14px; font-size: 0.875rem; min-height: 44px; }
}
@media (max-width: 480px) {
  .site-header__phone span { display: none; } /* keep icon-size phone link */
  .site-header__phone::after { content: 'Call'; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--accent-wash) 0%, #F6F8F1 100%); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 80px;
}
.hero__copy .eyebrow { color: var(--accent-dark); }
.hero__copy h1 { margin-bottom: 20px; }
.hero__sub { font-size: 1.1875rem; color: var(--ink-muted); max-width: 34em; margin-bottom: 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero__note { font-size: 0.9375rem; color: var(--ink-muted); }
.hero__media img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  max-height: 560px;
}
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 56px; }
  .hero__media img { aspect-ratio: 16 / 10; max-height: 320px; }
}

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--accent-dark); color: #fff; }
.trust-bar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  list-style: none;
  margin: 0;
  padding: 18px 0;
}
.trust-bar li {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding: 0 28px;
  position: relative;
}
.trust-bar li + li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}
@media (max-width: 720px) {
  .trust-bar ul { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 0; }
  .trust-bar li { padding: 0; }
  .trust-bar li + li::before { display: none; }
}

/* ---------- Advisor / identity card ---------- */
.advisor-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
}
.advisor-card__photo img {
  width: 200px;
  height: 242px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--accent-wash);
}
.advisor-card__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 4px;
}
.advisor-card__role { color: var(--ink-muted); margin: 0 0 4px; }
.advisor-card__license { color: var(--ink-muted); font-size: 0.9375rem; margin: 0 0 20px; }
.advisor-card__contacts { display: flex; flex-wrap: wrap; gap: 12px; }
.advisor-card__contacts .btn { min-height: 44px; padding: 10px 20px; font-size: 0.9375rem; }
.advisor-card--compact { padding: 24px; gap: 20px; box-shadow: none; }
.advisor-card--compact .advisor-card__photo img { width: 96px; height: 116px; }
.advisor-card--compact .advisor-card__name { font-size: 1.2rem; }
@media (max-width: 640px) {
  .advisor-card { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; gap: 20px; }
  .advisor-card__photo img { margin: 0 auto; }
  .advisor-card__contacts { justify-content: center; }
  .advisor-card--compact { text-align: left; }
  .advisor-card--compact .advisor-card__photo img { margin: 0; }
}

/* ---------- Card grids ---------- */
.card-grid { display: grid; gap: 24px; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) {
  .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-muted); font-size: 1rem; }
.section--wash .card, .section--alt .card { border-color: var(--line); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step__num {
  counter-increment: step;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  padding-top: 4px;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-muted); }

/* ---------- Tiles (who we help) ---------- */
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.tile h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.tile p { color: var(--ink-muted); font-size: 0.9375rem; margin: 0; }

/* ---------- Engagement (portfolio) cards ---------- */
.engagement {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.engagement__tag {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.engagement h3 { margin: 0; font-size: 1.2rem; }
.engagement__meta { color: var(--ink-muted); font-size: 0.9375rem; margin: 0; }
.engagement__sf {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 0.9375rem;
}
.engagement a { font-size: 0.9375rem; }

/* ---------- Fee section ---------- */
.fee-block { max-width: 760px; }
.fee-block h2 { margin-bottom: 24px; }
.fee-block p { font-size: 1.125rem; }
.fee-block p + p { margin-top: 20px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.125rem;
  padding: 20px 40px 20px 4px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-dark);
}
.faq details[open] summary::after { content: '\2212'; }
.faq summary:hover { color: var(--accent-dark); }
.faq .faq__a { padding: 0 4px 24px; color: var(--ink-muted); max-width: 60em; }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--accent-dark); color: #fff; }
.final-cta h2 { color: #fff; }
.final-cta p { color: var(--accent-wash); }
.final-cta__ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 28px 0; }
.final-cta__contact { color: var(--accent-wash); font-size: 0.9375rem; }
.final-cta__contact a { color: #fff; }
.final-cta__contact a:hover { color: var(--accent-soft); }

/* ---------- Forms ---------- */
.form { max-width: 640px; }
.form__row { margin-bottom: 20px; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form__row--2 { grid-template-columns: 1fr; } }
.form label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 6px;
}
.form label .req { color: var(--error); }
.form label .opt { color: var(--ink-muted); font-weight: 400; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
  border-color: var(--accent-sage);
}
.form input[aria-invalid="true"], .form select[aria-invalid="true"] { border-color: var(--error); }
.form .field-error { color: var(--error); font-size: 0.9375rem; margin-top: 6px; display: none; }
.form .field-error.is-visible { display: block; }
.form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form__status { margin-top: 20px; }
.form__status[data-state="error"] { color: var(--error); }
.form__success {
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px;
}
.form__success h2 { color: var(--accent-dark); font-size: 1.25rem; line-height: 1.3; }

/* ---------- Split layout (form + aside) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 920px) {
  .split-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 20px 0 0; font-size: 0.875rem; color: var(--ink-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--accent-soft); }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--accent-wash); padding: 56px 0 64px; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { max-width: 42em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ink-inverse-muted); font-size: 0.9375rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent-soft); text-decoration: underline; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 40px;
}
.site-footer__brand img { height: 34px; width: auto; margin-bottom: 16px; }
.site-footer__tagline { font-family: var(--font-head); font-weight: 500; color: #fff; margin-bottom: 16px; }
.site-footer h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-inverse-muted);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 24px 0 40px;
  font-size: 0.875rem;
}
.site-footer__legal p { margin-bottom: 6px; }
@media (max-width: 820px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 32px; }
}

/* ---------- Utility ---------- */
.only-mobile { display: none; }
@media (max-width: 920px) {
  .only-desktop { display: none; }
  .only-mobile { display: inline-flex; }
}
.mt-0 { margin-top: 0; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
