/* =========================================================
   Sabi Advisory — stylesheet
   Palette and layout transcribed directly from the approved
   Claude Desktop Design export ("Sabi Homepage Redesigns.dc.html").
   Display face: Source Serif 4. Body face: Public Sans.
   ========================================================= */

:root {
  --ivory: #F2EAD8;
  --ivory-alt: #E9DCC0;
  --ink: #16233C;
  --ink-light: #3D5A80;
  --ochre: #C17D43;
  --ochre-deep: #A8672F;
  --text: #4A4536;
  --muted: #8A7F60;
  --muted-light: #A89A7D;
  --border: #C9BD9D;
  --border-light: #D9CBA9;
  --border-mid: #B3A685;
  --offwhite: #FDFAF3;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.5rem, 6vw, 5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
button { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.kicker {
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre-deep);
  font-weight: 600;
  margin: 0 0 1.375rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- side label ---- */
.side-label {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin: 0;
  z-index: 5;
}
@media (max-width: 900px) {
  .side-label { display: none; }
}

/* ---- topbar / nav ---- */
.topbar { padding-top: 2.5rem; padding-bottom: 1.5rem; position: relative; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.logo-ring-mid {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-light);
  display: flex; align-items: center; justify-content: center;
}
.logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ochre); }
.wordmark { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }

.navgroup { display: flex; align-items: center; gap: 2.25rem; }
.navlink {
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.navlink:hover { color: var(--ochre); }
.navlink[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ochre); }

.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 0.4rem; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); display: block; }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .navgroup {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: var(--ivory);
    padding: 1rem var(--pad) 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .navgroup.open { display: flex; }
}

/* ---- buttons ---- */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.125rem 2rem;
  border-radius: 2px;
}
.btn-primary:hover { background: var(--ochre); }

.btn-accent {
  display: inline-block;
  background: var(--ochre);
  color: var(--offwhite);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 1.125rem 2rem;
  border-radius: 2px;
}
.btn-accent:hover { background: var(--ochre-deep); }

/* ---- hero ---- */
.hero { padding-top: clamp(1.25rem, 3vw, 2.25rem); padding-bottom: clamp(4.5rem, 11vw, 9rem); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-copy { margin-top: 0; }

.hero-kicker-row { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 2rem; }
.kicker-rule { width: 36px; height: 1.5px; background: var(--ochre); flex: none; }
.hero-kicker-row .kicker { margin: 0; }

.headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.75rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--ink);
  margin: 0 0 2.25rem;
  max-width: 720px;
}
.headline-accent { font-weight: 400; font-style: italic; color: var(--ochre); }

.subhead {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.6;
  color: var(--text);
  max-width: 480px;
  margin: 0 0 2.75rem;
}

.hero-actions { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.hero-secondary-link {
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  text-decoration: none;
}
.hero-secondary-link:hover { color: var(--ochre); border-color: var(--ochre); }

.hero-visual {
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .hero-visual { height: 420px; margin-top: 1.5rem; }
}

.hero-mark {
  position: relative;
  width: 480px;
  height: 540px;
  max-width: 100%;
  animation: floatSlow 7s ease-in-out infinite;
}
@media (max-width: 900px) {
  .hero-mark { width: 380px; height: 428px; }
}
@media (max-width: 480px) {
  .hero-mark { width: 300px; height: 338px; }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.ring-outer { width: 480px; height: 480px; max-width: 100%; aspect-ratio: 1; border: 1px solid var(--border); }
.ring-mid { width: 348px; height: 348px; max-width: 72.5%; aspect-ratio: 1; border: 1px solid var(--border-mid); }
.ring-inner { width: 180px; height: 180px; max-width: 37.5%; aspect-ratio: 1; border: 1.5px solid var(--ochre); }
.ring-dot {
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ochre);
  transform: translate(-50%, -50%);
}

.compass-label {
  position: absolute;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0.75;
}
.compass-n { top: 10px; left: 50%; transform: translateX(-50%); }
.compass-s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 10px; top: 50%; transform: translateY(-50%); }
.compass-e { right: 10px; top: 50%; transform: translateY(-50%); }

/* Corner words sit just outside the 480x480 ring square (which is
   inset 30px top/bottom within this 540-tall box), so they never
   overlap the outer ring. */
.orbit-word {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
}
.orbit-technology { top: 26px; left: 4px; }
.orbit-strategy { top: 26px; right: 0; }
.orbit-systems { bottom: 26px; left: 0; }
.orbit-leadership { bottom: 26px; right: 0; }
@media (max-width: 520px) {
  .orbit-word { display: none; }
}

/* ---- about ---- */
.about {
  background: var(--ivory-alt);
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}
@media (max-width: 900px) {
  .about { padding-top: 4rem; padding-bottom: 4rem; }
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.75rem; align-items: center; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-copy-col h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.125rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 1.875rem;
  max-width: 560px;
}
.about-copy { max-width: 480px; }
.about-copy p { font-size: 1.125rem; line-height: 1.7; color: var(--text); margin: 0 0 1.25rem; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  font-weight: 600;
  color: var(--ochre);
  float: left;
  line-height: 0.82;
  padding-right: 0.5rem;
  margin-top: 0.06em;
}
.about-quote {
  display: inline-flex;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.75rem;
}
.about-quote p { font-family: var(--font-display); font-style: italic; font-size: 1.125rem; color: var(--ink); margin: 0; }
.about-photo {
  width: 100%;
  height: 460px;
  border-radius: 4px;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .about-photo { height: 320px; }
}

/* ---- pillars ---- */
.pillars {
  background: var(--ivory);
  padding-top: 6.875rem;
  padding-bottom: 6.875rem;
}
@media (max-width: 900px) {
  .pillars { padding-top: 4rem; padding-bottom: 4rem; }
}
.pillars .kicker { margin-bottom: 1.125rem; }
.pillars-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6875rem;
  color: var(--ink);
  margin: 0 0 4rem;
}
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 860px) {
  .pillars-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.pillar {
  padding: 0 2.25rem;
  border-left: 1px solid var(--border);
  transition: transform 0.25s ease;
}
.pillar:first-child { border-left: none; padding-left: 0; }
@media (max-width: 860px) {
  .pillar { border-left: none; padding-left: 0; }
}
.pillar:hover { transform: translateY(-6px); }

/* Scroll-in entrance animation. .pillar-anim is added by script.js
   (progressive enhancement — without JS, or with reduced motion,
   cards simply stay visible with no animation).
   The hidden state below deliberately has NO transition of its own —
   only .in-view declares one, so the card snaps to hidden instantly
   on load and only ever animates on the reveal (never fades out). */
.pillar-anim {
  opacity: 0;
  transform: translateY(32px);
}
.pillar-anim.in-view { opacity: 1; transform: translateY(0); }
.pillar-anim:nth-child(1).in-view { transition: opacity 0.7s ease 0s, transform 0.7s ease 0s; }
.pillar-anim:nth-child(2).in-view { transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s; }
.pillar-anim:nth-child(3).in-view { transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s; }
/* Once revealed, hover should feel snappy again, not tied to the
   slower entrance duration — this wins via source order at equal
   specificity. */
.pillar-anim.in-view:hover { transition: transform 0.25s ease; }

@media (prefers-reduced-motion: reduce) {
  .pillar-anim { opacity: 1; transform: none; }
  .pillar-anim.in-view,
  .pillar-anim:nth-child(1).in-view,
  .pillar-anim:nth-child(2).in-view,
  .pillar-anim:nth-child(3).in-view { transition: none; }
}

.pillar-icon {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, var(--ink) 50%, var(--ochre) 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-glyph { color: var(--offwhite); display: flex; align-items: center; justify-content: center; }
.glyph-grid { display: grid; grid-template-columns: 8px 8px; grid-template-rows: 8px 8px; gap: 5px; }
.glyph-grid i { width: 8px; height: 8px; background: var(--offwhite); border-radius: 2px; display: block; font-style: normal; }
.glyph-grid i:nth-child(2), .glyph-grid i:nth-child(3) { opacity: 0.7; }
.glyph-arrow svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.glyph-overlap { position: relative; width: 30px; height: 20px; display: block; }
.glyph-overlap i {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--offwhite);
  top: 1px;
  font-style: normal;
}
.glyph-overlap i:first-child { left: 0; opacity: 0.7; }
.glyph-overlap i:last-child { right: 0; }

.pillar-num { font-family: var(--font-display); font-size: 1rem; color: var(--ochre); margin: 0 0 1.125rem; }
.pillar-name { font-family: var(--font-display); font-size: 1.625rem; font-weight: 600; line-height: 1.25; color: var(--ink); margin: 0 0 0.75rem; }
.pillar-frame { font-family: var(--font-display); font-style: italic; font-size: 1rem; color: var(--ochre-deep); margin: 0 0 1rem; }
.pillar-desc { font-size: 1.0625rem; line-height: 1.65; color: var(--text); margin: 0; }

/* ---- who we help ---- */
.who {
  background: var(--ivory-alt);
  padding-top: 6.875rem;
  padding-bottom: 6.875rem;
  text-align: center;
}
@media (max-width: 900px) {
  .who { padding-top: 4rem; padding-bottom: 4rem; }
}
.who h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 3rem;
}
.who-pills { display: flex; flex-wrap: wrap; gap: 1.25rem 1rem; justify-content: center; max-width: 760px; margin: 0 auto; }
.who-pills li {
  background: var(--offwhite);
  padding: 0.875rem 1.5rem;
  border-radius: 30px;
  font-size: 1.0625rem;
  color: var(--ink);
  border: 1px solid var(--border-light);
}

/* ---- how we work ---- */
.how {
  background: var(--ink);
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}
@media (max-width: 900px) {
  .how { padding-top: 4rem; padding-bottom: 4rem; }
}
.how .kicker { color: var(--ochre); }
.how h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.875rem);
  font-weight: 600;
  color: var(--ivory);
  margin: 0 0 4rem;
}
.how-grid { display: flex; align-items: flex-start; gap: 2.5rem; flex-wrap: wrap; }
.how-part { flex: 1 1 220px; }
.how-num { font-family: var(--font-display); font-size: 1rem; color: var(--ochre); margin: 0 0 0.875rem; }
.how-name { font-family: var(--font-display); font-style: italic; font-size: 1.3125rem; color: var(--ivory); margin: 0 0 0.875rem; }
.how-desc { font-size: 1.0625rem; line-height: 1.7; color: #C7C1AC; margin: 0; }
.how-arrow { flex: 0 0 auto; align-self: center; padding-top: 0.5rem; color: var(--ochre); font-size: 1.375rem; }
@media (max-width: 640px) {
  .how-arrow { display: none; }
}

/* ---- contact ---- */
.contact { padding-top: 7.5rem; padding-bottom: 7.5rem; }
@media (max-width: 900px) {
  .contact { padding-top: 4rem; padding-bottom: 4rem; }
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.contact-copy p { font-size: 1.125rem; line-height: 1.7; color: var(--text); max-width: 420px; margin: 0 0 1.25rem; }
.contact-note {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
}

.contact-form { display: flex; flex-direction: column; gap: 1.75rem; }
.field label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.field input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-mid);
  background: transparent;
  padding: 0.5rem 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
}
.field input:focus { outline: none; border-bottom-color: var(--ochre); }
.field input::placeholder { color: rgba(22,35,60,0.35); }

.contact-form .btn-accent { margin-top: 0.75rem; align-self: flex-start; }
.form-status { font-size: 0.85rem; color: var(--ochre-deep); min-height: 1.2em; }

/* ---- footer ---- */
.footer { padding-top: 2rem; padding-bottom: 2rem; border-top: 1px solid var(--border-light); }
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.footer-copy { font-size: 0.9375rem; color: var(--text); margin: 0; }
.footer-contact-link {
  font-size: 0.9375rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}
.footer-contact-link:hover { color: var(--ochre); border-color: var(--ochre); }

/* ---- blog page ---- */
.blog-hero {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.blog-hero p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 58ch;
  margin: 0;
}

.blog-list { padding-top: clamp(1rem, 3vw, 1.5rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem 2.25rem; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card { display: flex; flex-direction: column; }
.blog-thumb {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border-radius: 4px;
  overflow: hidden;
}
.blog-thumb.tone-ivory { background: var(--ivory-alt); }
.blog-thumb.tone-navy { background: var(--ink); }
.blog-thumb svg { width: 62%; height: 62%; }

.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.blog-excerpt { font-size: 0.98rem; line-height: 1.6; color: var(--text); margin: 0 0 1.1rem; }
.blog-readmore {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ochre-deep);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.blog-readmore:hover { text-decoration: underline; }

/* ---- article pages ---- */
.article-header {
  background: var(--ivory-alt);
  padding-top: clamp(2.75rem, 5vw, 4rem);
  padding-bottom: clamp(2.75rem, 5vw, 4rem);
}
.article-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--ochre-deep);
  text-decoration: none;
  margin-bottom: 2rem;
}
.article-back:hover { text-decoration: underline; }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.25rem;
  max-width: 20ch;
}
.article-intro {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 58ch;
  margin: 0 0 2.25rem;
}
.article-visual {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}
.article-visual.tone-ivory { background: var(--ivory); }
.article-visual.tone-navy { background: var(--ink); }
.article-visual svg { width: 62%; height: 62%; }

.article-body {
  padding-top: clamp(2.75rem, 5vw, 3.75rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
}
.article-content { max-width: 700px; }
.article-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.article-content p.lede { font-size: 1.15rem; color: var(--text); }
.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--ink);
  margin: 2.5rem 0 0.9rem;
}
.article-content ul { margin: 0 0 1.25rem 1.2rem; padding: 0; list-style: disc; }
.article-content li { font-size: 1.03rem; line-height: 1.7; color: var(--ink); margin-bottom: 0.55rem; }
.article-content strong { color: var(--ink); font-weight: 600; }

.article-cta {
  background: var(--ivory-alt);
  padding-top: clamp(3rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 5vw, 4rem);
}
.article-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1.5rem;
  max-width: 20ch;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark { animation: none; }
}
