/* ==========================================================================
   openroom — open-room.homes
   Monochrome Swiss-editorial minimalism + architectural craft accents.
   ========================================================================== */

@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/host-grotesk-latin.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format("woff2");
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-subtle: #f4f4f5;
  --ink: #09090b;
  --muted: #63636a;
  --muted-2: #8a8a93;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --header-bg: rgba(250, 250, 250, 0.84);

  /* Architectural warm terracotta + live sage */
  --accent: #c25934;
  --accent-soft: rgba(194, 89, 52, 0.1);
  --ok: #1f8a5b;
  --ok-soft: rgba(31, 138, 91, 0.12);
  --code-key: #1d4ed8;
  --code-str: #1f7a53;
  --code-com: #71717a;

  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.04);
  --shadow-card: 0 1px 2px rgba(9, 9, 11, 0.04), 0 8px 24px -16px rgba(9, 9, 11, 0.12);
  --shadow-stage: 0 2px 6px rgba(9, 9, 11, 0.04), 0 28px 64px -28px rgba(9, 9, 11, 0.22);

  --font-sans: "Geist", "Host Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max-w: 1120px;
}

/* Dark theme (explicit or system auto) */
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --surface: #121215;
  --surface-subtle: #18181c;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --header-bg: rgba(10, 10, 11, 0.82);

  --accent: #e07850;
  --accent-soft: rgba(224, 120, 80, 0.14);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.14);
  --code-key: #7dd3fc;
  --code-str: #6ee7b7;
  --code-com: #71717a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  --shadow-stage: 0 2px 10px rgba(0, 0, 0, 0.5), 0 32px 72px -24px rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0a0a0b;
    --surface: #121215;
    --surface-subtle: #18181c;
    --ink: #f4f4f5;
    --muted: #a1a1aa;
    --muted-2: #71717a;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --header-bg: rgba(10, 10, 11, 0.82);

    --accent: #e07850;
    --accent-soft: rgba(224, 120, 80, 0.14);
    --ok: #34d399;
    --ok-soft: rgba(52, 211, 153, 0.14);
    --code-key: #7dd3fc;
    --code-str: #6ee7b7;
    --code-com: #71717a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
    --shadow-stage: 0 2px 10px rgba(0, 0, 0, 0.5), 0 32px 72px -24px rgba(0, 0, 0, 0.85);
  }
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.6 var(--font-sans);
  overflow-x: clip;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.025em;
}
.brand-mark { flex: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-nav a {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.16s ease;
}
.header-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 3-way segmented theme switch (Auto / Light / Dark) */
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--r-pill);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.theme-switch button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.icon-link {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: background-color 0.16s ease, color 0.16s ease;
}
.icon-link:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  place-items: center;
  cursor: pointer;
}
.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav-links {
  display: grid;
  padding-block: 14px 20px;
  gap: 2px;
}
.mobile-nav-links a {
  padding: 11px 4px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-links a:last-child { border-bottom: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--surface-subtle);
  border-color: var(--muted-2);
}

.btn-cli {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 14px 0 16px;
}
.btn-cli:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}
.cli-prompt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}
.btn-cli code { font-size: 13px; }
.copy-glyph {
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  color: var(--muted);
}
.copy-glyph .ic-check { display: none; color: var(--ok); }
.btn-cli.is-copied .ic-copy { display: none; }
.btn-cli.is-copied .ic-check { display: block; }

.btn-glass {
  height: 40px;
  padding: 0 16px;
  background: rgba(9, 9, 11, 0.84);
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}
.btn-glass:hover {
  background: rgba(9, 9, 11, 0.96);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 6.5vw, 5.25rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  overflow: hidden;
}

/* Subtle architectural drafting grid fading out softly */
.hero-grid-bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 540px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse 72% 68% at 50% 24%, #000 10%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 24%, #000 10%, transparent 74%);
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.announcement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.announcement-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.pill-arrow { transition: transform 0.18s var(--ease-out); }
.announcement-pill:hover .pill-arrow { transform: translateX(2px); }

.pulse-dot, .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
  display: inline-block;
  flex: none;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--ok);
  opacity: 0.35;
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.45; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.hero-title {
  margin: 0;
  font-size: clamp(2.45rem, 5.4vw, 4.15rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.042em;
  max-width: 15ch;
}

.hero-subtitle {
  margin: 20px 0 0;
  max-width: 56ch;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.58;
  color: var(--muted);
}

.hero-cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-meta {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted-2);
}
.inline-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color 0.16s ease;
}
.inline-link:hover { text-decoration-color: var(--ink); }

/* Hero App Window */
.hero-stage-wrap {
  width: 100%;
  margin-top: clamp(2.5rem, 4.5vw, 3.75rem);
  text-align: left;
}
.app-window {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-stage);
  overflow: hidden;
}
.app-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12.5px;
}
.chrome-left, .chrome-center, .chrome-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.window-dots { display: inline-flex; gap: 6px; flex: none; }
.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.chrome-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chrome-path span { opacity: 0.45; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.chrome-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chrome-btn:hover { background: var(--bg); }
.chrome-btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.chrome-btn-ghost:hover { color: var(--ink); background: var(--surface); }
.chrome-btn-accent {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chrome-btn-accent:hover { opacity: 0.88; background: var(--ink); }

.viewer-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f5f5f4;
  overflow: hidden;
}
.viewer-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--ease-out);
}
.viewer-viewport:hover .viewer-poster { transform: scale(1.008); }
.viewer-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}
.viewer-viewport:not(.is-live) iframe,
.viewer-viewport:not(.is-live) .viewer-shield {
  display: none;
}
.viewer-viewport.is-live .viewer-poster,
.viewer-viewport.is-live .agent-feed,
.viewer-viewport.is-live .viewer-launch-overlay {
  opacity: 0;
  pointer-events: none;
}

.viewer-launch-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  transition: opacity 0.25s ease;
}

.viewer-shield {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: end center;
  padding-bottom: 24px;
}
.viewer-shield span {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: rgba(9, 9, 11, 0.85);
  color: #fafafa;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.viewer-shield:hover span,
.viewer-shield:focus-visible span { opacity: 1; }
.viewer-viewport.is-active .viewer-shield { display: none; }

/* Live animated agent activity card inside hero frame */
.agent-feed {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  width: min(336px, calc(100% - 36px));
  padding: 13px 15px 12px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.94);
  color: #09090b;
  border: 1px solid rgba(9, 9, 11, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -10px rgba(9, 9, 11, 0.24);
  transition: opacity 0.25s ease;
}
.agent-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.agent-feed-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.agent-feed-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(31, 138, 91, 0.12);
  color: #166534;
}
.agent-feed-lines {
  display: grid;
  gap: 6px;
}
.feed-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #3f3f46;
  animation: feed-in 0.35s var(--ease-out) both;
}
.feed-line:nth-child(2) { animation-delay: 80ms; }
.feed-line:nth-child(3) { animation-delay: 160ms; }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.feed-line strong { color: #09090b; font-weight: 600; }
.feed-line code {
  background: rgba(9, 9, 11, 0.06);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11.5px;
}
.feed-tag {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 1px;
}
.tag-user { background: rgba(194, 89, 52, 0.14); color: #9a3412; }
.tag-ok { background: rgba(31, 138, 91, 0.14); color: #166534; }

.agent-feed-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(9, 9, 11, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-dots { display: flex; gap: 6px; }
.feed-dots button {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(9, 9, 11, 0.16);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, width 0.2s ease;
}
.feed-dots button[aria-selected="true"] {
  width: 28px;
  background: #09090b;
}
.feed-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #71717a;
}

.app-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12.5px;
  color: var(--muted);
}
.app-footer-links a {
  color: var(--ink);
  font-weight: 500;
}
.app-footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Sections & Headings
   ========================================================================== */
.section {
  padding-block: clamp(4.25rem, 7.5vw, 6.75rem);
}
.section-head {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  max-width: 640px;
}
.section-head.centered {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-title {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.09;
  letter-spacing: -0.036em;
}
.section-lead {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

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

/* ==========================================================================
   How it works (3 steps)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.step-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.step-card p {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--muted);
  flex: 1;
}
.mini-surface {
  padding: 12px 13px;
  border-radius: var(--r-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: grid;
  gap: 7px;
}
.mini-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.mini-cmd { color: var(--ink); font-weight: 500; }
.mini-muted { color: var(--muted-2); }
.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ok);
  font-size: 11.5px;
}
.mini-bubble {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.mini-bubble strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Interactive Capabilities Explorer + Bento
   ========================================================================== */
.explorer-card {
  overflow: hidden;
  margin-bottom: 16px;
}
.explorer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.explorer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tab-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.explorer-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.explorer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  min-height: 360px;
}
.explorer-panel[hidden] { display: none; }

.explorer-code {
  padding: 22px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.explorer-visual {
  min-width: 0;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.code-hint { color: var(--muted-2); }
.code-block {
  margin: 0;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font: 400 12.5px/1.65 var(--font-mono);
  overflow-x: auto;
  color: var(--ink);
}
.tk-k { color: var(--code-key); }
.tk-s { color: var(--code-str); }
.tk-c { color: var(--code-com); }
.tk-p { color: var(--accent); font-weight: 600; }
.tk-ok { color: var(--ok); font-weight: 500; }
.tk-warn { color: var(--accent); font-weight: 500; }

.explorer-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.explorer-visual {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
}
.visual-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Palette switcher pills */
.swatch-pill, .mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.swatch-pill:hover, .mini-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.swatch-pill[aria-pressed="true"], .mini-pill[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.sw {
  width: 22px;
  height: 11px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.sw-warm { background: linear-gradient(90deg, #EFE7DA 0 25%, #B08A5E 25% 50%, #A4502F 50% 75%, #2F5D45 75%); }
.sw-sea { background: linear-gradient(90deg, #DDE7E1 0 25%, #C2A47E 25% 50%, #5F8F86 50% 75%, #D99A2B 75%); }
.sw-ochre { background: linear-gradient(90deg, #E9D9B4 0 25%, #8A6240 25% 50%, #5B6236 50% 75%, #7A2A2A 75%); }

[data-palette-canvas="warm-chalk"] { --r-walls: #EFE7DA; --r-floor: #B08A5E; --r-joinery: #5C4030; --r-main: #A4502F; --r-accent: #2F5D45; --r-counter: #24408E; }
[data-palette-canvas="sea-glass"] { --r-walls: #DDE7E1; --r-floor: #C2A47E; --r-joinery: #6B7780; --r-main: #5F8F86; --r-accent: #D99A2B; --r-counter: #2B3A4A; }
[data-palette-canvas="ochre-olive"] { --r-walls: #E9D9B4; --r-floor: #8A6240; --r-joinery: #3E2C22; --r-main: #5B6236; --r-accent: #7A2A2A; --r-counter: #1F3A6B; }

.floorplan-svg {
  width: 100%;
  max-height: 250px;
  margin-inline: auto;
}
.floorplan-svg * {
  transition: fill 0.28s ease, stroke 0.28s ease, x 0.28s var(--ease-out), width 0.28s var(--ease-out);
}

/* Sunlight controls */
.sun-controls { justify-content: space-between; }
.season-group { display: flex; flex-wrap: wrap; gap: 6px; }
.sun-slider-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}
.sun-slider-label input[type="range"] {
  width: 120px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Files interactive tree */
.file-tree {
  display: grid;
  gap: 6px;
}
.tree-item {
  width: 100%;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  min-width: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tree-item:hover { background: var(--surface-subtle); }
.tree-item[aria-selected="true"] {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}
.tree-item code { font-size: 13px; font-weight: 500; color: var(--ink); }
.tree-item span { font-size: 12.5px; color: var(--muted-2); }
.file-preview-visual { justify-content: flex-start; }
.file-preview-code { flex: 1; }

/* Two-column Bento Row */
.bento-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.bento-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.bento-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.bento-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.agent-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.mcp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
}
.mini-copy-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.mini-copy-btn:hover { background: var(--bg); }

.selection-mock {
  padding: 15px 16px;
  border-radius: var(--r-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: grid;
  gap: 9px;
}
.selection-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sel-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.selection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.selection-prompt {
  padding-top: 9px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
}
.prompt-caret { color: var(--accent); font-weight: 700; }

/* ==========================================================================
   The Plan & Contractor Pack
   ========================================================================== */
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.stats-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-value {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.plan-links { margin-top: 24px; }

.plan-sheet {
  margin: 0;
  padding: 20px 22px 24px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.sheet-scale { color: var(--muted-2); }
.plan-svg { width: 100%; height: auto; }
.plan-labels .dim { font: 500 12.5px var(--font-mono); }
.plan-labels .room-name { font: 500 14.5px var(--font-sans); }
.plan-labels .room-sub { font: 400 12px var(--font-mono); fill: var(--muted); }

/* ==========================================================================
   Local-First Dark Band (inspired by openroom.dev)
   ========================================================================== */
.dark-band {
  background: #09090b;
  color: #f4f4f5;
  padding-block: clamp(4.5rem, 8vw, 6.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.eyebrow-dark { color: #e07850; }
.dark-band .section-lead { color: #a1a1aa; }

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #111114;
}
.sec-cell {
  padding: 28px 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sec-cell:nth-child(2n) { border-right: 0; }
.sec-cell:nth-child(n + 3) { border-bottom: 0; }
.sec-cell h3 {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: #e07850;
}
.sec-cell p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #a1a1aa;
}
.sec-cell code {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ==========================================================================
   Setup Prompt
   ========================================================================== */
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4.5vw, 3.5rem);
  align-items: start;
}
.setup-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.setup-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink);
}
.setup-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.manual-install {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.manual-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}
.manual-code {
  margin: 0;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}
.copy-status {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ok);
  font-weight: 500;
}

.prompt-window { overflow: hidden; }
.prompt-pre {
  margin: 0;
  padding: 18px 20px;
  font: 400 12.5px/1.62 var(--font-mono);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-wrap { max-width: 760px; }
.faq-list {
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
}
.faq-trigger:hover { color: var(--accent); }
.faq-plus {
  width: 16px;
  height: 16px;
  position: relative;
  flex: none;
}
.faq-plus::before, .faq-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.22s var(--ease-out);
}
.faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-trigger[aria-expanded="true"] .faq-plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq-panel {
  padding-bottom: 20px;
}
.faq-panel p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 66ch;
}

/* ==========================================================================
   Final CTA & Footer
   ========================================================================== */
.cta-section { padding-top: 0; }
.cta-card {
  padding: clamp(2.5rem, 5vw, 4rem) 24px;
  text-align: center;
  background: var(--surface);
}
.cta-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.cta-lead {
  margin: 12px auto 0;
  max-width: 44ch;
  font-size: 15.5px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 36px;
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 36px;
}
.footer-tagline {
  margin: 10px 0 0;
  color: var(--muted);
}
.footer-col h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.footer-col a {
  color: var(--muted);
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.footer-bottom a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom a:hover { color: var(--ink); }

/* ==========================================================================
   Animations (Hero entrance & scroll-reveal blur settle)
   ========================================================================== */
.js-ready .hero-anim {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(5px);
  animation: hero-enter 0.65s var(--ease-out) var(--d, 0ms) forwards;
}
@keyframes hero-enter {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(4px);
  transition: opacity 0.6s var(--ease-out) var(--d, 0ms),
              transform 0.6s var(--ease-out) var(--d, 0ms),
              filter 0.6s var(--ease-out) var(--d, 0ms);
}
.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .hero-anim,
  .js-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
  .pulse-dot::after { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .steps-grid { grid-template-columns: 1fr; }
  .explorer-panel { grid-template-columns: minmax(0, 1fr); }
  .explorer-code { border-right: 0; border-bottom: 1px solid var(--border); }
  .bento-two { grid-template-columns: 1fr; }
  .plan-layout { grid-template-columns: 1fr; }
  .setup-layout { grid-template-columns: 1fr; }
  .chrome-center { display: none; }
}

@media (max-width: 900px) {
  .header-nav,
  .header-actions .btn-primary,
  .header-actions .icon-link { display: none; }
  .menu-toggle { display: grid; }
}

@media (max-width: 768px) {
  .security-grid { grid-template-columns: 1fr; }
  .sec-cell { border-right: 0; }
  .sec-cell:nth-child(n + 3) { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .sec-cell:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .theme-switch button { padding: 4px 8px; font-size: 11.5px; }
  .explorer-code, .explorer-visual { padding: 16px; }
  .chrome-btn-ghost { display: none; }
  .viewer-viewport { aspect-ratio: 4 / 3; }
  .agent-feed { display: none; }
  .viewer-launch-overlay {
    left: 50%;
    right: auto;
    bottom: 14px;
    transform: translateX(-50%);
    width: max-content;
  }
  .hero-cta-row { width: 100%; }
  .hero-cta-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
