/* ============================================================
   RUN THE ROOMS — MARKETING SITE
   Same design system as the Run the Rooms app (runtherooms.xyz):
   Quiet. Intentional. Expensive. Warm. Executive.
   Ivory ground, charcoal type, deep olive accent, brass used
   almost never. Editorial serif headings, modern sans UI.
   ============================================================ */

:root {
  /* Ground + surface */
  --ivory: #faf8f4;
  --ivory-deep: #f4f1ea;
  --surface: #fffdfa;
  --surface-sunk: #f7f4ee;

  /* Type */
  --ink: #211f1c;
  --ink-soft: #4a4640;
  --ink-muted: #7a746a;
  --ink-faint: #a49d91;

  /* Line */
  --line: #e8e2d7;
  --line-strong: #d8d0c2;

  /* Accent — deep olive / sage */
  --olive: #4f5f4a;
  --olive-deep: #3b4837;
  --olive-soft: #8a9a85;
  --olive-wash: #eef0ea;

  /* Brass — sparingly */
  --brass: #a8834b;
  --brass-wash: #f6efe3;

  /* Signal */
  --clay: #9a6a55;
  --clay-wash: #f6ede8;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border-color: var(--line); }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.006em;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--olive-deep); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--olive); }

em { font-family: var(--serif); font-style: italic; font-size: 1.04em; }

::selection { background: var(--olive-wash); color: var(--olive-deep); }

:focus-visible {
  outline: 2px solid var(--olive-soft);
  outline-offset: 2px;
  border-radius: 3px;
}

input, textarea, select, button { font: inherit; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 3px solid var(--ivory);
}

/* ---------- Utilities ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.eyebrow.olive { color: var(--olive); }

.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}

.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }
.small { font-size: 0.92rem; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--olive); color: var(--ivory); border-color: var(--olive); }
.btn-primary:hover { background: var(--olive-deep); border-color: var(--olive-deep); color: var(--ivory); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--surface); color: var(--ink); }

.btn-text { padding: 0; background: none; border: 0; color: var(--olive-deep); font-weight: 500; gap: 6px; }
.btn-text:hover { color: var(--olive); }
.btn-text .arrow { transition: transform 0.25s var(--ease); }
.btn-text:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ivory) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand svg { height: 30px; width: auto; display: block; }
.brand-word {
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); background: var(--surface-sunk); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--olive);
  margin-top: 2px;
}
.nav .nav-cta { margin-left: 8px; padding: 9px 16px; background: var(--olive); color: var(--ivory); border-radius: 999px; }
.nav .nav-cta:hover { background: var(--olive-deep); color: var(--ivory); }
.nav .nav-signin { color: var(--ink-muted); font-size: 13px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 4px 0; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }

@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 15px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .site-header .wrap { position: relative; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
section.tight { padding: clamp(40px, 5vw, 64px) 0; }
section.sunk { background: var(--ivory-deep); }
section.surface-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.olive-band { background: var(--olive-deep); color: var(--ivory); }
section.olive-band h1, section.olive-band h2, section.olive-band h3 { color: var(--ivory); }
section.olive-band .eyebrow { color: var(--olive-soft); }
section.olive-band .soft, section.olive-band .muted { color: color-mix(in srgb, var(--ivory) 78%, transparent); }
section.olive-band a { color: var(--ivory); }
section.olive-band .btn-ghost { color: var(--ivory); border-color: color-mix(in srgb, var(--ivory) 40%, transparent); }
section.olive-band .btn-ghost:hover { background: color-mix(in srgb, var(--ivory) 10%, transparent); border-color: var(--ivory); }
section.olive-band .btn-primary { background: var(--ivory); color: var(--olive-deep); border-color: var(--ivory); }
section.olive-band .btn-primary:hover { background: var(--ivory-deep); }

.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 7vw, 96px); }
.hero h1 { max-width: 15ch; }
.hero .lede { margin: 22px 0 32px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero-aside { border-left: 1px solid var(--line-strong); padding-left: 28px; }
.hero-aside .item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero-aside .item:last-child { border-bottom: 0; }
.hero-aside .item strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; letter-spacing: -0.015em; }
.hero-aside .item span { color: var(--ink-muted); font-size: 0.95rem; }

.page-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 5vw, 72px); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lede { margin-top: 22px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-strong); padding-top: 8px; }
}

/* ---------- Grids + cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s var(--ease), transform 0.3s var(--ease);
}
a.card { color: inherit; }
a.card:hover { border-color: var(--olive-soft); transform: translateY(-2px); }
.card h3 { margin-bottom: 2px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }
.card .num {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--olive-soft);
}
.card .q { font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 1.12rem; line-height: 1.4; }
.card .foot { margin-top: auto; padding-top: 12px; }
.card.sunk { background: var(--surface-sunk); }
.card.olive { background: var(--olive-wash); border-color: color-mix(in srgb, var(--olive-soft) 50%, transparent); }

.single { max-width: 720px; }

/* ---------- Two-column prose ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split .sticky { position: sticky; top: 96px; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; } .split .sticky { position: static; } }

.prose { color: var(--ink-soft); font-size: 1.04rem; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--olive-soft); }

/* ---------- Ladder (brand language) ---------- */
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ladder .step { padding: 22px 20px 24px; border-right: 1px solid var(--line); }
.ladder .step:last-child { border-right: 0; background: var(--olive-wash); }
.ladder .step .num { font-family: var(--serif); color: var(--olive-soft); font-size: 0.9rem; letter-spacing: 0.08em; margin-bottom: 8px; }
.ladder .step strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.ladder .step span { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.45; display: block; }
@media (max-width: 960px) { .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ladder .step:nth-child(3) { border-right: 0; } .ladder .step:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .ladder { grid-template-columns: 1fr; } .ladder .step { border-right: 0 !important; border-bottom: 1px solid var(--line); } .ladder .step:last-child { border-bottom: 0; } }

/* ---------- Timeline (90 days) ---------- */
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.phase { position: relative; padding: 26px 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.phase .days { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive); font-weight: 500; margin-bottom: 10px; display: block; }
.phase h3 { margin-bottom: 8px; }
.phase p { color: var(--ink-soft); font-size: 0.97rem; }
.phase ul { padding-left: 1.1em; margin: 10px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.phase li { margin-bottom: 0.3em; }
.phase li::marker { color: var(--olive-soft); }
@media (max-width: 860px) { .phases { grid-template-columns: 1fr; } }

/* ---------- Pull quote ---------- */
.pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 28ch;
  margin: 0;
}
.pull-cite { display: block; margin-top: 20px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.pull-mark { width: 40px; height: 1px; background: var(--brass); margin-bottom: 26px; }

/* ---------- Definition list / table ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.table th, .table td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.97rem; }
.table th { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; background: var(--surface-sunk); }
.table tr:last-child td { border-bottom: 0; }
.table td strong { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.01em; }
.table td.soft { color: var(--ink-soft); }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain li strong { color: var(--ink); font-weight: 500; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 1px; background: var(--olive); }

/* ---------- Investment note ---------- */
.invest { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: baseline; padding: 22px 26px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--r-lg); }
.invest .label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
.invest .amount { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.015em; color: var(--ink); }
.invest .note { flex-basis: 100%; color: var(--ink-muted); font-size: 0.92rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band .inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.cta-band h2 { max-width: 20ch; }
.cta-band .btn-row { justify-content: flex-start; }
@media (max-width: 860px) { .cta-band .inner { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--olive-soft); box-shadow: 0 0 0 3px var(--olive-wash); }
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.form-note { font-size: 0.9rem; color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory-deep); border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 32px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-soft); font-size: 0.95rem; }
.site-footer a:hover { color: var(--ink); }
.site-footer .tag { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); max-width: 26ch; margin-top: 14px; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-muted); }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Metric cards nested inside a split column: three-up only when there is room */
.grid-metrics { grid-template-columns: 1fr; }
@media (min-width: 1180px) { .grid-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Portrait ---------- */
.portrait {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-sunk);
  margin-bottom: 26px;
}
.portrait.small { max-width: 240px; }
