/* Herrera Vega: wordmark-led editorial, obsidian / mahogany / ivory */

:root {
  --obsidian: #0C0F14;
  --obsidian-soft: #161A22;
  --mahogany: #6B2E2A;
  --mahogany-deep: #542420;
  --ivory: #F4EFE4;
  --ivory-deep: #E8E0D2;
  --silver: #C8CCD3;
  --muted: #6E675F;
  --stroke: rgba(12, 15, 20, 0.08);
  --elev: 0 20px 40px rgba(0, 0, 0, 0.06);
  --font-display: "EB Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --wrap: min(720px, calc(100% - 2.5rem));
  --wrap-wide: min(1100px, calc(100% - 2rem));
  --radius: 16px;
  --pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  overflow: visible;
  padding-bottom: 0.04em;
}
p { margin: 0; }
.wrap { width: var(--wrap-wide); margin-inline: auto; }
.wrap.narrow { width: var(--wrap); }
.center { text-align: center; }

.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  background: var(--obsidian);
  color: var(--ivory);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-220%);
}
.skip:focus-visible { transform: none; outline: 2px solid var(--silver); outline-offset: 2px; }

.demo-notice {
  position: relative;
  z-index: 60;
  background: var(--obsidian);
  color: rgba(244, 239, 228, 0.88);
  font-size: 13px;
  text-align: center;
  padding: 9px 16px;
  line-height: 1.45;
}
.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  margin-right: 8px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  vertical-align: 1px;
}
.demo-notice a {
  color: #D4A39A;
  font-weight: 600;
  margin-left: 0.35em;
  white-space: nowrap;
}
.demo-notice a:hover { text-decoration: underline; }

.eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mahogany);
}
.section-head {
  margin-bottom: 1.5rem;
}
.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  color: var(--obsidian);
}
.section-head.center { margin-inline: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-mahog {
  background: var(--mahogany);
  color: #FBF6F0;
  box-shadow: 0 12px 28px rgba(107, 46, 42, 0.28);
}
.btn-mahog:hover {
  background: var(--mahogany-deep);
  box-shadow: 0 16px 32px rgba(107, 46, 42, 0.34);
}
.btn-ghost {
  background: #fff;
  border-color: var(--stroke);
  color: var(--obsidian);
  box-shadow: var(--elev);
}
.btn-lift:hover { transform: translateY(-2px); }
.text-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mahogany);
  border-bottom: 1px solid rgba(107, 46, 42, 0.35);
  padding-bottom: 0.1rem;
}
.text-link:hover { border-bottom-color: var(--mahogany); }

/* N3: monogram + phone + always drawer */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
}
.nav-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.6rem;
  width: var(--wrap-wide);
  margin-inline: auto;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--obsidian);
  margin-right: auto;
}
.nav-phone {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mahogany);
}
.nav .nav-menu { display: block !important; }
.nav .nav-toggle-bars span { background: var(--obsidian); }
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  width: var(--wrap-wide);
  margin-inline: auto;
  padding: 0.35rem 0 1.15rem;
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--obsidian);
}
.nav-drawer-cta { align-self: flex-start; margin-top: 0.35rem; }
details.nav-menu[open] + .nav-drawer { display: flex; }

/* H4: wordmark-led hero, no photo */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(107, 46, 42, 0.08), transparent 55%),
    var(--ivory);
  overflow: hidden;
}
.hero-mark {
  position: absolute;
  inset: auto 0 18%;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  pointer-events: none;
  opacity: 0.35;
}
.hero-mark span {
  width: 2.5rem;
  height: 1px;
  background: var(--silver);
}
.hero .eyebrow { color: var(--mahogany); }
.hero-wordmark {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 8.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--obsidian);
}
.hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 500;
  font-style: italic;
  color: var(--mahogany);
  margin-bottom: 0.85rem;
}
.hero .lead {
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

/* Full-bleed chapter photo */
.chapter {
  margin: 0;
  background: var(--obsidian);
}
.chapter-photo {
  margin: 0;
  position: relative;
  max-height: min(72vh, 620px);
  overflow: hidden;
}
.chapter-photo img {
  width: 100%;
  height: min(72vh, 620px);
  object-fit: cover;
  object-position: center 45%;
  filter: contrast(1.04) saturate(0.88) brightness(0.82);
}
.chapter-photo figcaption {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: var(--pill);
  background: rgba(12, 15, 20, 0.75);
  border: 1px solid rgba(200, 204, 211, 0.25);
  color: var(--ivory);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* C3: accordion rows */
.matters {
  padding: 3.5rem 0 3rem;
  background: var(--ivory-deep);
}
.matter-list {
  display: grid;
  gap: 0.65rem;
}
.matter-row {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.matter-row-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1.1rem 1.15rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.matter-index {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mahogany);
}
.matter-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--obsidian);
}
.matter-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  justify-self: end;
}
.matter-toggle {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(12, 15, 20, 0.14);
  position: relative;
}
.matter-toggle::before,
.matter-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--obsidian);
  transform: translate(-50%, -50%);
}
.matter-toggle::before { width: 0.55rem; height: 1.5px; }
.matter-toggle::after { width: 1.5px; height: 0.55rem; }
.matter-row.is-open .matter-toggle::after { opacity: 0; }
.matter-row-body {
  display: none;
  padding: 0 1.15rem 1.2rem 3.4rem;
}
.matter-row.is-open .matter-row-body { display: block; }
.matter-row-body p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  max-width: 48ch;
}

/* Vertical timeline */
.after {
  padding: 3.5rem 0 3rem;
  background: var(--obsidian);
  color: var(--ivory);
}
.after .eyebrow { color: var(--silver); }
.after .section-head h2 { color: var(--ivory); }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: rgba(200, 204, 211, 0.22);
}
.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  align-items: start;
}
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid rgba(200, 204, 211, 0.3);
  background: var(--obsidian-soft);
  color: var(--silver);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.timeline-item.is-active .timeline-dot,
.timeline-dot[aria-pressed="true"] {
  background: var(--mahogany);
  border-color: var(--mahogany);
  color: #fff;
}
.timeline-copy {
  padding: 0.25rem 0 0.85rem;
  border-bottom: 1px solid rgba(200, 204, 211, 0.12);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.timeline-item.is-active .timeline-copy { opacity: 1; }
.timeline-item:last-child .timeline-copy { border-bottom: 0; }
.timeline-copy h3 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}
.timeline-copy p {
  color: rgba(244, 239, 228, 0.7);
  max-width: 42ch;
}

/* Street break */
.street-break {
  margin: 0;
  max-height: 280px;
  overflow: hidden;
  background: var(--obsidian);
}
.street-break img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 40%;
  filter: contrast(1.05) saturate(0.85) brightness(0.7);
}

/* Fee: typographic band */
.fee {
  padding: 4rem 0;
  background: var(--ivory);
}
.fee-quote {
  margin: 0 0 1rem;
}
.fee-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--obsidian);
}
.fee-note {
  color: var(--muted);
  max-width: 36ch;
  margin-inline: auto;
}

/* E3: centered intake */
.intake {
  padding: 3.5rem 0 4rem;
  background: var(--ivory-deep);
}
.intake h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  margin-bottom: 0.45rem;
}
.intake-lead {
  color: var(--muted);
  margin-bottom: 1.35rem;
}
.intake-widget {
  text-align: left;
  padding: 1.35rem 1.2rem 1.4rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 0.45rem;
}
.intake-progress {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 0.65rem;
}
.intake-dot {
  width: 2rem;
  height: 4px;
  border-radius: var(--pill);
  background: rgba(12, 15, 20, 0.12);
}
.intake-dot.is-active { background: var(--mahogany); }
.intake-panel {
  margin: 0;
  padding: 0;
  border: none;
  display: none;
  gap: 0.45rem;
}
.intake-panel.is-active { display: grid; }
.intake-panel legend {
  padding: 0;
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
}
.chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 0.9rem;
  border-radius: var(--pill);
  border: 1px solid var(--stroke);
  background: var(--ivory);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--elev);
}
.chip:has(input:checked) {
  border-color: rgba(107, 46, 42, 0.4);
  background: rgba(107, 46, 42, 0.08);
}
.chip input { accent-color: var(--mahogany); }
.intake-next { margin-top: 0.55rem; justify-self: center; }
.intake-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
  justify-content: center;
}
.intake-phone {
  margin-top: 1.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
}
.intake-phone a { color: var(--mahogany); }

.foot {
  padding: 2rem 0 2.25rem;
  background: var(--obsidian);
  color: rgba(244, 239, 228, 0.68);
  text-align: center;
}
.foot-inner { display: grid; gap: 0.55rem; justify-items: center; }
.foot-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ivory);
  margin: 0;
}
.foot-note { margin: 0; font-size: 0.78rem; max-width: 40ch; }
.foot a {
  font-size: 0.86rem;
  font-weight: 600;
  color: #D4A39A;
}

@media (prefers-reduced-motion: reduce) {
  .btn-lift:hover { transform: none; }
}

@media (max-width: 700px) {
  .matter-row-head {
    grid-template-columns: auto 1fr auto;
  }
  .matter-hint { display: none; }
  .matter-row-body { padding-left: 1.15rem; }
  .hero-actions .btn { width: min(100%, 20rem); }
}


/* --- Accessibility baseline (Web Interface Guidelines) --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { outline: none; }
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe-area gutters on sticky chrome; contain scroll chaining in drawers/overlays */
.nav, .nav-min, .masthead, .bar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.nav-drawer {
  overscroll-behavior: contain;
}

/* --- Web Interface Guidelines extras --- */
a, button, summary, input, select, textarea, label, [role="button"], [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
h1, h2, h3 { text-wrap: pretty; }
