/* ============================================
   SOLVARA PAPER — Master Design System
   One skeleton. Eleven token packs. Zero dialects.
   ============================================ */

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* --- DESIGN TOKENS --- */
:root {
  /* Paper & Ink */
  --paper: #faf8f5;
  --paper-warm: #f5f1ea;
  --paper-card: #ffffff;
  --ink: #1f1a17;
  --ink-soft: #4a4038;
  --ink-mute: #8a7d70;
  --rule: #e3ddd3;
  --rule-soft: #ede8de;

  /* Accent (overridden by vertical token pack) */
  --accent: #6b4c6e;
  --accent-tint: rgba(107, 76, 110, 0.08);
  --accent-text: #6b4c6e;
  --accent-rule: rgba(107, 76, 110, 0.25);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Type Scale (fluid, editorial) */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: clamp(1.75rem, 4vw, 2.25rem);   /* 28-36px */
  --text-4xl: clamp(2rem, 5vw, 3rem);         /* 32-48px */
  --text-5xl: clamp(2.5rem, 7vw, 4.5rem);     /* 40-72px */

  /* Measure (line length) */
  --measure: 65ch;
  --measure-tight: 50ch;
  --measure-wide: 80ch;

  /* Spacing (8px base, editorial rhythm) */
  --space-1: 0.5rem;    /* 8px */
  --space-2: 1rem;      /* 16px */
  --space-3: 1.5rem;    /* 24px */
  --space-4: 2rem;      /* 32px */
  --space-5: 3rem;      /* 48px */
  --space-6: 4rem;      /* 64px */
  --space-7: 6rem;      /* 96px */
  --space-8: 8rem;      /* 128px */

  /* Layout */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max-width: 1200px;
  --max-width-prose: 720px;

  /* Radius — print has no radius */
  --radius: 0;
  --radius-sm: 0;
  --radius-pill: 0;

  /* Motion — minimal, earned */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 160ms;
}

/* --- BASE --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

p { line-height: 1.7; max-width: var(--measure); }

.lead { font-size: var(--text-lg); line-height: 1.6; color: var(--ink-soft); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.numeral {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-lg);
  color: var(--accent-text);
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1;
}

/* --- LAYOUT PRIMITIVES --- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose {
  max-width: var(--max-width-prose);
  margin-inline: auto;
}
.section {
  padding-block: var(--space-7);
}
.section-tight {
  padding-block: var(--space-5);
}

/* Rules (editorial dividers) */
.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin-block: var(--space-4);
}
.rule-soft {
  border: none;
  border-top: 1px solid var(--rule-soft);
  margin-block: var(--space-3);
}

/* --- MASTHEAD --- */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-2);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.masthead-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.masthead-logo svg, .masthead-logo img {
  height: 40px;
  width: auto;
}
.masthead-nav {
  display: none;
  align-items: center;
  gap: var(--space-4);
}
.masthead-nav a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  transition: color var(--duration) var(--ease);
}
.masthead-nav a:hover { color: var(--accent-text); }
.masthead-nav a.active { color: var(--ink); }

@media (min-width: 768px) {
  .masthead-nav { display: flex; }
}

.masthead-cta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  padding: 0.625rem 1.25rem;
  transition: opacity var(--duration) var(--ease);
}
.masthead-cta:hover { opacity: 0.85; }

/* --- S01: OPENING --- */
.s-opening {
  padding-block: var(--space-8) var(--space-7);
  position: relative;
}
.s-opening .opening-grid {
  display: block;
}
.s-opening .practice-name {
  font-size: var(--text-5xl);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.s-opening .vertical-label {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.s-opening .vertical-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-rule);
}
.s-opening .lede {
  margin-top: var(--space-4);
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}
@media (min-width: 768px) {
  .s-opening .opening-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-6);
    align-items: end;
  }
  .s-opening .opening-text { order: 1; }
  .s-opening .opening-figure { order: 2; }
}

/* --- S02: FIGURE --- */
.s-figure {
  padding-block: 0 var(--space-7);
}
.figure {
  position: relative;
  overflow: hidden;
}
.figure img {
  width: 100%;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 16 / 9;
}
.figure-caption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-mute);
  font-style: italic;
  max-width: var(--measure);
}

/* Monogram fallback — elegant, not a placeholder */
.monogram {
  aspect-ratio: 4 / 3;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
}
.monogram-text {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 200;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

/* --- S03: VISIBILITY RECORD --- */
.s-visibility {
  padding-block: var(--space-7);
  background: var(--paper-card);
  border-block: 1px solid var(--rule);
}
.visibility-score {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.visibility-score .number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 300;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.visibility-score .denom {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--ink-mute);
}
.visibility-status {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91c1c;
  margin-top: var(--space-1);
}
.scope-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (min-width: 768px) {
  .scope-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
}
.scope-item {
  border-left: 1px solid var(--accent-rule);
  padding-left: var(--space-2);
}
.scope-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.scope-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-top: var(--space-1);
}
.competitor-list {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.competitor-tag {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--rule);
}

/* --- S04: SERVICES --- */
.s-services {
  padding-block: var(--space-7);
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.service-item {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule-soft);
}
.service-item:last-child { border-bottom: none; }
.service-number {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--accent-text);
  flex-shrink: 0;
  min-width: 2.5rem;
  font-variant-numeric: oldstyle-nums;
}
.service-body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}
.service-body p {
  color: var(--ink-soft);
  font-size: var(--text-base);
}

/* --- S05: APPROACH --- */
.s-approach {
  padding-block: var(--space-7);
  background: var(--paper-card);
  border-block: 1px solid var(--rule);
}
.approach-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.approach-item {
  max-width: var(--measure);
}
.approach-item h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}
.approach-item p {
  color: var(--ink-soft);
}

/* --- S06: CONDITIONS --- */
.s-conditions {
  padding-block: var(--space-7);
}
.conditions-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
@media (min-width: 640px) {
  .conditions-list { grid-template-columns: repeat(2, 1fr); }
}
.condition-item {
  display: flex;
  justify-content: space-between;
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--rule-soft);
  font-size: var(--text-base);
}
.condition-name { color: var(--ink); }
.condition-detail { color: var(--ink-mute); font-size: var(--text-sm); }

/* --- S07: PROVIDERS --- */
.s-providers {
  padding-block: var(--space-7);
  background: var(--paper-card);
  border-block: 1px solid var(--rule);
}
.provider-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.provider-item {
  display: flex;
  gap: var(--space-3);
  padding-left: var(--space-3);
  border-left: 2px solid var(--accent-rule);
}
.provider-item h3 {
  font-size: var(--text-lg);
  margin-bottom: 0.25rem;
}
.provider-item .role {
  font-size: var(--text-sm);
  color: var(--accent-text);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.provider-item p {
  color: var(--ink-soft);
  font-size: var(--text-base);
}

/* --- S08: VISIT --- */
.s-visit {
  padding-block: var(--space-7);
}
.visit-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (min-width: 640px) {
  .visit-grid { grid-template-columns: repeat(2, 1fr); }
}
.visit-block {
  border-top: 1px solid var(--rule);
  padding-top: var(--space-2);
}
.visit-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--space-1);
}
.visit-value {
  font-size: var(--text-base);
  color: var(--ink);
  line-height: 1.5;
}
.visit-value a {
  color: var(--accent-text);
  border-bottom: 1px solid var(--accent-rule);
}

/* --- S09: QUESTIONS (FAQ) — Accordion --- */
.s-questions {
  padding-block: var(--space-7);
  background: var(--paper-card);
  border-block: 1px solid var(--rule);
}
.faq-list {
  margin-top: var(--space-5);
  max-width: var(--measure);
}
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  padding: var(--space-3) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  color: var(--ink-mute);
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-item p {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  padding: 0 0 var(--space-3) 0;
  line-height: 1.6;
}

/* --- S02b: METRICS STRIP --- */
.s-metrics {
  padding-block: var(--space-5);
  border-block: 1px solid var(--rule);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-3);
}
@media (min-width: 768px) {
  .metrics-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
}
.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.metric-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.metric-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  line-height: 1.3;
}

/* --- S09b: TESTIMONIAL --- */
.s-testimonial {
  padding-block: var(--space-8);
  background: var(--ink);
  color: var(--paper);
}
.testimonial-quote {
  max-width: var(--measure);
  margin: 0 auto;
}
.testimonial-mark {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 200;
  line-height: 0.8;
  color: var(--accent-rule);
  margin-bottom: var(--space-2);
}
.testimonial-body {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.4;
  color: var(--paper);
}
.testimonial-attr {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.testimonial-author {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--paper);
}
.testimonial-practice {
  font-size: var(--text-sm);
  color: var(--paper-warm);
  opacity: 0.7;
}

/* --- S10: CLOSE --- */
.s-close {
  padding-block: var(--space-8);
  text-align: center;
}
.s-close .closing-statement {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1.3;
  max-width: var(--measure);
  margin: 0 auto var(--space-5);
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  padding: 1rem 2.5rem;
  transition: opacity var(--duration) var(--ease);
}
.cta-button:hover { opacity: 0.85; }
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--accent-text);
  padding: 1rem 2rem;
  border: 1px solid var(--accent-rule);
  transition: background var(--duration) var(--ease);
}
.cta-secondary:hover { background: var(--accent-tint); }

/* --- COLOPHON (FOOTER) --- */
.colophon {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-mute);
}
.colophon-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  text-align: center;
}
@media (min-width: 640px) {
  .colophon-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.colophon a { color: var(--accent-text); }

/* --- BAN LIST ENFORCEMENT (CSS-level) --- */
/* If any of these patterns appear, they get neutralized */
.card-grid { all: revert; } /* Override any card-grid attempts */
.glass { background: var(--paper-card) !important; backdrop-filter: none !important; }
.stat-counter { animation: none !important; }
.pill-badge { border-radius: 0 !important; }
.gradient-text {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: var(--ink) !important;
}

/* --- PRINT --- */
@media print {
  .masthead-nav, .cta-button, .cta-secondary { display: none; }
  body { background: white; color: black; }
  .section, .s-opening, .s-figure, .s-visibility, .s-services,
  .s-approach, .s-conditions, .s-providers, .s-visit, .s-questions, .s-close {
    break-inside: avoid;
  }
}

/* --- ACCESSIBILITY --- */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
