/* =========================================================================
   Ensō Crux — Site stylesheet
   Built on the design-system tokens (colors_and_type.css).
   Three colors: Ink, Washi, Oxblood. Two faces: Jost, Public Sans.
   ========================================================================= */

/* ---------- Fonts: self-hosted variable woff2 ---------- */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Jost-VF-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Jost-VF-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/PublicSans-VF-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/PublicSans-VF-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/PublicSans-VF-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/PublicSans-VF-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  --ink:           #1A1714;
  --ink-rgb:       26, 23, 20;
  --ink-85:        rgba(26, 23, 20, 0.85);
  --ink-70:        rgba(26, 23, 20, 0.70);
  --ink-55:        rgba(26, 23, 20, 0.55);
  --ink-40:        rgba(26, 23, 20, 0.40);
  --ink-25:        rgba(26, 23, 20, 0.25);
  --ink-12:        rgba(26, 23, 20, 0.12);
  --ink-06:        rgba(26, 23, 20, 0.06);

  --washi:         #F2EBDC;
  --washi-deep:    #E8DFCB;
  --washi-pale:    #F8F2E5;

  --oxblood:       #6B1F1A;
  --oxblood-deep:  #4E1612;
  --oxblood-soft:  #8A2A24;

  --bg:            var(--washi);
  --bg-elevated:   var(--washi-pale);
  --bg-recessed:   var(--washi-deep);

  --fg:            var(--ink);
  --fg-1:          var(--ink);
  --fg-2:          var(--ink-70);
  --fg-3:          var(--ink-55);
  --fg-4:          var(--ink-40);

  --rule:          var(--ink-12);
  --rule-strong:   var(--ink-25);

  --accent:        var(--oxblood);
  --accent-deep:   var(--oxblood-deep);
  --accent-soft:   var(--oxblood-soft);

  --font-display:  "Jost", "Futura PT", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-body:     "Public Sans", "Söhne", "Untitled Sans", system-ui, sans-serif;

  --ease:          cubic-bezier(0.32, 0.08, 0.24, 1);
  --dur-2:         200ms;
  --dur-3:         320ms;
  --dur-4:         560ms;

  --measure:       68ch;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { background: var(--bg); }

::selection { background: var(--ink); color: var(--washi); }

img { display: block; max-width: 100%; }

/* ---------- Typography ---------- */

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3.75rem;
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 2.75rem;
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.25;
}
h4, .h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
}

p { max-width: var(--measure); text-wrap: pretty; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-2);
}

.caption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fg-3);
}

/* ---------- Links ---------- */

a {
  color: var(--fg-1);
  text-decoration: underline;
  text-decoration-color: var(--ink-25);
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--dur-2) var(--ease);
}
a:hover { text-decoration-color: var(--fg-1); }

/* ---------- Wordmark ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--fg-1);
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark span { display: block; }

/* ---------- Rules ---------- */

.rule { border: 0; border-top: 1px solid var(--rule); }
.rule-strong { border: 0; border-top: 1px solid var(--rule-strong); }

/* ---------- Layout ---------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 56px;
}

.container--narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ---------- Nav ---------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 56px;
  border-bottom: 1px solid var(--rule);
}

.site-nav .wordmark { font-size: 14px; }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-size: 0.8125rem;
  color: var(--fg-3);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--dur-2) var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--fg-1);
}

.nav-cta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--dur-2) var(--ease);
}
.nav-cta:hover { opacity: 0.7; text-decoration: none; }
.nav-cta .arr { color: var(--accent); margin-left: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  font-size: 0.75rem;
  color: var(--fg-3);
}
.site-footer a {
  color: var(--fg-2);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color var(--dur-2) var(--ease);
}
.site-footer a:hover { color: var(--fg-1); }
.footer-col .eyebrow { margin-bottom: 12px; }
.footer-entity { line-height: 1.55; color: var(--fg-2); max-width: 30ch; }
.footer-mantra { margin-top: 12px; color: var(--fg-3); font-style: italic; }

/* ---------- Hero ---------- */

.hero {
  padding: 144px 56px 96px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 32px; font-size: 1.1875rem; }
.hero-actions {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ---------- CTAs ---------- */

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--washi);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity var(--dur-2) var(--ease);
}
.cta-primary:hover { opacity: 0.7; color: var(--washi); text-decoration: none; }
.cta-primary .arr { color: var(--accent-soft); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.8125rem;
  text-decoration: underline;
  text-decoration-color: var(--ink-25);
  text-underline-offset: 0.25em;
}
.cta-ghost:hover { text-decoration-color: var(--ink); }
.cta-ghost .arr { color: var(--accent); }

/* ---------- Section blocks ---------- */

.section {
  padding: 96px 56px;
  max-width: 1200px;
  margin: 0 auto;
}

.section--recessed {
  background: var(--bg-recessed);
  max-width: none;
}
.section--recessed .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
}

.section-grid--three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}

.section-grid--four {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}

/* ---------- Thesis blocks ---------- */

.thesis-block {
  padding: 40px 32px;
  border-bottom: 1px solid var(--rule-strong);
}
.thesis-block:not(:last-child) {
  border-right: 1px solid var(--rule);
}
.thesis-block .eyebrow { margin-bottom: 20px; }
.thesis-block h3 { max-width: 18ch; margin-bottom: 16px; }
.thesis-block p {
  color: var(--fg-2);
  font-size: 0.75rem;
  line-height: 1.55;
  max-width: 40ch;
}
.thesis-block .cta-ghost { margin-top: 20px; font-size: 0.75rem; }

/* ---------- Methodology beats ---------- */

.beat {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 64px;
  padding: 56px 0;
}
.beat:not(:first-child) { border-top: 1px solid var(--rule); }
.beat-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 6rem;
  line-height: 1;
  color: var(--ink-25);
}
.beat-label {
  margin-top: 8px;
  color: var(--accent);
}
.beat-content h2 { max-width: 22ch; }
.beat-content .lede { margin-top: 20px; font-style: italic; }
.beat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}
.beat-list {
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.beat-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ink-06);
  display: flex;
  gap: 12px;
}
.beat-list .arr { color: var(--accent); flex-shrink: 0; }

/* ---------- Posture review timeline ---------- */

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.timeline-step {
  padding: 24px 20px;
  border-bottom: 1px solid var(--rule-strong);
}
.timeline-step:not(:last-child) {
  border-right: 1px solid var(--rule);
}

/* ---------- Two-column with sticky sidebar ---------- */

.layout-sidebar {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 96px;
  align-items: start;
}
.sidebar-sticky {
  position: sticky;
  top: 32px;
}

/* ---------- Inquiry form ---------- */

.inquiry-box {
  border: 1px solid var(--rule-strong);
  padding: 32px;
  background: var(--bg-elevated);
}
.inquiry-box .eyebrow { margin-bottom: 16px; }

.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--fg-3);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--rule-strong);
  padding: 10px 12px;
  background: var(--washi);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--fg-1);
  outline: none;
  transition: border-color var(--dur-2) var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-note {
  margin-top: 8px;
  font-size: 0.6875rem;
  color: var(--fg-3);
}

/* ---------- Contact page ---------- */

.contact-form { max-width: 640px; }
.contact-form .form-field { margin-bottom: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .site-nav { padding: 20px 24px; }
  .nav-links { gap: 20px; }
  .nav-cta { display: none; }
  .hero { padding: 80px 24px 64px; }
  h1, .h1 { font-size: 2.5rem; }
  h2, .h2 { font-size: 2rem; }
  .container, .container--narrow, .section { padding-left: 24px; padding-right: 24px; }
  .section-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-grid--three { grid-template-columns: 1fr; }
  .section-grid--four { grid-template-columns: 1fr 1fr; }
  .thesis-block:not(:last-child) { border-right: none; }
  .beat { grid-template-columns: 1fr; gap: 24px; }
  .beat-number { font-size: 4rem; }
  .beat-grid { grid-template-columns: 1fr; gap: 24px; }
  .layout-sidebar { grid-template-columns: 1fr; gap: 48px; }
  .sidebar-sticky { position: static; }
  .site-footer { grid-template-columns: 1fr 1fr; gap: 32px; }
  .timeline { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { font-size: 0.75rem; }
  .site-footer { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .section-grid--four { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
