/* Tokens match umbra-frontend (src/styles/theme.css): neutral oklch greys,
   one orange accent. Source Serif 4 for headlines (the app's writing face),
   ZT Nature for text, Geist Mono for labels. */

@font-face {
  font-family: 'ZT Nature';
  src: url('../assets/fonts/ZT-Nature-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/SourceSerif4-Variable.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/SourceSerif4-Italic-Variable.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: oklch(0.9911 0 0);
  --panel: oklch(0.9702 0 0);
  --ink: oklch(0.269 0 0);
  --ink2: oklch(0.36 0 0);
  --muted: oklch(0.4386 0 0);
  --rule: oklch(0.9189 0 0);
  --rule2: oklch(0.86 0 0);
  --accent: #d88d26;
  --accent-ink: oklch(0.15 0 0);
  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --hl: color-mix(in oklch, var(--accent) 35%, transparent);
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'ZT Nature', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --radius: 0.35rem;
  --column: 46rem;
  --wide: 66rem;
  --gutter: 1.5rem;

  /* Typography Scale */
  --text-micro: 0.65rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(2.4rem, 5vw, 3.4rem);
  --text-3xl: clamp(3.6rem, 9vw, 5.8rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: oklch(0.1 0 0);
    --panel: oklch(0.15 0 0);
    --ink: oklch(0.97 0 0);
    --ink2: oklch(0.85 0 0);
    --muted: oklch(0.66 0 0);
    --rule: oklch(0.252 0 0);
    --rule2: oklch(0.32 0 0);
    --accent: #e8a445;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: oklch(0.1 0 0);
  --panel: oklch(0.15 0 0);
  --ink: oklch(0.97 0 0);
  --ink2: oklch(0.85 0 0);
  --muted: oklch(0.66 0 0);
  --rule: oklch(0.252 0 0);
  --rule2: oklch(0.32 0 0);
  --accent: #e8a445;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

::selection {
  background: var(--hl);
}

code {
  font-family: var(--mono);
  font-size: var(--text-sm);
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* ---------- shared pieces ---------- */

.column {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.column > .label,
.hero .label,
.manifesto .label {
  display: block;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

h2 {
  font-size: var(--text-2xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

h3 {
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}

p {
  font-size: var(--text-base);
  line-height: 1.65;
}

.prose p {
  font-size: var(--text-base);
  color: var(--ink2);
}
.prose p + p {
  margin-top: 1em;
}
.prose em {
  font-style: normal;
  color: var(--ink);
  box-shadow: inset 0 -0.45em 0 var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--rule2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--large {
  padding: 0.9rem 1.4rem;
  font-size: var(--text-xs);
}
.btn--solid {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* An Umbra comment: styled like a blockquote in the room. */
.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel);
  max-width: 34rem;
}
.note + .note {
  margin-top: 0.75rem;
}
.note .label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
}
.note p {
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 3.5rem;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-head-inner {
  max-width: var(--wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-path {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--muted);
  text-decoration: none;
}
.nav-path .brand {
  color: var(--ink);
}
.nav-sep {
  opacity: 0.45;
}
.site-head .actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-toggle {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink2);
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.icon-sun {
  display: none;
}
:root[data-theme='dark'] .icon-sun {
  display: block;
}
:root[data-theme='dark'] .icon-moon {
  display: none;
}

/* ---------- hero ---------- */

.hero {
  padding-top: max(7.5rem, calc(50dvh - 12rem));
  padding-bottom: clamp(6rem, 12vh, 9rem);
}
.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}
.hero h1 span {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.lede {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--ink2);
  max-width: 36rem;
}
.hero-cta .label {
  margin: 0;
}
.hero-cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

/* A static picture of the room, after room v3 (contextual.cc's frame):
   grey ground, a thin icon rail, document cards with a LINKED group, the
   open draft as a white pane with its title running down the left edge.
   Sans for headings and chrome, Source Serif 4 for the writing. */
.room {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 6rem;
}
.room-frame {
  display: grid;
  grid-template-columns: 2.75rem 13.5rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.6rem;
  border: 1px solid var(--rule2);
  border-radius: 0.9rem;
  background: var(--panel);
  box-shadow: 0 24px 60px -30px color-mix(in oklch, var(--ink) 35%, transparent);
}
.room-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding-top: 0.6rem;
  color: var(--muted);
}
.room-rail svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.room-rail .on {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  background: var(--rule);
  color: var(--ink);
}
.rail-sep {
  width: 1rem;
  border-top: 1px solid var(--rule2);
}
.room-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.room-search {
  padding: 0.4rem 0.65rem;
  border-radius: 0.45rem;
  background: var(--rule);
  font-size: 0.68rem;
  color: var(--muted);
}
.room-card {
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.65rem 0.4rem;
  border: 1px solid var(--rule2);
  border-radius: 0.45rem;
  background: var(--paper);
}
.room-card.on {
  border-color: color-mix(in oklch, var(--ink) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--ink) 12%, transparent);
}
.card-spine,
.pane-spine {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.card-body b {
  display: block;
  font-size: 0.72rem;
  font-weight: 560;
  color: var(--ink);
  line-height: 1.3;
}
.card-body p {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.room-linked {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.room-linked::before,
.room-linked::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--rule2);
}
.room-pane {
  position: relative;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--rule2);
  border-radius: 0.6rem;
  background: var(--paper);
}
.pane-spine {
  padding: 1.25rem 0 0 0.45rem;
  border-right: 1px solid var(--rule);
  font-size: 0.55rem;
}
.room-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1.75rem;
  padding: 2.25rem 2rem 4.25rem 2.5rem;
}
/* The room's editor writes in Source Serif 4; headings are sans, as in v3. */
.room-text {
  font-family: var(--serif);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink);
}
.room-text h4 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.room-text p + p {
  margin-top: 0.9em;
}
.room-text .muted {
  color: var(--muted);
}
.room-text mark {
  background: var(--hl);
  color: inherit;
  padding: 0.05em 0;
}
.room-page .note {
  margin-top: 4.6rem;
  align-self: start;
}
.room-page .note {
  padding: 0.8rem 1rem;
}
.room-page .note p {
  font-size: 0.78rem;
  line-height: 1.55;
}
.room-pill {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.3rem 1rem 0.3rem 0.3rem;
  border: 1px solid var(--rule2);
  border-radius: 999px;
  background: var(--paper);
  font-size: var(--text-xs);
  color: var(--ink2);
  white-space: nowrap;
  box-shadow: 0 6px 18px -10px color-mix(in oklch, var(--ink) 40%, transparent);
}
.room-pill .dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--ink);
}

/* ---------- sections ---------- */

.section {
  padding: 6rem 0;
  border-top: 1px solid var(--rule);
}
.section--panel {
  background: var(--panel);
}

.contrast {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule2);
  border-radius: var(--radius);
  overflow: hidden;
}
.contrast > div {
  padding: 1.4rem 1.5rem;
  background: var(--paper);
}
.contrast > div + div {
  border-left: 1px solid var(--rule2);
  box-shadow: inset 0 2px 0 var(--accent);
}
.contrast .label {
  display: block;
  margin-bottom: 0.5rem;
}
.contrast .us .label {
  color: var(--accent);
}
.contrast p {
  font-size: var(--text-base);
  line-height: 1.5;
}
.contrast .them p {
  color: var(--muted);
}

.feature {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  padding: 3.5rem 0;
  border-top: 1px solid var(--rule);
}
.feature:first-child {
  padding-top: 0;
  border-top: 0;
}
.feature:last-child {
  padding-bottom: 0;
}
.feature-number {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--accent);
  padding-top: 0.45rem;
}

/* SMS thread for "It reaches you by text" */
.sms {
  margin-top: 2rem;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sms .label {
  text-align: center;
  margin-bottom: 0.25rem;
}
.sms-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 1rem;
  font-size: var(--text-base);
  line-height: 1.45;
}
.sms-in {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--rule2);
  border-bottom-left-radius: var(--radius);
}
.sms-out {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: var(--radius);
}

.refusals {
  list-style: none;
  margin-top: 0.5rem;
  border-top: 1px solid var(--rule);
}
.refusals li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink2);
}
.refusals li::before {
  content: '×';
  font-family: var(--mono);
  color: var(--accent);
}
.refusals strong {
  font-weight: 560;
  color: var(--ink);
}

/* ---------- manifesto ---------- */

.manifesto .prose {
  max-width: 40rem;
}
.manifesto-lead {
  font-family: var(--serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.manifesto-callout {
  font-family: var(--serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink);
  padding: 0.75rem 0 0.75rem 1.25rem;
  border-left: 2px solid var(--accent);
  margin: 1.6rem 0;
}
.manifesto-conclusion {
  margin-top: 2rem;
  font-family: var(--serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink);
}
.manifesto-conclusion p + p {
  margin-top: 0.35rem;
  color: var(--accent);
}

/* ---------- closing ---------- */

.closing {
  text-align: center;
}
.closing .prose {
  max-width: 36rem;
  margin: 0 auto;
}
.closing-line {
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.closing .btn {
  margin-top: 1.25rem;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
}
.site-foot-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-foot .brand {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--ink);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .room-frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .room-rail,
  .room-cards {
    display: none;
  }
  .room-pill {
    position: static;
    transform: none;
    justify-self: center;
    grid-column: 1 / -1;
    margin: 0 0 1.25rem;
  }
  .room-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 1.5rem 1.25rem 1.75rem;
  }
  .room-page .note {
    margin-top: 1.25rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  :root {
    --gutter: 1rem;
  }
  .hero {
    padding-top: max(4.5rem, calc(42dvh - 7rem));
    padding-bottom: 4rem;
  }
  .room {
    padding-bottom: 4rem;
  }
  .pane-spine {
    display: none;
  }
  .room-pane {
    grid-template-columns: minmax(0, 1fr);
  }
  .section {
    padding: 4rem 0;
  }
  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding: 2.5rem 0;
  }
  .feature-number {
    padding-top: 0;
  }
  .contrast {
    grid-template-columns: minmax(0, 1fr);
  }
  .contrast > div + div {
    border-left: 0;
    border-top: 1px solid var(--rule2);
  }
  .site-head .request {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
