/* LegalSpark — The Seal Vault · V21 */
:root {
  --ink: #0A0D12;
  --slate: #151A22;
  --frost: #EEF0F3;
  --flax: #C4B583;
  --steel: #8A9199;
  --flax-dim: rgba(196, 181, 131, 0.15);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 4px;
  --header-h: 72px;
  --rail-w: 56px;
  --max-w: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Red Hat Text', Georgia, serif;
  background: var(--ink);
  color: var(--frost);
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--flax); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--frost); }
a:focus-visible { outline: 2px solid var(--flax); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: 'Young Serif', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 0.85rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }

.label {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.surface-ink { background: var(--ink); color: var(--frost); }
.surface-frost { background: var(--frost); color: var(--ink); }
.surface-slate { background: var(--slate); color: var(--frost); }
.surface-flax { background: var(--flax); color: var(--ink); }

.container { width: min(var(--max-w), 92vw); margin-inline: auto; }
.container-narrow { width: min(760px, 92vw); margin-inline: auto; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: var(--frost);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(10, 13, 18, 0.08);
}

.site-header.is-scrolled .logo-text { color: var(--ink); }
.site-header.is-scrolled .nav-link { color: var(--ink); }
.site-header.is-scrolled .nav-link:hover { color: var(--flax); }
.site-header.is-scrolled .nav-link.is-active { color: var(--flax); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max-w), 92vw);
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }

.logo-text {
  font-family: 'Young Serif', serif;
  font-size: 1.25rem;
  color: var(--frost);
  transition: color var(--transition);
}

.nav-list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frost);
  transition: color var(--transition);
}

.nav-link.is-active { color: var(--flax); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: var(--transition);
}

/* ── Seal Rail (inner pages) ── */
.page-with-rail { padding-left: var(--rail-w); }

.seal-rail {
  position: fixed;
  top: 0; left: 0;
  width: var(--rail-w);
  height: 100vh;
  background: var(--slate);
  border-right: 1px solid rgba(196, 181, 131, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--header-h) + 1.5rem);
  z-index: 900;
}

.seal-rail svg { width: 32px; height: auto; }

.seal-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 2rem;
}

/* ── Hero Pattern B ── */
.hero-cinematic {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-cinematic-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-cinematic-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cinematic-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 13, 18, 0.92) 0%,
    rgba(10, 13, 18, 0.45) 45%,
    rgba(10, 13, 18, 0.25) 100%
  );
}

.hero-cinematic-content {
  position: relative;
  z-index: 1;
  width: min(var(--max-w), 92vw);
  margin-inline: auto;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
}

.hero-cinematic .label { color: var(--flax); margin-bottom: 1.25rem; }

.hero-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 720px;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(238, 240, 243, 0.25);
}

.hero-cinematic h1 { max-width: 18ch; font-size: clamp(2.5rem, 5vw, 4.5rem); }

.hero-cinematic-lead {
  font-size: 1.125rem;
  max-width: 52ch;
  color: var(--steel);
  margin: 1.25rem 0 2rem;
}

/* ── Seal Spark Animation S-01 → S-06 ── */
.seal-spark {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
}

.seal-spark path {
  fill: none;
  stroke: var(--flax);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.seal-spark .spark-ring {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: sealDraw 2.4s ease forwards;
}

.seal-spark .spark-inner {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: sealDraw 2s 0.6s ease forwards;
}

.seal-spark .spark-star {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: sealDraw 1.2s 1.4s ease forwards;
  fill: var(--flax);
  fill-opacity: 0;
  animation: sealDraw 1.2s 1.4s ease forwards, sealFill 0.6s 2.2s ease forwards;
}

@keyframes sealDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes sealFill {
  to { fill-opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .seal-spark .spark-ring,
  .seal-spark .spark-inner,
  .seal-spark .spark-star {
    animation: none;
    stroke-dashoffset: 0;
    fill-opacity: 0.35;
  }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-flax {
  background: var(--flax);
  color: var(--ink);
  border-color: var(--flax);
}

.btn-flax:hover { background: #d4c99a; color: var(--ink); }

.btn-outline {
  background: transparent;
  color: var(--frost);
  border-color: rgba(238, 240, 243, 0.35);
}

.btn-outline:hover {
  border-color: var(--flax);
  color: var(--flax);
}

.surface-frost .btn-outline {
  color: var(--ink);
  border-color: rgba(10, 13, 18, 0.25);
}

/* ── Sections ── */
section { padding: 5rem 0; }

.section-header { margin-bottom: 3rem; }
.section-header .label { margin-bottom: 0.75rem; display: block; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: var(--slate);
  border: 1px solid rgba(196, 181, 131, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition);
}

.card:hover { border-color: rgba(196, 181, 131, 0.3); }

.card-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* ── Page Hero (inner) ── */
.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 3rem;
  border-bottom: 1px solid rgba(196, 181, 131, 0.1);
}

.page-hero .label { margin-bottom: 0.75rem; display: block; }

/* ── Prose ── */
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; font-family: 'Young Serif', serif; }

/* ── Disclaimer ── */
.disclaimer {
  font-size: 0.875rem;
  color: var(--steel);
  border-left: 2px solid var(--flax);
  padding: 1rem 1.25rem;
  background: var(--flax-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}

.surface-frost .disclaimer {
  background: rgba(10, 13, 18, 0.04);
  color: #4a5058;
}

/* ── Services ── */
.service-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(196, 181, 131, 0.08);
}

.service-row:last-of-type { border-bottom: none; }

.service-row--reverse {
  grid-template-columns: 1fr minmax(180px, 260px);
}

.service-row--reverse .figure--compact { order: 2; }
.service-row--reverse .service-block { order: 1; }

.service-block {
  padding: 0;
  border-bottom: none;
}

.service-block:last-child { border-bottom: none; }

.service-fee {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  color: var(--flax);
  margin-top: 0.75rem;
}

/* ── Matters ── */
.matter-item {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(196, 181, 131, 0.08);
  align-items: start;
}

.matter-item:last-child { border-bottom: none; }

.matter-item--solo {
  grid-template-columns: 1fr;
  max-width: 48rem;
}

.matter-meta {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.5rem;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid rgba(196, 181, 131, 0.1);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--frost);
  font-family: 'Young Serif', serif;
  font-size: 1.125rem;
}

.faq-question:hover { color: var(--flax); }

.faq-icon {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 1.25rem;
  color: var(--flax);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.is-open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  padding: 0 0 1.5rem;
  color: var(--steel);
}

.faq-answer[hidden] { display: none; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.4rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink);
  border: 1px solid rgba(138, 145, 153, 0.3);
  border-radius: var(--radius);
  color: var(--frost);
  font-family: 'Red Hat Text', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--flax);
}

.form-textarea { min-height: 140px; resize: vertical; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--steel);
}

.form-check input { margin-top: 0.25rem; accent-color: var(--flax); }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ── Contact layout ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-detail {
  margin-bottom: 1.5rem;
}

.contact-detail .label { margin-bottom: 0.35rem; display: block; }

.contact-detail a { color: var(--frost); }
.contact-detail a:hover { color: var(--flax); }

/* ── Footer ── */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(196, 181, 131, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--steel);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 32ch;
}

.footer-col h4 {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--frost); font-size: 0.9rem; }
.footer-col a:hover { color: var(--flax); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(196, 181, 131, 0.08);
  font-size: 0.8rem;
  color: var(--steel);
}

.footer-legal-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal-links a { color: var(--steel); font-size: 0.8rem; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 2000;
  background: var(--slate);
  border-top: 1px solid rgba(196, 181, 131, 0.2);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform var(--transition);
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(var(--max-w), 92vw);
  margin-inline: auto;
  flex-wrap: wrap;
}

.cookie-text { flex: 1; min-width: 260px; font-size: 0.9rem; color: var(--steel); }
.cookie-text a { color: var(--flax); }

.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(10, 13, 18, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cookie-modal[hidden] { display: none; }

.cookie-modal-panel {
  background: var(--slate);
  border: 1px solid rgba(196, 181, 131, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
}

.cookie-modal-panel h3 { margin-bottom: 1rem; }

.cookie-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(138, 145, 153, 0.15);
}

.cookie-toggle label { font-size: 0.9rem; }

/* ── Legal pages ── */
.legal-content { padding: calc(var(--header-h) + 3rem) 0 4rem; }
.legal-content h1 { margin-bottom: 0.5rem; }
.legal-meta { font-size: 0.85rem; color: var(--steel); margin-bottom: 2.5rem; }

/* ── 404 ── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 { margin-bottom: 1rem; }

/* ── Image figure ── */
.figure {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
}

.figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.figure--compact {
  margin: 0;
  max-width: 260px;
}

.figure--compact img {
  aspect-ratio: 4/3;
  border: 1px solid rgba(196, 181, 131, 0.15);
}

.grid-2 .figure--compact {
  max-width: 100%;
}

.figure-caption {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--steel);
  padding: 0.75rem 0;
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}

.stat-item { text-align: center; padding: 1.5rem; }

.stat-num {
  font-family: 'Young Serif', serif;
  font-size: 2rem;
  color: var(--flax);
  display: block;
}

.stat-label {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 0.35rem;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .grid-2, .grid-3, .contact-grid, .footer-grid, .matter-item { grid-template-columns: 1fr; }
  .service-row, .service-row--reverse { grid-template-columns: 1fr; }
  .service-row--reverse .figure--compact,
  .service-row--reverse .service-block { order: unset; }
  .figure--compact { max-width: 100%; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .page-with-rail { padding-left: 0; }
  .seal-rail { display: none; }

  .nav-toggle { display: block; color: var(--frost); }
  .site-header.is-scrolled .nav-toggle { color: var(--ink); }

  .nav-list {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--slate);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    transform: translateY(-120%);
    transition: transform var(--transition);
  }

  .nav-list.is-open { transform: translateY(0); }
}

@media (max-width: 600px) {
  section { padding: 3.5rem 0; }
  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
