/* ===== CLARION STUDIO — DESIGN SYSTEM ===== */
/* clarion.studio | v1.0 | April 2026 */

/* ===== SELF-HOSTED FONTS ===== */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Foundations */
  --bg-primary: #F9F8F6;
  --bg-surface: #F0EFEC;
  --bg-inverse: #1C1C28;
  --border-subtle: #E5E4E0;

  /* Text */
  --text-primary: #1C1C28;
  --text-secondary: #6E6E7A;
  --text-tertiary: #9E9EA8;
  --text-inverse: #F9F8F6;

  /* Accent */
  --accent-primary: #1B4D5C;
  --accent-hover: #143D49;
  --accent-warm: #A68B5B;
  --accent-warm-subtle: rgba(166, 139, 91, 0.15);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing (8px base) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* Transitions */
  --transition-standard: 250ms ease-out;
  --transition-reveal: 400ms ease-out;
}


/* ===== RESET ===== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }


/* ===== SKIP LINK ===== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  font-size: 14px;
  z-index: 100;
}
.skip-link:focus { top: var(--space-xs); }


/* ===== NAVIGATION ===== */

.site-nav {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  transition: color var(--transition-standard);
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent-warm);
  transition: width 300ms ease-out;
}

.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }

.nav-cta {
  background: var(--accent-primary) !important;
  color: var(--text-inverse) !important;
  padding: 10px 24px;
  border-radius: 4px;
  transition: background var(--transition-standard), transform var(--transition-standard) !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
}


/* ===== LAYOUT ===== */

.site-max {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}


/* ===== TYPOGRAPHY ===== */

.brass-rule {
  width: 40px;
  height: 2px;
  background: var(--accent-warm);
  margin-bottom: var(--space-lg);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
}


/* ===== BUTTONS ===== */

.btn-primary {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 16px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-standard), transform var(--transition-standard), box-shadow var(--transition-standard);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(27, 77, 92, 0.15);
}


/* ===== PAGE HEROES ===== */

.hero {
  padding: var(--space-4xl) var(--space-lg) var(--space-3xl);
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 56px;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  max-width: 780px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
  margin-bottom: var(--space-xl);
}

.page-hero {
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 48px;
  line-height: 1.15;
}


/* ===== PROSE SECTIONS ===== */

.prose-section {
  padding: 0 var(--space-lg) var(--space-3xl);
  max-width: 1200px;
  margin: 0 auto;
}

.prose-narrow {
  max-width: 680px;
}

.prose-narrow h2 {
  margin-bottom: var(--space-lg);
}

.prose-narrow p {
  margin-bottom: var(--space-md);
}

.prose-narrow p:last-child {
  margin-bottom: 0;
}


/* ===== SURFACE SECTIONS ===== */

.surface-section {
  background: var(--bg-surface);
  padding: var(--space-3xl) 0;
}

.surface-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}


/* ===== DARK SECTIONS ===== */

.dark-section {
  background: var(--bg-inverse);
  padding: var(--space-3xl) 0;
}

.dark-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}


/* ===== DIVIDERS ===== */

.section-divide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-divide hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  width: 60%;
  margin: 0;
}


/* ===== STATS GRID ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  margin-bottom: var(--space-sm);
}

.stat-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-tertiary);
  max-width: 300px;
}

.stat-src {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  font-style: italic;
}


/* ===== APPROACH GRID ===== */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.approach-col {
  border-top: 2px solid var(--accent-warm);
  padding-top: var(--space-md);
}

.approach-col h3 {
  margin-bottom: var(--space-sm);
}

.approach-col p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}


/* ===== LIGHTHOUSE GRID ===== */

.lh-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.lh-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--space-md);
  text-align: center;
}

.lh-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.lh-label {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.lh-context {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
}


/* ===== CTA SECTIONS ===== */

.cta-section {
  padding: var(--space-3xl) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-inner .brass-rule {
  margin: 0 auto var(--space-lg);
}

.cta-inner p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}


/* ===== INVITATION ===== */

.section-invitation {
  padding: var(--space-3xl) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.invitation-inner {
  max-width: 600px;
  margin: 0 auto;
}

.section-invitation .brass-rule {
  margin: 0 auto var(--space-lg);
}

.section-invitation p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.section-invitation .btn-primary {
  margin-top: var(--space-md);
}


/* ===== PRINCIPLES GRID ===== */

.principle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  max-width: 680px;
}

.principle {
  padding-left: var(--space-sm);
  border-left: 1px solid var(--border-subtle);
}

.principle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}

.principle-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}


/* ===== CONTACT FORM ===== */

.contact-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-copy p {
  max-width: 520px;
  margin-bottom: var(--space-md);
}

.contact-details {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.contact-person {
  font-weight: 500;
  font-size: 17px;
  margin-bottom: var(--space-xs);
}

.contact-meta {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.contact-meta a {
  color: var(--accent-primary);
  transition: color var(--transition-standard);
}

.contact-meta a:hover { color: var(--accent-hover); }

.contact-form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--space-xl);
}

.form-field {
  margin-bottom: var(--space-md);
}

.form-field:last-of-type {
  margin-bottom: var(--space-lg);
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xs);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 12px var(--space-sm);
  transition: border-color var(--transition-standard);
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-primary);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-tertiary);
}

.btn-submit {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 16px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition-standard), transform var(--transition-standard), box-shadow var(--transition-standard);
}

.btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(27, 77, 92, 0.15);
}

.form-note {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
  text-align: center;
}


/* ===== NUMBERED SECTIONS (Editorial pagination) ===== */

.numbered-section {
  position: relative;
}

.numbered-section::before {
  content: attr(data-num);
  position: absolute;
  left: -64px;
  top: 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
}

@media (max-width: 1100px) {
  .numbered-section::before {
    position: static;
    display: block;
    margin-bottom: var(--space-xs);
  }
}


/* ===== READING TIME (Perspectives index) ===== */

.article-entry .article-reading-time {
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 13px;
  margin-left: 8px;
  font-weight: 400;
  letter-spacing: 0;
}


/* ===== ARTICLE PUBLISHED STAMP ===== */

.article-stamp {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  margin-top: var(--space-md);
  font-style: italic;
}

.article-stamp .stamp-divider {
  display: inline-block;
  margin: 0 8px;
  color: var(--text-tertiary);
  font-style: normal;
}


/* ===== THANK YOU STATE ===== */

.thank-you-state {
  padding: var(--space-md) 0;
}

.thank-you-state .brass-rule {
  margin-bottom: var(--space-lg);
}

.thank-you-state .thank-you-greeting {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.thank-you-state p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.thank-you-state p:last-child {
  margin-bottom: 0;
}

.thank-you-state a {
  color: var(--accent-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--accent-warm);
  transition: color var(--transition-standard), border-color var(--transition-standard);
}

.thank-you-state a:hover {
  color: var(--accent-hover);
  border-color: var(--accent-primary);
}

.thank-you-state .reading-time {
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 14px;
}

.thank-you-state .reading-time::before {
  content: ", ";
  font-style: normal;
}


/* ===== FORM SENDING STATE ===== */

#contact-form {
  transition: opacity 400ms ease-out;
}

#contact-form.sending .form-field {
  opacity: 0.5;
  transition: opacity 600ms ease-out;
  pointer-events: none;
}

#contact-form.sending .form-field input,
#contact-form.sending .form-field textarea {
  border-color: var(--border-subtle);
}

.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit.sending {
  pointer-events: none;
  color: transparent;
  transition: color 200ms ease-out;
}

.btn-submit.sending::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-warm);
  transform: translate(-50%, -50%);
  animation: brass-pulse 1.6s ease-in-out infinite;
}

@keyframes brass-pulse {
  0% { width: 0; opacity: 0; }
  40% { width: 60px; opacity: 1; }
  60% { width: 60px; opacity: 1; }
  100% { width: 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-submit.sending::after {
    animation: none;
    width: 60px;
    opacity: 1;
  }
}


/* ===== THREE JOBS ===== */

.job-block {
  margin-bottom: var(--space-xl);
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent-warm);
}

.job-block:last-of-type { margin-bottom: 0; }

.job-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: var(--space-xs);
}

.job-block p {
  max-width: 640px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.job-block p:last-child { margin-bottom: 0; }


/* ===== FOUNDER ===== */

.founder-name {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}


/* ===== FOOTER ===== */

.site-footer {
  background: var(--bg-inverse);
  padding: var(--space-xl) 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-inverse);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition-standard);
}

.footer-links a:hover { color: var(--text-inverse); }

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

.footer-provenance {
  font-style: italic;
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}


/* ===== SCROLL REVEALS ===== */
/* Hidden-by-default states are gated behind body.rv-ready.
   If JS fails to load, body never gets .rv-ready, and elements
   render visible by default — no blank page. */

.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  body.rv-ready .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
  }
  body.rv-ready .reveal.visible {
    opacity: 1;
    transform: none;
  }

  /* Hero entrance sequence */
  body.rv-ready .hero-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
  }
  body.rv-ready .hero-stagger.visible {
    opacity: 1;
    transform: none;
  }
  body.rv-ready .hero-stagger:nth-child(1) { transition-delay: 0ms; }
  body.rv-ready .hero-stagger:nth-child(2) { transition-delay: 150ms; }
  body.rv-ready .hero-stagger:nth-child(3) { transition-delay: 700ms; }
  body.rv-ready .hero-stagger:nth-child(4) { transition-delay: 950ms; }

  /* Word-by-word hero reveal */
  body.rv-ready .hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
  }
  body.rv-ready .hero-word.visible {
    opacity: 1;
    transform: none;
  }

  /* Brass rule draw — only when animated */
  body.rv-ready .brass-rule.hero-stagger,
  body.rv-ready .brass-rule.reveal {
    width: 0;
    transition: width 600ms ease-out;
  }
  body.rv-ready .brass-rule.hero-stagger.visible,
  body.rv-ready .brass-rule.reveal.visible {
    width: 40px;
  }
}

/* Image fade-in on scroll */
body.rv-ready img.fade-in {
  opacity: 0;
  transition: opacity 1000ms ease-out;
}
body.rv-ready img.fade-in.visible {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  body.rv-ready img.fade-in { opacity: 1; }
}


/* ===== CUSTOM CURSOR ===== */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: top, left, transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-warm);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 600ms ease-out;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-warm);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 280ms ease-out, transform 280ms ease-out, border-color 280ms ease-out;
}

/* Dot present whenever cursor is active — quiet, never gone */
body.cursor-active .cursor-dot { opacity: 0.7; }

/* Idle fade: dot dims to near-invisible when mouse stops moving */
body.cursor-active.cursor-idle .cursor-dot { opacity: 0.25; }

/* Ring only appears on interactive hover — the only "moment" */
.cursor-ring.hovering {
  opacity: 0.55;
  transform: translate(-50%, -50%) scale(1);
  border-color: var(--accent-primary);
}

@media (hover: hover) and (pointer: fine) {
  body.cursor-active,
  body.cursor-active * {
    cursor: none !important;
  }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* Link hover underlines — left to right draw */
.prose-narrow a,
.article-read,
.contact-meta a {
  position: relative;
  color: var(--accent-primary);
}

.prose-narrow a::after,
.article-read::after,
.contact-meta a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width var(--transition-standard);
}

.prose-narrow a:hover::after,
.article-read:hover::after,
.contact-meta a:hover::after {
  width: 100%;
}

/* Approach column hover lift */
.approach-col {
  transition: transform var(--transition-standard), box-shadow var(--transition-standard);
}

.approach-col:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28, 28, 40, 0.06);
}

/* Lighthouse card hover */
.lh-card {
  transition: border-color var(--transition-standard), transform var(--transition-standard);
}

.lh-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Principle card hover */
.principle {
  transition: border-color var(--transition-standard);
}

.principle:hover {
  border-color: var(--accent-warm);
}


/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ===== RESPONSIVE: TABLET ===== */

@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .hero { padding: var(--space-3xl) var(--space-md) var(--space-2xl); }
  .page-hero h1 { font-size: 36px; }
  .page-hero { padding: var(--space-2xl) var(--space-md) var(--space-xl); }

  .prose-section { padding: 0 var(--space-md) var(--space-2xl); }
  .surface-inner, .dark-inner { padding: 0 var(--space-md); }
  .section-divide { padding: 0 var(--space-md); }

  .stats-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .stat-num { font-size: 48px; }

  .approach-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .lh-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: 1fr; }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: 0 var(--space-md) var(--space-2xl);
  }

  .cta-section,
  .section-invitation { padding: var(--space-2xl) var(--space-md); }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}


/* ===== RESPONSIVE: MOBILE ===== */

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; max-width: 100%; }
  .hero-sub { font-size: 16px; }
  .page-hero h1 { font-size: 28px; }
  h2, .h2 { font-size: 28px; }

  .site-nav { padding: var(--space-sm) var(--space-md); }
  .nav-links .nav-text { display: none; }

  .stat-num { font-size: 40px; }
  .lh-num { font-size: 36px; }

  .contact-form-wrap { padding: var(--space-lg); }
  .section-invitation p { font-size: 16px; }
}


/* ===== MOBILE NAV DRAWER ===== */

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 250ms ease-out, opacity 200ms ease-out;
  transform-origin: center;
}

body.drawer-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.drawer-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.drawer-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 40, 0);
  z-index: 998;
  pointer-events: none;
  transition: background 300ms ease-out;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 82vw);
  background: var(--bg-primary);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -12px 0 40px rgba(28, 28, 40, 0);
  z-index: 999;
  padding: var(--space-xl) var(--space-lg);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 320ms ease-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

body.drawer-open .nav-drawer {
  transform: translateX(0);
  box-shadow: -12px 0 40px rgba(28, 28, 40, 0.12);
}

body.drawer-open .nav-drawer-overlay {
  background: rgba(28, 28, 40, 0.35);
  pointer-events: auto;
}

.nav-drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-xl);
}

.nav-drawer-close {
  background: transparent;
  border: 0;
  padding: 8px;
  margin-right: -8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.nav-drawer-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.nav-drawer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer-links li {
  border-bottom: 1px solid var(--border-subtle);
}

.nav-drawer-links li:last-child {
  border-bottom: 0;
  margin-top: var(--space-lg);
}

.nav-drawer-links a {
  display: block;
  padding: 18px 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-drawer-links a.nav-drawer-cta {
  background: var(--accent-primary);
  color: var(--text-inverse);
  text-align: center;
  padding: 16px 24px;
  border-radius: 4px;
  font-weight: 600;
}

.nav-drawer-provenance {
  margin-top: auto;
  padding-top: var(--space-xl);
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  text-align: center;
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* Hide drawer elements entirely on desktop */
@media (min-width: 601px) {
  .nav-drawer,
  .nav-drawer-overlay {
    display: none !important;
  }
}

/* Show hamburger and adjust nav below 600px */
@media (max-width: 600px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    gap: var(--space-sm);
  }
  .nav-links .nav-cta {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Reduced motion — skip the slide, just fade */
@media (prefers-reduced-motion: reduce) {
  .nav-drawer {
    transition: opacity 200ms ease-out;
    transform: translateX(0);
    opacity: 0;
    pointer-events: none;
  }
  body.drawer-open .nav-drawer {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
  .nav-toggle-bar {
    transition: none;
  }
}
