/* ============================================================
   THE STUDIOLO — stylesheet.css v4
   ============================================================ */

/* ------------------------------------------------------------
   FONTS
   ------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,600&family=Old+Standard+TT:ital@1&display=swap');

@font-face {
  font-family: 'Ruder Plakat';
  src: url('../fonts/RuderPlakatLLVarWeb.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   GOLDEN RATIO TYPE SCALE
   S  → 11px body / 15px lede / 18px display
   M  → 13px body / 18px lede / 21px display  (default)
   L  → 16px body / 22px lede / 29px display
   ------------------------------------------------------------ */

:root {
  --body-size:    13px;
  --lede-size:    18px;
  --display-size: 21px;
  --body-leading: 1.55;

  --col-left: 61.8%;

  /* Spacing — golden ratio rhythm (×0.8 of original = 20% tighter) */
  --sp-xs:   4px;
  --sp-sm:   7px;
  --sp-md:   10px;
  --sp-lg:   17px;
  --sp-xl:   27px;
  --sp-2xl:  44px;

  /* Font stacks */
  --font-mono: Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;

  /* Martian vermillion accent */
  --martian: #E8A838;

  /* Nav bar height */
  --nav-height: 180px;
}

body.type-small {
  --body-size:    11px;
  --lede-size:    15px;
  --display-size: 18px;
}

body.type-large {
  --body-size:    16px;
  --lede-size:    22px;
  --display-size: 29px;
}

/* ------------------------------------------------------------
   COLOR SCHEMES
   ------------------------------------------------------------ */

/* LIGHT (default) */
body.scheme-light {
  --bg:               #ffffff;
  --bg-right:         #fafafa;
  --fg:               #000000;
  --fg-muted:         rgba(0,0,0,0.55);
  --fg-faint:         rgba(0,0,0,0.40);
  --border:           rgba(0, 0, 0, 0.10);
  --block-bg:         #f0f0f0;
  --block-border:     rgba(0, 0, 0, 0.05);
  --btn-bg:           #000000;
  --btn-fg:           #ffffff;
  --btn-ghost-border: #000000;
  --btn-ghost-fg:     #000000;
}

/* DARK */
body.scheme-dark {
  --bg:               #0a0a0a;
  --bg-right:         #111111;
  --fg:               #ffffff;
  --fg-muted:         rgba(255,255,255,0.55);
  --fg-faint:         rgba(255,255,255,0.40);
  --border:           rgba(255, 255, 255, 0.10);
  --block-bg:         #1a1a1a;
  --block-border:     rgba(255, 255, 255, 0.05);
  --btn-bg:           #ffffff;
  --btn-fg:           #000000;
  --btn-ghost-border: #ffffff;
  --btn-ghost-fg:     #ffffff;
}

/* MARTIAN */
body.scheme-martian {
  --bg:               #E8A838;
  --bg-right:         #D99A2E;
  --fg:               #000000;
  --fg-muted:         rgba(0,0,0,0.60);
  --fg-faint:         rgba(0,0,0,0.35);
  --border:           rgba(0, 0, 0, 0.15);
  --block-bg:         rgba(0, 0, 0, 0.08);
  --block-border:     rgba(0, 0, 0, 0.10);
  --btn-bg:           #000000;
  --btn-fg:           #E8A838;
  --btn-ghost-border: #000000;
  --btn-ghost-fg:     #000000;
}

/* ------------------------------------------------------------
   ACCESSIBILITY
   ------------------------------------------------------------ */

/* Visually hidden but accessible to screen readers */
.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;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 12px 24px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus-visible — keyboard focus indicator */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 1px;
}

/* ------------------------------------------------------------
   RESET + BASE
   ------------------------------------------------------------ */

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

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

body {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  background-color: var(--bg);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Index page: body hidden, .page-scroll handles scrolling */
body[data-page="index"] {
  overflow: hidden;
}

/* Subpages: body scrolls normally */
body:not([data-page="index"]) {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Page scroll wrapper — lets lobby + layout scroll as one unit
   while preserving body: overflow:hidden (required for fixed nav) */
.page-scroll {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ------------------------------------------------------------
   TOP NAV BAR — fixed, full width
   ------------------------------------------------------------ */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-xl) var(--sp-2xl);
  background: var(--bg);
  transition: height 0.3s ease, background-color 0.25s ease;
}

.top-nav-left {
  display: flex;
  align-items: center;
}

.top-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.top-nav-right {
  display: flex;
  align-items: center;
}

/* Menu hamburger button */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.menu-toggle:hover {
  opacity: 1;
}

.menu-toggle img {
  width: 28px;
  height: auto;
}

/* Nav logo */
.nav-logo {
  display: block;
}

.nav-logo img {
  max-height: calc((var(--nav-height) - var(--sp-xl) * 2) * 0.8);
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

/* Compact logo — hidden by default, shown when nav is compact */
.nav-logo-compact {
  display: none;
}

.nav-logo-compact img {
  height: 11px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

/* Compact nav state — triggered on scroll */
.top-nav.compact {
  height: 60px;
  transition: height 0.3s ease, background-color 0.25s ease;
}

.top-nav.compact .nav-logo-full {
  display: none;
}

.top-nav.compact .nav-logo-compact {
  display: block;
}

/* Section divider below nav — clean full-width line */
.nav-divider {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 999;
  height: 1px;
  background: var(--border);
  pointer-events: none;
  transition: top 0.3s ease;
}

body.nav-compact .nav-divider {
  top: 60px;
}

body.nav-compact .layout {
  margin-top: 60px;
  height: calc(100dvh - 60px);
}

body.nav-compact .page-scroll .layout {
  margin-top: 0;
  top: 60px;
}

.nav-divider img {
  display: none;
}

/* ------------------------------------------------------------
   DROPDOWN MENU — full overlay
   ------------------------------------------------------------ */

.dropdown-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* Close button inside dropdown — pinned to same position as hamburger */
.dropdown-close {
  position: absolute;
  /* Match .top-nav padding to align with hamburger icon */
  top: 0;
  left: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding-left: var(--sp-2xl);
  background: none;
  border: none;
  font-size: 28px;
  color: var(--fg);
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  line-height: 1;
  z-index: 10;
}

.dropdown-close:hover {
  opacity: 1;
}

.dropdown-menu-list {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 100vh;
  overflow-y: auto;
  max-width: 720px;
  width: 100%;
  padding: 0 var(--sp-xl);
  box-sizing: border-box;
}

.dropdown-menu-item {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  cursor: pointer;
  position: relative;
}

.dropdown-menu-item:hover {
  opacity: 1;
}

.dropdown-menu-item a {
  color: var(--fg);
  display: block;
  padding: 2px var(--sp-lg);
  transition: color 0.15s ease;
}

.dropdown-menu-item:hover a {
  color: var(--martian);
}

body.scheme-martian .dropdown-menu-item:hover a {
  color: #ffffff;
}

/* ------------------------------------------------------------
   LAYOUT — TWO COLUMNS
   ------------------------------------------------------------ */

/* Default: subpages — offset below fixed nav with margin */
.layout {
  width: 100%;
  margin-top: var(--nav-height);
  transition: margin-top 0.3s ease;
}

/* Index page lobby — sticky inside .page-scroll */
.page-scroll .layout {
  margin-top: 0;
}

/* Freeze transitions during programmatic lobby navigation */
.layout.no-transition,
.top-nav.no-transition {
  transition: none !important;
}

/* ENGINE A — SINGLE COLUMN */
.engine-a {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  position: relative;
  z-index: 10;
  transition: background-color 0.25s ease;
}

.engine-a-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px var(--sp-xl) var(--sp-xl);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------
   WORDMARK — left-aligned (legacy, kept for sub-pages)
   ------------------------------------------------------------ */

.col-header {
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  margin-bottom: var(--sp-xl);
}

.col-logo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: var(--sp-lg);
}

.col-logo a {
  display: block;
  width: 100%;
}

.logo-wordmark {
  width: 250px;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.logo-wordmark:hover {
  opacity: 0.5;
}

/* ------------------------------------------------------------
   NAV — left-aligned, no borders (legacy for sub-pages)
   ------------------------------------------------------------ */

.col-nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: var(--sp-sm) var(--sp-lg);
  flex-wrap: wrap;
}

.nav-row {
  display: flex;
  gap: var(--sp-lg);
  width: 100%;
}

.nav-item {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.35;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.nav-item:hover {
  opacity: 0.7;
}

.nav-item.active {
  opacity: 1;
}

.nav-item.nav-external {
  opacity: 0.25;
}

.nav-item.nav-external:hover {
  opacity: 0.5;
}

/* ------------------------------------------------------------
   SITE SECTIONS — single-page scroll blocks
   ------------------------------------------------------------ */

.site-section {
  position: relative;
  padding: calc(var(--sp-xl) / 2) 0;
  text-align: center;
}

.site-section:first-child {
  padding-top: 0;
}

/* Section divider — clean line */
.section-divider-img {
  display: none;
}

.site-section::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: var(--sp-xl);
}

.site-section:first-child::before {
  display: none;
}

.site-section:first-child .section-title-img {
  margin-top: 0;
}

/* Remove divider margin when section has a title image (image controls spacing) */
.site-section:has(.section-title-img)::before {
  margin-bottom: 0;
}

/* Section title link — wraps header image for clickthrough */
.section-title-link {
  display: block;
}

/* Section title image — hand-drawn header art */
.section-title-img {
  display: block;
  max-width: 80%;
  height: auto;
  max-height: none;
  margin: var(--sp-xl) auto var(--sp-lg) auto;
  object-fit: contain;
}

/* Section lede — Cormorant Garamond Semibold Italic */
.section-lede {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  color: var(--fg);
  margin-top: 0;
  margin-bottom: var(--sp-lg);
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  transition: font-size 0.2s ease;
}

/* Section action row — button + arrow inline */
.section-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
}

/* Section button — matches .btn style, uses section name */
.section-btn {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  cursor: pointer;
  transition: opacity 0.15s ease;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-align: center;
}

.section-btn:hover {
  opacity: 0.65;
}

/* Arrow link to standalone page — inline next to button */
.section-page-link {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--fg);
  opacity: 0.25;
  transition: opacity 0.15s ease;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.section-page-link:hover {
  opacity: 0.7;
}

/* Expandable content area */
.section-expand {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, margin 0.4s ease;
  margin-top: 0;
}

.section-expand.open {
  max-height: 5000px;
  margin-top: var(--sp-lg);
}

.section-body {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  text-align: left;
  padding: var(--sp-lg) var(--sp-xl);
}

.section-body p {
  margin-bottom: var(--sp-md);
}

.section-body p:last-child {
  margin-bottom: 0;
}

/* External section — link out instead of expand */
.section-external-link {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--sp-sm) var(--sp-lg);
  background: transparent;
  color: var(--btn-ghost-fg);
  border: 1px solid var(--btn-ghost-border);
  cursor: pointer;
  transition: opacity 0.15s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
}

.section-external-link:hover {
  opacity: 0.65;
}

/* ------------------------------------------------------------
   CODE BLOCKS — markdown/code-block style boxes
   ------------------------------------------------------------ */

.code-block {
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  border-radius: 0;
  padding: var(--sp-lg);
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  margin: var(--sp-md) 0;
  overflow-x: auto;
}

.code-block-header {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.9;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.code-block-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--border);
}

.code-block-row:last-child {
  border-bottom: none;
}

.code-block-label {
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-block-value {
  text-align: right;
}

/* Secondary expand button within code blocks */
.code-block-expand-btn {
  font-family: var(--font-mono);
  font-size: calc(var(--body-size) - 1px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-xs) var(--sp-md);
  background: transparent;
  color: var(--fg);
  border: 1px dashed var(--border);
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  margin-top: var(--sp-sm);
  display: inline-block;
}

.code-block-expand-btn:hover {
  opacity: 0.8;
}

.code-block-detail {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}

.code-block-detail.open {
  max-height: 2000px;
  margin-top: var(--sp-md);
}

/* ------------------------------------------------------------
   HERO COPY
   ------------------------------------------------------------ */

.col-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* H1 — uppercase Menlo */
.display {
  font-family: var(--font-mono);
  font-size: var(--display-size);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: var(--sp-md);
  transition: font-size 0.2s ease;
}

/* Lede — Cormorant Garamond Semibold Italic */
.lede {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--lede-size);
  line-height: 1.5;
  color: var(--fg);
  margin-top: 0;
  margin-bottom: var(--sp-lg);
  transition: font-size 0.2s ease;
}

/* Body copy */
.body-copy {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  margin-bottom: var(--sp-md);
  transition: font-size 0.2s ease;
}

/* ------------------------------------------------------------
   PROCESS LIST
   ------------------------------------------------------------ */

.process-list {
  margin-bottom: var(--sp-lg);
  display: flex;
  flex-direction: column;
}

.process-item {
  display: flex;
  flex-direction: row;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}

.process-item:last-child {
  border-bottom: 1px solid var(--border);
}

/* Fixed-width num and label columns */
.process-item .process-num {
  flex: 0 0 34px;
}

.process-item .process-label {
  flex: 0 0 68px;
}

.process-item .process-desc {
  flex: 1;
}

.process-num {
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.28;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.process-label {
  font-size: var(--body-size);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.process-desc {
  font-size: var(--body-size);
  color: var(--fg);
  line-height: 1.5;
  opacity: 0.6;
}

/* ------------------------------------------------------------
   CTAs — left-aligned, equal gap
   ------------------------------------------------------------ */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  align-items: stretch;
  justify-content: center;
  position: relative;
  padding-top: var(--sp-md);
  margin-top: auto;
}

.btn {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  cursor: pointer;
  transition: opacity 0.15s ease;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.65;
}

.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-fg);
  border-color: var(--btn-ghost-border);
}

/* Contact button — dashed variant, extends .btn */
.contact-section {
  position: relative;
}

.btn-contact-full {
  background: transparent;
  color: var(--fg);
  border: 1px dashed var(--fg);
  opacity: 0.5;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-contact-full:hover {
  background: var(--fg);
  color: var(--bg);
  opacity: 1;
}

/* Contact popup — left-aligned above button */
.contact-pop {
  position: absolute;
  bottom: calc(100% + var(--sp-xs));
  left: 0;
  background: var(--fg);
  color: var(--bg);
  padding: var(--sp-md) var(--sp-xl);
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: 1.9;
  display: none;
  text-align: center;
  white-space: nowrap;
  z-index: 200;
}

.contact-pop.open {
  display: block;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.col-footer {
  padding-top: var(--sp-lg);
  text-align: center;
}

.footer-contact {
  display: flex;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  align-items: baseline;
  justify-content: center;
}

.footer-social {
  display: flex;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  justify-content: center;
}

.footer-social-link {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 0.15s ease;
}

.footer-social-link:hover {
  opacity: 1;
}

.footer-addr {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: 1.6;
  color: var(--fg);
  opacity: 0.25;
  margin-bottom: var(--sp-xs);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.18;
}

/* ------------------------------------------------------------
   LIGHT / DARK TOGGLE — inside top nav
   ------------------------------------------------------------ */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--sp-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.theme-toggle:hover {
  opacity: 0.5;
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Light mode: right half filled */
body.scheme-light .theme-toggle-icon::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--fg);
}

/* Dark mode: left half filled */
body.scheme-dark .theme-toggle-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--fg);
}

/* Martian mode: fully filled gray */
body.scheme-martian .theme-toggle-icon {
  border-color: #000000;
  background: #888888;
}

body.scheme-martian .theme-toggle-icon::after {
  display: none;
}

/* ------------------------------------------------------------
   UTILITY CLASSES (replacing inline styles)
   ------------------------------------------------------------ */

.btn-row {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.form-interests-group {
  margin-top: var(--sp-lg);
  margin-bottom: 0;
}

.form-interests-label {
  margin-bottom: var(--sp-sm);
  text-align: center;
}

.footer-tagline {
  opacity: 0.4;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--sp-xl) 0;
}

.footer-separator {
  opacity: 0.25;
}

.bio-former {
  opacity: 0.5;
  font-size: var(--body-size);
}

.contact-form-wrap--inline {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ------------------------------------------------------------
   ENGINE B — SCROLLABLE MEDIA STACK
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   EDITORIAL IMAGE BREAKS
   ------------------------------------------------------------ */

.editorial-break {
  width: 100%;
  padding: calc(var(--sp-2xl) + var(--sp-xl)) 0; /* ~71px — intentional large breathing room */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.editorial-break img {
  display: block;
  width: 60%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 17 / 22; /* 8.5×11 poster ratio — prevents CLS */
  object-fit: contain;
}

.editorial-break figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: var(--sp-md);
  text-align: center;
}

/* Fade-in on scroll */
.editorial-break {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.editorial-break.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  /* Disable all transitions and animations */
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .editorial-break {
    opacity: 1;
    transform: none;
  }

  /* Pause autoplay video */
  .lobby-bar-video {
    display: none;
  }
}

@media (max-width: 768px) {
  .editorial-break {
    padding: var(--sp-2xl) 0; /* 44px on mobile */
  }

  .editorial-break img {
    width: 80%;
  }
}

/* ------------------------------------------------------------
   PROCESS PAGE — EXPANDED LIST
   ------------------------------------------------------------ */

.process-list-expanded {
  gap: 0;
}

.process-item-full {
  display: block;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border);
}

.process-item-full:last-child {
  border-bottom: 1px solid var(--border);
}

.process-item-full .process-header {
  display: flex;
  gap: var(--sp-sm);
  align-items: baseline;
  margin-bottom: var(--sp-xs);
}

.process-item-full .process-num {
  color: var(--fg);
  opacity: 0.28;
}

.process-item-full .process-label {
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.process-body {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
}

/* ------------------------------------------------------------
   TIER PAGES — FOUNDATION / ARCHITECTURE / ESTATE
   ------------------------------------------------------------ */

.tier-price {
  font-family: var(--font-mono);
  font-size: var(--display-size);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--fg);
  opacity: 0.5;
  margin-bottom: var(--sp-md);
}

.tier-item {
  display: block;
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border);
}

.tier-item:last-child {
  border-bottom: 1px solid var(--border);
}

.tier-item-label {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xs);
}

.tier-item-desc {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
}

.details-list {
  margin-bottom: var(--sp-lg);
  display: flex;
  flex-direction: column;
}

.details-item {
  display: flex;
  flex-direction: row;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}

.details-item:last-child {
  border-bottom: 1px solid var(--border);
}

.details-item .details-label {
  flex: 0 0 90px;
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.details-item .details-desc {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: 1.5;
  color: var(--fg);
  opacity: 0.6;
}

/* Inline links in body copy */
.body-copy a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.body-copy a:hover {
  opacity: 1;
}

/* ------------------------------------------------------------
   LIBRARY — ENTRY PAGE
   ------------------------------------------------------------ */

.entry-breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  margin-bottom: var(--sp-2xl);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.entry-breadcrumb a {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.entry-breadcrumb a:hover {
  opacity: 0.6;
}

.entry-breadcrumb-sep {
  opacity: 0.4;
}

.entry-body {
  max-width: 680px;
}

.entry-section {
  margin-bottom: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid var(--border);
}

.entry-section:last-child {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  margin-bottom: var(--sp-md);
}

.entry-thesis {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--lede-size);
  line-height: 1.6;
  color: var(--fg);
  margin-bottom: var(--sp-lg);
}

.entry-image {
  margin-top: var(--sp-lg);
}

.entry-image img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.9;
}

.entry-blockquote {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--body-size);
  line-height: 1.75;
  color: var(--fg);
  opacity: 0.75;
  margin: var(--sp-md) 0 var(--sp-lg) var(--sp-lg);
  padding-left: var(--sp-md);
  border-left: 1px solid var(--border);
}

.entry-prose {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.75;
  margin-bottom: var(--sp-lg);
}

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

.entry-idea-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-idea-item {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border);
}

.entry-idea-item:last-child {
  border-bottom: 1px solid var(--border);
}

.idea-num {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.28;
  flex: 0 0 28px;
  letter-spacing: 0.04em;
  padding-top: 1px;
}

.idea-text {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.75;
  flex: 1;
}

.entry-question-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-question-item {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.75;
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border);
  padding-left: var(--sp-md);
  position: relative;
}

.entry-question-item:last-child {
  border-bottom: 1px solid var(--border);
}

.entry-question-item::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: 0.35;
}

.entry-connections {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: 2;
  color: var(--fg);
  opacity: 0.75;
}

.entry-collector-note {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--body-size);
  line-height: 1.7;
  color: var(--fg);
  opacity: 0.75;
}

.entry-footer-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.entry-footer-meta-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  margin-bottom: var(--sp-xs);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
}

.lib-meta-panel {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.lib-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--sp-md);
}

.lib-meta-row {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.lib-meta-row:first-child {
  border-top: 1px solid var(--border);
}

.lib-meta-key {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.35;
  flex: 0 0 80px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lib-meta-val {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.75;
  flex: 1;
}

.lib-back {
  display: inline-block;
  margin-top: var(--sp-xl);
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

.lib-back:hover {
  opacity: 1;
}

/* Mobile adjustments for library */
@media (max-width: 768px) {
  .entry-body {
    max-width: 100%;
  }
}

/* ------------------------------------------------------------
   TABLET LANDSCAPE
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
  /* Tighten nav for tablet */
  :root {
    --nav-height: 150px;
  }

  /* Reduce editorial break padding */
  .editorial-break {
    padding: var(--sp-2xl) 0;
  }

  .editorial-break img {
    width: 70%;
  }

  /* Lobby headline tighter */
  .lobby-lede {
    font-size: 20px;
    max-width: 90%;
  }

  /* Content area breathes less */
  .engine-a-inner {
    padding: var(--sp-lg) var(--sp-lg) var(--sp-lg);
  }

  /* Section lede tighter */
  .section-lede {
    max-width: 90%;
  }
}

/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 768px) {
  body, body[data-page="index"] { overflow: auto; }

  .layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .engine-a,
  .page-scroll .engine-a,
  body.nav-compact .engine-a {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    overflow: visible;
    overflow-y: visible;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
    background: var(--bg);
  }

  .engine-a-inner {
    padding: var(--sp-xl);
  }

  /* Top nav adjustments — logo fills same ~70% of nav as desktop */
  .top-nav {
    --nav-height: 130px;
    height: var(--nav-height);
    padding: var(--sp-lg) var(--sp-lg);
  }

  .nav-logo img {
    max-height: calc((var(--nav-height) - var(--sp-lg) * 2) * 0.8);
  }

  .nav-divider {
    top: 130px;
  }

  body.nav-compact .nav-divider {
    top: 60px;
  }

  /* margin-top: var(--nav-height) auto-resolves to 130px on mobile */
  body.nav-compact .layout {
    margin-top: 60px;
  }

  .page-scroll .layout {
    margin-top: 0;
    position: static;
  }

  .menu-toggle img {
    width: 22px;
  }

  .dropdown-close {
    height: 130px;
    padding-left: var(--sp-lg);
  }

  .col-nav { flex-wrap: wrap; gap: var(--sp-xs) var(--sp-sm); }
  .nav-row { gap: var(--sp-sm); }

  /* Section lede matches body copy width on mobile */
  .section-lede {
    max-width: 100%;
  }

  /* Section page links */
  .section-page-link {
    position: static;
    display: inline-block;
    margin-top: var(--sp-sm);
  }

  /* page-scroll: let body handle native scroll on mobile — removes sticky ghost */
  .page-scroll {
    height: auto;
    overflow: visible;
  }
}

/* ============================================================
   LOBBY SECTION
   ============================================================ */

#section-lobby {
  width: 100%;
  background: var(--bg);
  padding-top: var(--nav-height);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease;
}

.lobby-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-xl) var(--sp-xl);
}

.lobby-headline-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto var(--sp-xl);
  object-fit: contain;
}
/* Desktop shows horizontal version; mobile shows stacked version */
.lobby-headline-mobile { display: none; }
.lobby-headline-desktop { display: block; }

/* ── MENU ── */
.lobby-menu {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.lobby-bar-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  pointer-events: none;
}

/* ── ITEM ── */
.lobby-item {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.lobby-item:last-child {
  border-bottom: 1px solid var(--border);
}

/* ── TRIGGER BUTTON ── */
.lobby-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: var(--sp-md);
  position: relative;
  z-index: 1;
}

.lobby-label {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--btn-fg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--btn-bg);
  padding: var(--sp-xs) var(--sp-md);
  position: relative;
  z-index: 1;
}

.lobby-toggle {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--btn-fg);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  background: var(--btn-bg);
  padding: var(--sp-xs);
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 1;
}

.lobby-item.is-open .lobby-toggle {
  transform: none;
}

/* ── TRIGGER HEIGHT + PADDING ── */
.lobby-trigger {
  height: 52px;
  padding: 0 var(--sp-lg);
}

/* ── PANEL — shaded code-block style ── */
.lobby-panel {
  background: var(--block-bg);
  border: 1px solid var(--block-border);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-md);
  overflow: hidden;
  position: relative;
}

.lobby-panel .section-page-link {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
}

.lobby-panel[hidden] {
  display: none;
}

body.scheme-martian .lobby-panel {
  background: #d49a30;
}

/* ── LEDE ── */
.lobby-lede {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: 24px;
  color: var(--fg);
  line-height: 1.45;
  margin: 0 auto var(--sp-lg);
  max-width: 80%;
  text-align: center;
}

/* ── SUB LABEL ── */
.lobby-sub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--fg-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: var(--sp-lg) 0 var(--sp-sm) 0;
}

/* ── OFFERINGS LIST ── */
.lobby-offerings {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ── SINGLE OFFERING ── */
.lobby-offering {
  padding: var(--sp-xs) 0;
}

.lobby-offering-link {
  display: flex;
  align-items: flex-end;
  gap: 0;
  text-decoration: none;
  color: inherit;
}

/* Leader dots — fills space between name and price */
.lobby-offering-link::before {
  content: '';
  order: 2;
  flex: 1;
  height: 0;
  border-bottom: 1px dotted var(--fg-faint);
  margin: 0 var(--sp-xs) 3px;
}

.lobby-offering-link:hover .lobby-offering-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lobby-offering-name {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  flex: 0 0 auto;
  order: 1;
}

.lobby-offering-price {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  white-space: nowrap;
  text-align: right;
  flex: 0 0 auto;
  order: 3;
}

.lobby-offering-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin: var(--sp-xs) 0 0 0;
  line-height: 1.5;
}

.lobby-offering-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin: var(--sp-xs) 0 var(--sp-xs) 0;
  line-height: 1.5;
}

/* ── RULE ── */
.lobby-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-lg) 0;
}

/* ── SEE ALL ── */
.lobby-see-all {
  display: inline-block;
  margin-top: var(--sp-lg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--fg-faint);
}

.lobby-see-all:hover {
  color: var(--fg);
}

/* ── LOBBY BODY TEXT (Menlo, below lede) ── */
.lobby-body {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  font-style: normal;
  line-height: var(--body-leading);
  color: var(--fg);
  text-align: left;
  max-width: 100%;
  margin: 0 0 var(--sp-lg);
}

/* ── OFFERINGS CONTAINER ── */
.lobby-offerings-wrap {
  background: var(--offerings-bg, rgba(0,0,0,0.05));
  border-radius: 4px;
  padding: var(--sp-md);
  margin-top: var(--sp-lg);
}

[data-theme="dark"] .lobby-offerings-wrap,
.dark .lobby-offerings-wrap {
  --offerings-bg: rgba(255,255,255,0.05);
}

/* ── NESTED EXPANDABLES ── */
.lobby-expandable {
  padding: 0;
  margin-bottom: var(--sp-sm);
}

.lobby-expand-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  padding: var(--sp-xs) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: left;
}

.lobby-expand-trigger:hover {
  color: var(--fg);
}

.lobby-expand-toggle {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  margin-left: var(--sp-xs);
}

.lobby-expand-content {
  padding: 0 0 var(--sp-md) 0;
}

.lobby-expand-content[hidden] {
  display: none;
}

.lobby-expand-header {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: var(--sp-xs);
}

/* Leader dots — fills space between name and price */
.lobby-expand-header::before {
  content: '';
  order: 2;
  flex: 1;
  height: 0;
  border-bottom: 1px dotted var(--fg-faint);
  margin: 0 var(--sp-xs) 3px;
}

.lobby-expand-title {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  flex: 0 0 auto;
  order: 1;
}

.lobby-expand-price {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  white-space: nowrap;
  text-align: right;
  flex: 0 0 auto;
  order: 3;
}

.lobby-expand-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0 0 var(--sp-xs) 0;
}

.lobby-expand-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: var(--sp-md) 0 var(--sp-xs) 0;
}

.lobby-expand-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-sm) 0;
}

.lobby-expand-list li {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: 1.6;
  color: var(--fg);
  padding: var(--sp-xs) 0 var(--sp-xs) var(--sp-lg);
  position: relative;
}

.lobby-expand-list li::before {
  content: "\00B7";
  position: absolute;
  left: 0;
  color: var(--fg-muted);
}

.lobby-expand-content .btn {
  margin-top: var(--sp-md);
}

/* Book buttons between offerings — spacing only when followed by another item */
.lobby-offerings-wrap > .btn + .lobby-expandable,
.lobby-offerings-wrap > .btn + .lobby-sub-label,
.lobby-offerings-wrap > .btn-row + .lobby-expandable,
.lobby-offerings-wrap > .btn-row + .lobby-sub-label {
  margin-top: var(--sp-lg);
}

/* ── FOOTER ── */
.lobby-footer {
  padding: var(--sp-xl) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.lobby-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  padding: 9px 18px;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease;
}

.lobby-cta:hover {
  opacity: 0.80;
}

.lobby-scroll-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--fg-faint);
}

.lobby-scroll-btn:hover {
  color: var(--fg-muted);
}

/* ── LOBBY MOBILE ── */
@media (max-width: 600px) {
  .lobby-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .lobby-trigger {
    padding: 16px var(--sp-lg);
    min-height: 44px;
  }
}

/* Lobby mobile overrides — must live AFTER base lobby rules to win the cascade */
@media (max-width: 768px) {
  #section-lobby {
    padding-top: 130px; /* actual mobile nav height (root --nav-height is 180px) */
  }
  .lobby-inner {
    padding-top: var(--sp-lg);
    padding-left: var(--sp-xl);
    padding-right: var(--sp-xl);
  }
  /* Swap headline image: stacked version on mobile */
  .lobby-headline-desktop { display: none; }
  .lobby-headline-mobile  { display: block; }

  /* On mobile, re-center the crop — narrower width needs less downward shift */
  .lobby-bar-video {
    object-position: center center;
  }

  /* Lobby lede matches section lede width on mobile */
  .lobby-lede {
    max-width: 100%;
  }
}

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

.contact-form-wrap {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
  padding-left: var(--sp-xl);
  padding-right: var(--sp-xl);
  text-align: left;
}

.contact-form-header {
  text-align: center;
  margin-bottom: var(--sp-lg);
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.site-section .contact-form-wrap {
  text-align: left;
}

.site-section .contact-form-wrap .form-field-group {
  text-align: left;
}

/* Inputs, textarea, and select */
.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"],
.contact-form-wrap textarea,
.contact-form-wrap select,
.contact-page-form input[type="text"],
.contact-page-form input[type="email"],
.contact-page-form textarea,
.contact-page-form select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: var(--sp-sm) 0;
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
  line-height: var(--body-leading);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus,
.contact-form-wrap select:focus,
.contact-page-form input:focus,
.contact-page-form textarea:focus,
.contact-page-form select:focus {
  border-bottom-color: var(--fg);
}

/* Select dropdown arrow */
.contact-page-form select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: var(--sp-lg);
}

.contact-form-wrap textarea,
.contact-page-form textarea {
  resize: vertical;
  min-height: 80px;
}

/* Interest pills — multi-select */
.form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  justify-content: center;
}

.form-pill {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-xs) var(--sp-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.form-pill:hover {
  opacity: 0.8;
}

.form-pill.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  opacity: 1;
}

/* Status message — no min-height when empty */
.form-status {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  min-height: 0;
  margin-bottom: 0;
  opacity: 0.7;
  text-align: center;
}

.form-status:not(:empty) {
  min-height: 1.4em;
  margin-bottom: var(--sp-sm);
}

.form-status.error {
  opacity: 1;
  color: #c0392b;
}

.form-status.success {
  opacity: 1;
}

.form-submit-row {
  margin-top: var(--sp-lg);
  margin-bottom: 0;
  text-align: center;
}

.required-mark {
  color: var(--fg-muted);
  font-weight: 400;
}

/* Form field validation error state */
input.field-error,
textarea.field-error {
  border-bottom-color: #c0392b;
}

/* ------------------------------------------------------------
   SALES LETTER — /for/ landing pages
   ------------------------------------------------------------ */

/* ── SECTION HEADINGS ── */
.letter-section-head {
  text-align: center;
  margin: var(--sp-2xl) 0 var(--sp-xl);
}

.letter-section-head:first-child {
  margin-top: var(--sp-lg);
}

.letter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  margin-bottom: var(--sp-sm);
}

.letter-headline {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: 28px;
  line-height: 1.35;
  color: var(--fg);
}

/* ── NUMBERED ITEMS ── */
.letter-numbered {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.letter-num-item {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border);
}

.letter-num-item:last-child {
  border-bottom: 1px solid var(--border);
}

.letter-num {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  opacity: 0.28;
  flex: 0 0 28px;
  letter-spacing: 0.04em;
  padding-top: 1px;
}

.letter-num-text {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.75;
  flex: 1;
}

/* ── TITLED NUMBERED ITEMS (What I See) ── */
.letter-num-item-titled .letter-num-title {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xs);
}

.letter-num-item-titled .letter-num-desc {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
}

.letter-num-item-titled .letter-num-body {
  flex: 1;
}

/* ── CALLOUT (italic serif, centered) ── */
.letter-callout {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--lede-size);
  line-height: 1.55;
  color: var(--fg);
  text-align: center;
  max-width: 85%;
  margin: var(--sp-xl) auto;
}

/* ── DIVIDER ── */
.letter-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--sp-2xl) 0;
}

/* ── SERVICE BLOCKS (What Closing the Gap Looks Like) ── */
.letter-service-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.letter-service-item {
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border);
}

.letter-service-item:last-child {
  border-bottom: 1px solid var(--border);
}

.letter-service-name {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xs);
}

.letter-service-desc {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
}

/* ── STEP BLOCKS (How It Works) ── */
.letter-step {
  text-align: left;
  padding: var(--sp-lg) 0;
  border-top: 1px solid var(--border);
}

.letter-step:last-child {
  border-bottom: 1px solid var(--border);
}

.letter-step-head {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: var(--sp-xs);
}

.letter-step-head::before {
  content: '';
  order: 2;
  flex: 1;
  height: 0;
  border-bottom: 1px dotted var(--fg-faint);
  margin: 0 var(--sp-xs) 3px;
}

.letter-step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.35;
  flex: 0 0 auto;
  order: 1;
}

.letter-step-price {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  font-weight: 400;
  color: var(--fg);
  white-space: nowrap;
  flex: 0 0 auto;
  order: 3;
}

.letter-step-name {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xs);
}

.letter-step-desc {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
}

/* ── CLOSING STATEMENT ── */
.letter-close {
  font-family: var(--font-mono);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--fg);
  opacity: 0.6;
  text-align: center;
  max-width: 85%;
  margin: var(--sp-xl) auto var(--sp-lg);
}

/* ── MOCKUP IMAGES ── */
.letter-mockup {
  width: 100%;
  padding: var(--sp-xl) 0;
  display: flex;
  justify-content: center;
}

.letter-mockup img {
  display: block;
  width: 90%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .letter-headline {
    font-size: 22px;
  }

  .letter-callout {
    max-width: 100%;
    font-size: 16px;
  }

  .letter-close {
    max-width: 100%;
  }

  .letter-mockup img {
    width: 100%;
  }
}

/* ============================================================
   PRINT STYLESHEET
   ============================================================ */

@media print {
  /* Reset to black on white */
  body, .engine-a, .lobby-panel, .lobby-offerings-wrap {
    background: #fff !important;
    color: #000 !important;
  }

  /* Hide non-content elements */
  .top-nav,
  .nav-divider,
  .dropdown-menu,
  .skip-link,
  .theme-toggle,
  .menu-toggle,
  .lobby-bar-video,
  .lobby-footer,
  .lobby-toggle,
  .lobby-expand-trigger,
  .form-pills,
  .form-submit-row,
  .btn,
  .btn-ghost,
  .btn-row,
  .section-page-link,
  .editorial-break,
  .footer-divider {
    display: none !important;
  }

  /* Remove fixed positioning */
  .page-scroll, .layout, .engine-a {
    height: auto !important;
    overflow: visible !important;
    position: static !important;
  }

  /* Open all expandable content for print */
  .lobby-panel,
  .lobby-expand-content,
  .section-expand {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .lobby-panel[hidden],
  .lobby-expand-content[hidden] {
    display: block !important;
  }

  /* Typography for print */
  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .lobby-lede {
    font-size: 14pt;
  }

  .section-lede {
    font-size: 14pt;
  }

  /* Content width */
  .engine-a-inner, .lobby-inner {
    max-width: 100%;
    padding: 0;
  }

  /* Page breaks */
  .lobby-item, .site-section {
    page-break-inside: avoid;
  }

  /* Show URLs after links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
    word-break: break-all;
  }

  /* Don't show URL for nav/internal links */
  .lobby-offering-link::after,
  .dropdown-menu-item a::after,
  .footer-social-link::after {
    content: none;
  }
}
