/* =========================================================
   Ridge Advisory — styles
   ========================================================= */

:root {
  /* Brand palette */
  --navy: #061726;
  --champagne: #E8D9B8;
  --cream: #F7F2E9;
  --rust: #B5673E;
  --slate: #83786B;
  --mist: #DCD3C2;
  --taupe: #AEA893;      /* "ADVISORY" in the logo; text on navy */
  --steel: #9AA7B0;      /* captions on navy */

  /* Accessible text variants (brand hues, darkened for small text) */
  --rust-ink: #9A5230;   /* rust text on cream */
  --rust-deep: #874525;  /* rust text on mist */
  --rust-button: #A0582F;/* button fill: cream text passes contrast */
  --slate-ink: #6E6457;  /* secondary text on cream */

  --font-display: "Jost", "Poppins", "Futura", "Century Gothic", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(72px, 10vw, 120px);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.35rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.45rem; font-weight: 400; }

p { margin: 0 0 1.1em; }

a { color: var(--rust-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.section-navy :focus-visible, .site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--champagne); }

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

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

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--champagne); color: var(--navy); padding: 10px 16px; font-family: var(--font-display); }
.skip-link:focus { top: 12px; }

/* ---------- Shared type pieces ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust-ink);
  margin-bottom: 1.25rem;
}
.section-mist .eyebrow { color: var(--rust-deep); }
.section-navy .eyebrow { color: var(--champagne); }

.lead { font-size: 1.15rem; line-height: 1.7; max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05em 2em;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--rust-button); color: var(--cream); }
.btn-primary:hover { background: #8A4A27; color: var(--cream); }
.btn-small { padding: 0.8em 1.4em; font-size: 0.78rem; }

.text-link { font-family: var(--font-display); letter-spacing: 0.04em; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(232, 217, 184, 0.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { height: 38px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2.25rem; }
.site-nav a:not(.btn) {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--champagne); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle-bar { display: block; width: 24px; height: 1.5px; background: var(--champagne); margin: 6px 0; transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .brand img { height: 28px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--navy);
    padding: 8px var(--gutter) 28px;
    border-bottom: 1px solid rgba(232, 217, 184, 0.12);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { width: 100%; padding: 16px 0; border-bottom: 1px solid rgba(232, 217, 184, 0.1); }
  .site-nav .btn { margin-top: 24px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--champagne);
  padding: clamp(88px, 14vw, 176px) 0 clamp(104px, 16vw, 200px);
}
.hero-texture {
  position: absolute; right: -4%; bottom: 0;
  width: min(62vw, 820px); height: auto;
  fill: var(--champagne); opacity: 0.045;
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { max-width: 15ch; color: var(--champagne); margin-bottom: 0.7em; }
.hero-sub { color: var(--taupe); font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.7; max-width: 50ch; margin-bottom: 2.6rem; }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-cream { background: var(--cream); }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy); color: var(--champagne); }
.section-ruled { padding-top: 0; }
.section-ruled > .container { border-top: 1px solid var(--mist); padding-top: var(--section-pad); }

/* Problem */
.split { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; gap: 88px; } }
.split-lead h2 { max-width: 14ch; }

.symptoms { list-style: none; margin: 0 0 2.2rem; padding: 0; }
.symptoms li {
  position: relative;
  padding: 1.15rem 0 1.15rem 2rem;
  border-bottom: 1px solid var(--mist);
}
.symptoms li:first-child { border-top: 1px solid var(--mist); }
.symptoms li::before {
  content: "";
  position: absolute; left: 0; top: 1.62rem;
  width: 10px; height: 9px;
  background: var(--rust);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.symptoms strong { font-weight: 600; }
.closing-note { font-family: var(--font-display); font-size: 1.3rem; font-weight: 300; line-height: 1.5; color: var(--navy); max-width: 36ch; }

/* Approach */
.approach-head { max-width: 760px; margin-bottom: clamp(48px, 7vw, 80px); }
.principles { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 820px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.principle { position: relative; padding-top: 28px; border-top: 1px solid var(--mist); }
.principle::before { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 1px; background: var(--rust); }
.principle p { color: var(--slate-ink); margin: 0; }

/* Services */
.services-head { max-width: 780px; margin-bottom: clamp(48px, 7vw, 72px); }
.services { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service {
  display: flex; flex-direction: column;
  background: var(--cream);
  border-radius: 2px;
  padding: clamp(28px, 3vw, 40px);
}
.tier { width: 58px; height: 40px; margin-bottom: 28px; fill: var(--mist); }
.tier .on { fill: var(--rust); }
.service h3 { font-size: 1.75rem; font-weight: 300; margin-bottom: 0.2em; }
.service-type {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rust-ink);
  margin-bottom: 1.4rem;
}
.service > p:not(.service-type):not(.best-for) { color: var(--navy); font-size: 1rem; }
.best-for {
  margin: auto 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--mist);
  font-size: 0.95rem;
  color: var(--slate-ink);
}
.best-for span { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy); margin-right: 0.4em; }

/* About */
.about { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: 4fr 7fr; gap: 88px; } }
.about-photo { position: relative; max-width: min(360px, calc(100% - 16px)); }
.about-photo::before {
  content: ""; position: absolute; inset: 16px -16px -16px 16px;
  border: 1px solid var(--champagne);
  border-color: #CDB98F;
}
.about-photo img { position: relative; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 900px) { .about-photo { position: sticky; top: calc(var(--header-h) + 40px); } }
.about-text { max-width: 64ch; }
.about-text .pull {
  font-family: var(--font-display); font-weight: 300;
  font-size: 1.45rem; line-height: 1.45;
  padding: 0.4em 0 0.4em 1.1em;
  border-left: 2px solid var(--rust);
  margin: 1.6em 0;
}
.about-meta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--mist); }
.about-meta p { color: var(--slate-ink); font-size: 0.95rem; margin-bottom: 0.9rem; }

/* Closing CTA */
.cta { text-align: center; }
.cta-inner { max-width: 760px; }
.cta-mark { width: 54px; height: auto; fill: var(--champagne); margin: 0 auto 32px; display: block; }
.cta h2 { color: var(--champagne); }
.cta .lead { color: var(--taupe); margin: 0 auto 2.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--taupe); border-top: 1px solid rgba(232, 217, 184, 0.12); padding: 56px 0 32px; font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px; padding-bottom: 40px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 16px; }
.footer-brand p { margin: 0; max-width: 34ch; }
.footer-heading { font-family: var(--font-display); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--champagne); margin: 0 0 16px; }
.footer-contact dl { display: grid; grid-template-columns: auto auto; column-gap: 28px; row-gap: 10px; margin: 0; }
.footer-contact dt { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--taupe); padding-top: 3px; }
.footer-contact dd { margin: 0; }
.site-footer a { color: var(--champagne); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--champagne); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(232, 217, 184, 0.12); color: var(--steel); font-size: 0.82rem; }
.footer-legal p { margin: 0; }

/* ---------- Gentle reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Simple inner pages (privacy, 404) ---------- */
.page { padding: clamp(64px, 10vw, 120px) 0; min-height: 60vh; }
.page .container { max-width: 760px; }
.page h2 { font-size: 1.5rem; font-weight: 400; margin-top: 2em; }
