/* ============== DESIGN TOKENS ==============
   Source of truth. Change here, propagates everywhere. */
:root {
  /* Color */
  --bg: #FAF7F0;          /* warm bone */
  --bg-alt: #F2EDE2;      /* deeper warm neutral */
  --bg-deep: #0F2125;     /* deep teal-tinted ink (for dark sections) */
  --ink: #0F2125;
  --ink-soft: #5A5853;    /* warm gray body text */
  --ink-mute: #87837A;
  --line: rgba(15, 33, 37, 0.14);
  --line-soft: rgba(15, 33, 37, 0.08);
  --brand: #008391;       /* exact logo teal */
  --brand-deep: #005F69;
  --brand-tint: rgba(0, 131, 145, 0.08);
  --cream: #FAF7F0;

  /* Layout */
  --max-w: 1360px;
  --pad-x: clamp(20px, 5vw, 72px);
  --rail-w: 240px;        /* sticky chapter index width on desktop */

  /* Type */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

/* ============== RESET / BASE ============== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400; font-size: 16px; line-height: 1.6;
  overflow-x: hidden; font-feature-settings: 'ss01' on, 'cv11' on;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px;
  font-size: 13px; border-radius: 4px; transition: top 200ms;
}
.skip-link:focus { top: 16px; }

/* ============== TYPE UTILITIES ============== */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0;
}
.rule {
  display: inline-block; width: 24px; height: 1px;
  background: currentColor; vertical-align: middle; margin-right: 12px;
  opacity: 0.6;
}

/* ============== NAVIGATION ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  transition: background 320ms ease, backdrop-filter 320ms ease, border-color 320ms ease, padding 320ms ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line-soft);
  padding-top: 12px; padding-bottom: 12px;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 26px; width: auto; display: block; }
.nav-links {
  display: flex; gap: clamp(20px, 3vw, 40px);
  font-size: 13px; letter-spacing: 0.04em;
  color: var(--ink);
}
.nav-links a { position: relative; padding: 6px 0; transition: color 200ms; }
.nav-links a span.num {
  font-family: var(--serif); font-style: italic; font-size: 11px;
  color: var(--brand); margin-right: 6px; vertical-align: super;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 320ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--ink); font-size: 13px; letter-spacing: 0.02em;
  transition: background 220ms, color 220ms;
  min-height: 44px;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--ink); color: var(--bg); }
.nav-toggle { display: none; background: none; border: none; padding: 10px; }
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0;
  transition: transform 240ms, opacity 240ms;
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav-links {
    display: flex; flex-direction: column; gap: 28px;
    position: fixed; inset: 64px 0 0 0;
    background: var(--bg); padding: 40px var(--pad-x) 40px;
    border-top: 1px solid var(--line-soft);
    font-size: 20px;
  }
  body.menu-open .nav-cta {
    display: inline-flex; position: fixed; top: auto; bottom: 40px; left: var(--pad-x); right: var(--pad-x);
    justify-content: center; padding: 16px;
  }
}

/* ============== HERO ============== */
.hero {
  padding: clamp(120px, 14vw, 160px) var(--pad-x) clamp(80px, 10vw, 120px);
  display: grid;
  position: relative;
}
.hero-grid {
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } }
.hero-eyebrow { margin-bottom: 28px; }
.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(56px, 10vw, 156px); line-height: 0.92;
  letter-spacing: -0.025em; margin: 0 0 32px;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--brand); }
.hero-lede {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55;
  color: var(--ink-soft); max-width: 540px; margin: 0 0 44px;
}
.hero-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); max-width: 460px;
  border-top: 1px solid var(--line); padding-top: 22px; gap: 18px 28px;
}
.hero-meta div { font-size: 13px; color: var(--ink-soft); }
.hero-meta strong {
  display: block; font-family: var(--serif); font-weight: 400; font-style: italic;
  color: var(--brand); font-size: 13px; margin-bottom: 2px; letter-spacing: 0.02em;
}
.hero-meta b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }

/* Hero image */
.hero-image {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 2px; background: var(--bg-alt);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-cap {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 16px 20px; color: var(--bg);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.45));
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: end;
}
.hero-image-cap em { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 14px; }

/* ============== ABOUT PAGE (standalone) ============== */
.about-page {
  padding: clamp(140px, 18vw, 220px) var(--pad-x) clamp(80px, 10vw, 140px);
  position: relative;
}
.about-page > .about-inner { max-width: var(--max-w); margin: 0 auto; }
.about-page h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(52px, 8.5vw, 124px); line-height: 0.94;
  letter-spacing: -0.025em; margin: 24px 0 40px;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.about-page h1 em { font-style: italic; font-weight: 400; color: var(--brand); }
.about-page-lede {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55;
  color: var(--ink-soft); max-width: 720px;
  margin: 0 0 clamp(60px, 8vw, 100px);
}

/* Shared about-content styles (used by standalone About page) */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 2.5vw, 48px);
  max-width: 780px;                                    /* body-copy column, aligned with the lede above */
  margin-bottom: clamp(56px, 7vw, 96px);
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(48px, 8vw, 72px); }
}
.about-grid p {
  font-size: clamp(15px, 1.1vw, 17px); line-height: 1.65; color: var(--ink-soft);
  margin: 0;
}
.about-grid strong { color: var(--ink); font-weight: 500; }
.about-flow-header {
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 5vw, 60px);
  margin-bottom: clamp(48px, 6vw, 72px);
}
.about-flow-header h3 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(28px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 20px; max-width: 780px;
}
.about-flow-header h3 em { font-style: italic; color: var(--brand); font-weight: 400; }
.about-flow-header p {
  font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65; color: var(--ink-soft); margin: 0;
  max-width: 780px;
}

/* ============== VERTICALS WITH STICKY RAIL ============== */
.verticals-wrap {
  position: relative;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  column-gap: clamp(24px, 4vw, 56px);
}
.v-rail {
  grid-column: 1; grid-row: 1;
  position: sticky; top: calc(50vh - 100px);
  align-self: start;
  padding-right: 24px;
  border-right: 1px solid var(--line-soft);
}
.verticals-wrap > .vertical { grid-column: 2; }
@media (max-width: 1180px) {
  .verticals-wrap { grid-template-columns: 1fr; padding: 0 var(--pad-x); }
  .verticals-wrap > .vertical { grid-column: 1; }
  .v-rail { display: none; }
}
.v-rail-inner { display: flex; flex-direction: column; gap: 18px; }
.v-rail-item {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 13px; color: var(--ink-mute);
  cursor: pointer; padding: 8px 0;
  transition: color 240ms;
}
.v-rail-item .n {
  font-family: var(--serif); font-style: italic; font-size: 13px;
  color: var(--brand); opacity: 0.7; transition: opacity 240ms;
}
.v-rail-item .name { letter-spacing: 0.02em; }
.v-rail-item .bar {
  flex: 1; height: 1px; background: var(--line); opacity: 0;
  transform-origin: left; transform: scaleX(0); transition: opacity 240ms, transform 360ms ease;
}
.v-rail-item.active { color: var(--ink); }
.v-rail-item.active .n { opacity: 1; }
.v-rail-item.active .bar { opacity: 1; transform: scaleX(1); background: var(--brand); }
.v-rail-item:hover { color: var(--ink); }

/* Mobile chapter index (top-pinned strip) */
.v-rail-mobile {
  display: none; position: sticky; top: 64px; z-index: 30;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft); padding: 12px var(--pad-x);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.v-rail-mobile::-webkit-scrollbar { display: none; }
@media (max-width: 1180px) { .v-rail-mobile { display: flex; gap: 22px; } }
.v-rail-mobile a {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 12px; letter-spacing: 0.06em; color: var(--ink-mute);
  white-space: nowrap; padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color 220ms, border-color 220ms;
}
.v-rail-mobile a .n { font-family: var(--serif); font-style: italic; color: var(--brand); }
.v-rail-mobile a.active { color: var(--ink); border-bottom-color: var(--brand); }

/* The four vertical "spreads" */
.vertical {
  padding: clamp(100px, 14vw, 180px) 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.vertical:last-of-type { border-bottom: none; }
.vertical-inner {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.vertical:nth-of-type(even) .vertical-inner .v-media { order: -1; }
@media (max-width: 900px) {
  .vertical-inner { grid-template-columns: 1fr; gap: 40px; }
  .vertical:nth-of-type(even) .vertical-inner .v-media { order: 0; }
}
.v-num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 14px; color: var(--brand); margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.v-name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(48px, 6.2vw, 96px); line-height: 0.96; letter-spacing: -0.025em;
  margin: 0 0 18px; font-variation-settings: 'opsz' 144;
}
.v-name em { font-style: italic; color: var(--brand); font-weight: 400; }
.v-tag {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 28px;
}
.v-desc {
  font-size: clamp(16px, 1.25vw, 18px); line-height: 1.7; color: var(--ink-soft);
  margin: 0 0 32px; max-width: 480px;
}
.v-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; max-width: 480px; }
.v-chip {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-deep);
  font-size: 11px; letter-spacing: 0.06em;
}
.v-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; letter-spacing: 0.04em;
  padding: 14px 24px; border-radius: 999px; border: 1px solid var(--ink);
  min-height: 44px;
  transition: background 220ms, color 220ms;
}
.v-cta:hover, .v-cta:focus-visible { background: var(--ink); color: var(--bg); }
.v-cta svg { width: 14px; height: 14px; transition: transform 220ms; }
.v-cta:hover svg, .v-cta:focus-visible svg { transform: translateX(4px); }

.v-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 2px; background: var(--bg-alt);
}
.v-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms cubic-bezier(0.2, 0.6, 0.2, 1); }
.v-media:hover img { transform: scale(1.03); }
.v-media-cap {
  position: absolute; left: 16px; top: 16px;
  background: rgba(250,247,240,0.92);
  color: var(--ink);
  padding: 6px 12px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}

/* ============== FLOW ============== */
.flow {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.flow-step {
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.2vw, 32px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative;
}
.flow-step:first-child { padding-left: 0; }
.flow-step:last-child { padding-right: 0; border-right: none; }
@media (max-width: 900px) {
  .flow-step { border-right: none; padding: 28px 0; }
  .flow-step:last-child { padding-right: 0; }
}
.flow-num {
  font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--brand);
  margin: 0 0 18px; letter-spacing: 0.02em;
}
.flow-action {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; margin: 0 0 8px;
  color: var(--ink);
}
.flow-by {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 18px;
}
.flow-detail { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.flow-arrow {
  position: absolute; top: 50%; right: -12px; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--brand);
}
.flow-step:last-child .flow-arrow { display: none; }
@media (max-width: 900px) { .flow-arrow { display: none; } }

/* ============== BOTTOM CTA (for About page) ============== */
.page-cta {
  padding: clamp(80px, 10vw, 140px) var(--pad-x);
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.page-cta-inner { max-width: 780px; margin: 0 auto; }
.page-cta h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(36px, 5vw, 72px); line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.page-cta h2 em { font-style: italic; color: var(--brand); font-weight: 400; }
.page-cta-sub {
  font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65;
  color: var(--ink-soft); max-width: 500px; margin: 0 auto 36px;
}
.page-cta .v-cta { font-size: 15px; padding: 16px 32px; }

/* ============== CONTACT ============== */
.contact {
  padding: clamp(100px, 14vw, 180px) var(--pad-x);
  background: var(--bg-deep); color: var(--bg);
}
.contact-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 900px) { .contact-inner { grid-template-columns: 1fr; gap: 56px; } }
.contact-eyebrow { color: rgba(250,247,240,0.65); margin-bottom: 28px; }
.contact h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 5.6vw, 80px); line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 28px;
}
.contact h2 em { font-style: italic; color: #4FB8C4; font-weight: 400; }
.contact-lede {
  color: rgba(250,247,240,0.7); font-size: 18px; line-height: 1.6;
  max-width: 460px; margin: 0 0 56px; font-weight: 300;
}
.contact-meta { display: grid; gap: 32px; }
.contact-meta .eyebrow { color: rgba(250,247,240,0.55); margin: 0 0 8px; }
.contact-meta a, .contact-meta p {
  font-family: var(--serif); font-weight: 300; font-size: 22px; line-height: 1.4; margin: 0;
}
.contact-meta a {
  border-bottom: 1px solid rgba(250,247,240,0.25); padding-bottom: 2px;
  transition: border-color 220ms;
}
.contact-meta a:hover { border-bottom-color: var(--bg); }
.socials { display: flex; gap: 14px; margin-top: 14px; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(250,247,240,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 220ms, color 220ms, border-color 220ms;
}
.socials a:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.socials svg { width: 16px; height: 16px; }

/* Form */
form.contact-form { display: grid; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(250,247,240,0.7); font-weight: 500;
}
.field input, .field select, .field textarea {
  background: transparent; border: none; border-bottom: 1px solid rgba(250,247,240,0.22);
  color: var(--bg); font-family: var(--sans); font-size: 16px;
  padding: 12px 0; transition: border-color 200ms; min-height: 44px;
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--bg);
}
.field select option { color: var(--ink); background: var(--bg); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.submit {
  margin-top: 8px; justify-self: start;
  background: var(--bg); color: var(--ink); border: none;
  padding: 16px 32px; border-radius: 999px; min-height: 44px;
  font-size: 14px; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 12px;
  transition: transform 220ms, box-shadow 220ms;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.form-status { font-size: 13px; color: rgba(250,247,240,0.7); min-height: 18px; }
.form-status.warn { color: #E9C46A; }

/* ============== FOOTER ============== */
footer {
  background: var(--bg-deep); color: rgba(250,247,240,0.55);
  border-top: 1px solid rgba(250,247,240,0.08);
  padding: 36px var(--pad-x);
}
.foot {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 13px;
}
.foot-logo img { height: 22px; width: auto; display: block; }
.foot nav { display: flex; gap: 28px; }
.foot nav a:hover { color: var(--bg); }

/* ============== REVEAL ANIMATIONS ============== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 900ms ease, transform 900ms ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 100ms; }
.reveal-d2 { transition-delay: 200ms; }
.reveal-d3 { transition-delay: 300ms; }
.reveal-d4 { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
