/* ==========================================================================
   SCN Capital — styles.css
   Plain CSS, mobile-first. Organized top-to-bottom:
     1. Design tokens (:root)      6. Header / nav
     2. Base / reset               7. Hero
     3. Layout helpers             8. Sections (proof, place, approach…)
     4. Typography helpers         9. Footer
     5. Buttons                   10. Accessibility / motion / breakpoints
   Coastal palette — every text/background pair below was contrast-checked
   against WCAG 2.2 AA before use. If you change a color, re-check it.
   ========================================================================== */

/* ---- 1. Design tokens ---------------------------------------------------- */
:root {
  /* Coastal palette */
  --ink:        #0F2E3D;  /* deep sea navy — primary text            */
  --sea:        #1B6B8C;  /* harbor blue — links, accents            */
  --sea-deep:   #0C4A63;  /* deeper harbor — buttons, hovers         */
  --seafoam:    #6FA79E;  /* sea glass — decorative accents (large)  */
  --driftwood:  #4F6168;  /* muted grey-teal — secondary text        */
  --sand:       #EAE0CE;  /* warm sand — alternating section bg      */
  --foam:       #F6FAFB;  /* cool near-white — main background        */
  --mist:       #DCE6E9;  /* light cool — borders, panels            */
  --white:      #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --wrap-max: 68rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
  --radius: 10px;
  --header-h: 5.5rem;

  --shadow: 0 6px 24px rgba(15, 46, 61, 0.08);
}

/* ---- 2. Base / reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keeps anchored sections clear of the sticky header (WCAG 2.4.11). */
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); }
a:hover { color: var(--sea-deep); }

/* Numbers read as data — tabular figures, no separate mono font needed. */

/* ---- 3. Layout helpers --------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* The "ledger rule" — a thin ruled line marking section transitions. */
.ledger-rule {
  border: 0;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--seafoam), transparent);
}

/* ---- 4. Typography helpers ----------------------------------------------- */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea);
  margin: 0 0 0.75rem;
}
.eyebrow-light { color: var(--sand); }

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.5vw + 1rem, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.section-h {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.section-h-light { color: var(--foam); }

.section-intro {
  max-width: 42rem;
  color: var(--driftwood);
  margin: 0 0 2.5rem;
}

h3 { font-family: var(--font-body); font-weight: 600; }

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--driftwood);
  margin: 1.5rem 0 0;
}
.tagline-center { text-align: center; margin-top: 2.5rem; }
.hero .tagline { color: var(--sand); }

/* ---- 5. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;              /* comfortable touch target */
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-sm { min-height: 38px; padding: 0.45rem 1rem; }

.btn-primary { background: var(--sea-deep); color: var(--white); }
.btn-primary:hover { background: var(--ink); color: var(--white); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--foam); }
/* Ghost button sitting on the dark hero needs light strokes. */
.hero .btn-ghost, .section-dark .btn-ghost { color: var(--foam); border-color: var(--foam); }
.hero .btn-ghost:hover, .section-dark .btn-ghost:hover { background: var(--foam); color: var(--ink); }

/* ---- 6. Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 250, 251, 0.9);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--mist);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.6rem;
}
.brand { text-decoration: none; color: var(--ink); line-height: 1.05; }
.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand-mark-rest { letter-spacing: 0.28em; font-weight: 500; }
.brand-mark-sm { font-size: 1.15rem; }
.brand-sub {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--driftwood);
}

/* Logo image (replaces the old text lockup). Wide monogram, sized by height. */
.brand-logo { display: block; height: 58px; width: auto; }
.site-footer .brand-logo { height: 58px; margin-bottom: 0.4rem; }
/* The logo art is pure black on transparent — invert it to white on dark bg. */
.brand-logo-light { filter: invert(1); }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }
.site-nav > a:not(.btn) {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav > a:not(.btn):hover { color: var(--sea-deep); border-bottom-color: var(--seafoam); }

/* ---- 7. Hero ------------------------------------------------------------- */
.hero {
  /* Two layers: a dark scrim on top, the photo/gradient below. To add a
     San Clemente photo, set --hero-photo on this rule, e.g.:
       --hero-photo: url('assets/san-clemente/hero.jpg');
     The scrim keeps light text readable over any image. */
  background:
    linear-gradient(180deg, rgba(15, 46, 61, 0.74), rgba(12, 74, 99, 0.80)),
    var(--hero-photo, linear-gradient(155deg, #0C4A63 0%, #0F2E3D 70%));
  background-size: cover;
  background-position: center;
  color: var(--foam);
}
.hero-inner { padding-block: clamp(4rem, 12vw, 8rem); max-width: 52rem; }
.hero h1 { color: var(--white); font-size: clamp(1.7rem, 3.2vw + 0.9rem, 2.6rem); }
.hero .lede { color: var(--mist); }
.lede { font-size: 1.15rem; max-width: 40rem; margin: 0 0 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }


/* ---- 8b. Place / San Clemente gallery ------------------------------------ */
.place-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.place-card { margin: 0; }
.place-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(150deg, var(--seafoam), var(--mist));
  border: 1px solid rgba(15, 46, 61, 0.08);
  box-shadow: var(--shadow);
}
.place-photo img { width: 100%; height: 100%; object-fit: cover; }
.place-credit {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  color: var(--driftwood);
  text-align: center;
}

/* ---- 8c. Approach pillars ------------------------------------------------ */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.pillar {
  background: var(--foam);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.pillar h3 { margin: 0 0 0.6rem; font-size: 1.15rem; color: var(--ink); }
.pillar p { margin: 0; color: var(--driftwood); }

/* Services — complimentary reviews (2x2 of .pillar cards + centered CTA) */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.services-cta { text-align: center; margin-top: 2.5rem; }
@media (min-width: 48rem) { .services-grid { grid-template-columns: 1fr 1fr; } }

/* Expandable Q&A cards (native <details>). Collapsed = question + › chevron;
   the answer reveals on click and the chevron rotates to point down. */
#situations .services-grid { align-items: start; }
.qa summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { margin: 0; }
.qa summary::after {
  content: ""; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--sea);
  border-bottom: 2px solid var(--sea);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa summary:hover h3, .qa[open] summary h3 { color: var(--sea-deep); }
.qa summary:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
.qa p { margin: 0.9rem 0 0; }

/* ---- 8c-2. Personal commitment band ------------------------------------- */
.commitment-inner { max-width: 46rem; }
.commitment-text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.4vw + 0.95rem, 1.55rem);
  line-height: 1.5;
  color: var(--foam);
  margin: 0.4rem 0 0;
}
.commitment-attr {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--sand);
}

/* ---- 8d. Process flowchart ----------------------------------------------- */
/* Base (mobile): a single vertical column of numbered cards connected by a
   down-chevron. At 64rem+ it becomes a horizontal snaking flow (see section 11). */
.flow {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
.flow-step {
  position: relative;
  background: var(--foam);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.flow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  margin: 0 auto 0.9rem;
  background: var(--foam);
  border: 2px solid var(--sea-deep);
  border-radius: 50%;
  color: var(--sea-deep);
}
.flow-icon svg { width: 27px; height: 27px; display: block; }
.flow-title { margin: 0 0 0.4rem; font-size: 1.1rem; color: var(--ink); }
.flow-desc { margin: 0; color: var(--driftwood); font-size: 0.95rem; }

/* Connector chevron — points down between stacked cards on mobile. */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.2rem;
  width: 12px; height: 12px;
  border-right: 2px solid var(--sea);
  border-bottom: 2px solid var(--sea);
  transform: translate(-50%, 0) rotate(45deg);
}
.flow-turn { display: none; }  /* wrap connector shown only in horizontal mode */

/* ---- 8e. Team ------------------------------------------------------------ */
.bio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 0;
}
.bio-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(150deg, var(--mist), var(--sand));
  border: 1px solid rgba(15, 46, 61, 0.08);
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }
.bio-text p { color: var(--driftwood); margin: 0 0 1rem; max-width: 46rem; }
.bio-text strong { color: var(--ink); font-weight: 600; }
.bio-text p:last-child { margin-bottom: 0; }

/* ---- 8f. Contact (dark band) --------------------------------------------- */
.section-dark { background: linear-gradient(160deg, var(--sea-deep), var(--ink)); color: var(--foam); }
.contact-inner { max-width: 40rem; text-align: center; margin-inline: auto; }
.contact-lede { color: var(--mist); margin: 0 0 2rem; font-size: 1.1rem; }

/* ---- 9. Footer ----------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--mist); padding-block: 3rem; }
.site-footer .brand-mark, .site-footer .brand-sub { color: var(--foam); }
.footer-inner { display: grid; gap: 1.75rem; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1.1rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(246, 250, 251, 0.25);
  border-radius: 50%;
  color: var(--mist);
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.social-link:hover { color: var(--ink); background: var(--foam); border-color: var(--foam); }
.social-link svg { width: 20px; height: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.footer-nav a { color: var(--seafoam); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--foam); text-decoration: underline; }
.footer-legal p { font-size: 0.82rem; color: var(--driftwood); margin: 0 0 0.75rem; max-width: 60rem; }
.site-footer .footer-legal p { color: #9FB0B6; }  /* lighter grey for AA on ink */
.footer-copy { margin-top: 0.5rem; }

/* ---- 10. Accessibility / motion ------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--foam);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

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

/* ---- 10b. Breakpoints ---------------------------------------------------- */
@media (min-width: 40rem) {
  .place-gallery { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .bio { grid-template-columns: 300px 1fr; gap: 2.75rem; align-items: start; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
}

/* ---- 11. Process flowchart (horizontal snaking at 64rem+) ----------------
   Below 64rem the flow is the vertical column above. At 64rem+ it lays out as a
   4-column grid: steps 1-4 across the top, a full-width wrap connector, then 5-7
   across the bottom. DOM order stays 1-7 for keyboard/screen-reader users. */
@media (min-width: 64rem) {
  .flow {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem 2.5rem;
    align-items: stretch;
    max-width: 1000px;
    margin: 3rem auto 0;
  }

  /* Connector chevrons now point RIGHT, centered in the column gap. */
  .flow-step:not(:last-child)::after {
    left: auto;
    bottom: auto;
    right: -1.25rem;
    top: 50%;
    transform: translate(50%, -50%) rotate(-45deg);
  }
  /* Step 4 ends the top row — no right arrow; the wrap connector takes over. */
  .flow-step:nth-child(4)::after { display: none; }

  /* Full-width wrap connector between the two rows (a down chevron). */
  .flow-turn {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    min-height: 1.75rem;
  }
  .flow-turn::after {
    content: "";
    width: 14px; height: 14px;
    border-right: 2px solid var(--sea);
    border-bottom: 2px solid var(--sea);
    transform: rotate(45deg);
  }
}

/* ---- 12. Strategies page (model portfolios + tax) ------------------------ */
/* Risk bands: one card per model portfolio; equity + fixed income side by side. */
.risk-scale { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.risk-scale > li { margin: 0; }
/* Each band is a click-to-expand card (native <details>): the name + one-line
   goal show collapsed; the Equity / Fixed Income detail reveals on click. */
.band {
  background: var(--foam);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
}
.band > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 1rem;
}
.band > summary::-webkit-details-marker { display: none; }
.band-head {
  flex: 1;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.25rem 1rem;
}
.band-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; color: var(--ink); }
.band-goal { margin: 0; color: var(--driftwood); font-size: 0.98rem; }
.band > summary::after {
  content: ""; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--sea);
  border-bottom: 2px solid var(--sea);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.band[open] > summary::after { transform: rotate(45deg); }
.band > summary:hover .band-name, .band[open] .band-name { color: var(--sea-deep); }
.band > summary:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
.band-mix {
  display: grid; gap: 1.25rem;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--mist);
}
.mix-part h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--sea);
}
.mix-part p { margin: 0; color: var(--driftwood); }
.band-note { margin: 1.75rem 0 0; font-size: 0.9rem; color: var(--driftwood); max-width: 70ch; }

@media (min-width: 40rem) {
  .band-mix { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Featured strategy (direct indexing) */
.feature {
  background: var(--sand);
  border-left: 4px solid var(--sea);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  margin: 2.25rem 0 2.75rem;
}
.feature-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 0.15rem 0 0.75rem; color: var(--ink); }
.feature p { margin: 0 0 0.85rem; }
.feature p:last-child { margin-bottom: 0; }

/* Disclosures block */
.disclaimer { max-width: 72ch; margin: 0 auto; }
.disclaimer p { font-size: 0.82rem; line-height: 1.6; color: var(--driftwood); margin: 0 0 0.85rem; }
.disclaimer p:last-child { margin-bottom: 0; }

/* ---- Legal pages (disclosures, privacy) --------------------------------- */
.legal { max-width: 46rem; margin-top: 1.5rem; }
.legal h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 1.9rem 0 0.5rem; color: var(--ink); }
.legal p { margin: 0 0 1rem; color: var(--driftwood); }
.legal p strong { color: var(--ink); }
.legal a { color: var(--sea); }
.legal ul { margin: 0 0 1rem 1.25rem; color: var(--driftwood); }
.legal ul li { margin: 0 0 0.4rem; }
.legal .updated { font-size: 0.85rem; letter-spacing: 0.02em; color: var(--driftwood); margin-bottom: 1.4rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 34rem; }
.legal-table th, .legal-table td { border: 1px solid var(--mist); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
.legal-table th { background: var(--sand); color: var(--ink); font-weight: 600; }
.legal-table td { color: var(--driftwood); }
