:root {
  --bg: #0a0a0b;
  --bg-alt: #0d0c0e;
  --surface: #121114;
  --surface-2: #17141a;
  --border: rgba(176, 141, 60, 0.22);
  --border-strong: rgba(176, 141, 60, 0.42);
  --text: #ede8e0;
  --text-muted: #a59f96;
  --accent: #4a0e1c;
  --accent-2: #c9a24b;
  --gold: #b08d3c;
  --gold-hi: #c9a24b;
  --porch: #d9b45f;
  --plum: #2e1a47;
  --plum-2: #3b2160;
  --wine: #4a0e1c;
  --wine-2: #5a1424;
  --up: #6fb58c;
  --down: #d2707a;
  --radius: 10px;
  --max: 1160px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: var(--grain);
  background-repeat: repeat;
  background-size: 160px 160px;
  background-blend-mode: soft-light;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 1px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 6px;
}
code { font-family: "JetBrains Mono", monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; color: var(--text); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hub { padding: 48px 0 96px; }
.narrow { max-width: 760px; }

/* Lettering */
h1, h2, h3, h4, .brand-name, .robot-plate, .step-num, .footer-head {
  font-family: "Archivo", "Inter Tight", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--text);
}
.eyebrow {
  font-family: "Inter Tight", system-ui, sans-serif;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.section-lead { color: var(--text-muted); max-width: 720px; font-size: 1.03rem; }
.hand { font-family: "Archivo", sans-serif; color: var(--porch); font-size: 1rem; margin-top: 18px; font-weight: 500; }
.strong { color: var(--text); font-weight: 600; }

/* Keep long code samples inside their cards on narrow screens */
.site-grid, .site-card, .site-card .meta, .site-card .code { min-width: 0; }
.site-card { overflow: hidden; }
.site-card .code { max-width: 100%; }

/* Matte texture used by the old brick panel */
.brick {
  background-color: var(--bg-alt);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
}
.chain-strip {
  height: 1px;
  background: var(--border);
  border: 0;
  opacity: 1;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 32px;
  background: #0a0a0b;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-height: 44px; }
.brand-mark { width: 22px; height: 22px; display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 0.9rem; }
.nav-links a { color: var(--text-muted); display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-hi); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold-hi); color: var(--gold-hi); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background-color: var(--wine);
  border: 1px solid rgba(176, 141, 60, 0.45);
  color: var(--text);
}
.btn-primary:hover { background-color: var(--wine-2); border-color: var(--gold-hi); color: var(--text); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--gold-hi); color: var(--gold-hi); background: var(--surface-2); }
.full { width: 100%; }

/* HERO */
.hero {
  position: relative;
  padding: 84px 0 72px;
  overflow: hidden;
  background: linear-gradient(180deg, #0c0b0e 0%, #0a0a0b 100%);
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 6px; font-size: 0.7rem;
  background: var(--wine); color: var(--gold-hi); border: 1px solid var(--border-strong);
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
}
h1 { font-size: clamp(1.75rem, 3.7vw, 2.7rem); line-height: 1.22; margin: 20px 0 16px; }
h1 .quote {
  font-family: "Archivo", "Inter Tight", sans-serif;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  display: inline-block;
  letter-spacing: -0.015em;
}
.hero-lead { color: var(--text-muted); font-size: 1.06rem; max-width: 560px; }
.hero-lead strong { color: var(--gold-hi); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.robot-card {
  width: 100%; max-width: 360px; aspect-ratio: 3/4; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px;
}
.robot-plate {
  letter-spacing: 0.14em; color: var(--gold-hi);
  background: var(--wine);
  border: 1px solid var(--border-strong);
  padding: 7px 16px; border-radius: 6px;
  font-size: 0.78rem;
}
.robot-caption { color: var(--text-muted); font-size: 0.8rem; margin: 0; }
.robot-card.photo {
  position: relative; max-width: 400px; aspect-ratio: 2/3; padding: 0; margin: 0; overflow: hidden;
  justify-content: flex-end; background: #0a0a0b;
  border: 1px solid var(--border-strong);
}
.robot-card.photo picture, .robot-card.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
}
.robot-overlay {
  position: relative; z-index: 3; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 72px 20px 22px;
  background: linear-gradient(to top, rgba(10, 10, 11, 0.96) 35%, rgba(10, 10, 11, 0) 100%);
}
.robot-overlay .robot-plate { background: rgba(74, 14, 28, 0.9); color: var(--gold-hi); border: 1px solid var(--border-strong); }
.robot-overlay .robot-caption { color: #d8d3cb; }
.robot-card.photo::before { content: none; }

/* SECTIONS */
.section { padding: 78px 0; position: relative; }
.section.alt {
  background: #0d0c0e;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* PORCH BAND */
.porch-band {
  position: relative;
  padding: 64px 0 72px;
  background: #0b0a0d;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.porch-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center; }
.porch-art {
  position: relative; margin: 0;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #0a0a0b;
}
.porch-art img { width: 100%; height: auto; }
.porch-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.porch-plate {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-family: "JetBrains Mono", monospace; font-size: 0.68rem; letter-spacing: 0.16em;
  color: var(--gold-hi); background: var(--wine);
  border: 1px solid var(--border-strong);
  padding: 5px 10px; border-radius: 4px;
}

/* CARDS */
.cards { display: grid; gap: 16px; margin-top: 40px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 14px 0 8px; font-size: 1rem; color: var(--text); line-height: 1.35; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.icon {
  width: 34px; height: 34px; border-radius: 6px;
  background: var(--plum);
  border: 1px solid var(--border-strong);
  position: relative;
}
.icon::after { content: ""; position: absolute; inset: 10px; background: var(--gold); border-radius: 2px; }

/* DOOR POLICY */
.policy { padding-top: 52px; overflow: hidden; }
.policy-num {
  position: absolute; top: 14px; left: 20px;
  font-family: "JetBrains Mono", monospace; font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--text-muted);
}
.policy-stamp {
  position: absolute; top: 12px; right: 12px;
  font-family: "Archivo", sans-serif; font-size: 0.62rem; letter-spacing: 0.1em; font-weight: 600;
  color: var(--down);
  border: 1px solid rgba(210, 112, 122, 0.5); border-radius: 4px;
  padding: 3px 7px;
  background: var(--wine);
  text-transform: uppercase;
}
.policy .icon::after { background: var(--gold-hi); }

/* VERDICT LIST */
.verdict-list { display: grid; gap: 18px; margin: 40px 0 32px; }
.verdict-item {
  display: flex; gap: 16px; padding: 20px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
  border: 1px solid var(--border); border-left: 2px solid var(--border-strong);
  border-radius: var(--radius);
}
.verdict-item h3 { margin: 0 0 6px; font-size: 1rem; color: var(--text); }
.verdict-item p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.verdict-icon {
  width: 40px; height: 40px; border-radius: 6px; flex: 0 0 auto; position: relative;
  background: var(--plum); border: 1px solid var(--border-strong);
}
.verdict-icon::after { content: ""; position: absolute; inset: 13px; background: var(--gold); border-radius: 50%; }

/* STEPS */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; counter-reset: s; }
.steps li {
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative;
  border-left: 2px solid var(--border-strong);
}
.step-num { color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; }
.steps li h3 { margin: 8px 0 6px; font-size: 1rem; color: var(--text); }
.steps li p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* TWO COL */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.monitor {
  aspect-ratio: 16/10; border-radius: 12px; overflow: hidden;
  background: #0a0a0b; border: 1px solid var(--border-strong);
}
.monitor-screen { width: 100%; height: 100%; position: relative; background: #0d0c0e; padding: 12px; }
.monitor-bar { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; }
.monitor-bar span { width: 7px; height: 7px; border-radius: 50%; background: #3a342d; }
.monitor-bar span:first-child { background: var(--gold); }
.monitor-bar em {
  margin-left: 6px; font-family: "JetBrains Mono", monospace; font-style: normal;
  font-size: 0.58rem; letter-spacing: 0.14em; color: var(--text-muted);
}
.monitor-body { display: grid; gap: 6px; }
.mrow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border-radius: 6px;
  background: var(--surface); border: 1px solid rgba(176, 141, 60, 0.14);
}
.mrow b { font-size: 0.62rem; font-weight: 500; color: #ddd7cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow i { flex: 0 0 auto; font-style: normal; font-size: 0.52rem; font-weight: 600; padding: 2px 5px; border-radius: 4px; }
.mclear { color: var(--up); background: rgba(111, 181, 140, 0.12); border: 1px solid rgba(111, 181, 140, 0.35); }
.mflag { color: var(--gold-hi); background: var(--wine); border: 1px solid rgba(176, 141, 60, 0.5); }
.mterm {
  margin-top: 2px; padding: 8px 9px; border-radius: 6px;
  background: #0a0a0b; border: 1px solid rgba(176, 141, 60, 0.16);
  font-family: "JetBrains Mono", monospace; font-size: 0.6rem; line-height: 1.5; color: var(--gold-hi);
}
@media (max-width: 900px) {
  .monitor-body .mrow:nth-child(3) { display: none; }
}

/* FEATURE */
.feature {
  display: flex; gap: 14px; padding: 20px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.feature .ficon {
  width: 36px; height: 36px; border-radius: 6px; flex: 0 0 auto; position: relative;
  background: var(--plum); border: 1px solid var(--border-strong);
}
.feature .ficon::after { content: ""; position: absolute; inset: 12px; background: var(--gold); border-radius: 2px; }
.feature h3 { margin: 0 0 4px; font-size: 0.95rem; color: var(--text); }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.span2 { grid-column: span 2; }

.center { text-align: center; margin-top: 32px; }

/* CHECKS */
.checks { list-style: none; padding: 0; margin: 24px 0; color: var(--text-muted); }
.checks li { padding-left: 26px; position: relative; margin-bottom: 10px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 600; }

/* FAQ */
.faq { margin-top: 32px; }
details {
  border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  background-blend-mode: soft-light;
}
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold-hi); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--text-muted); margin: 12px 0 0; font-size: 0.95rem; }

/* FORM */
.invite-form { margin-top: 32px; display: grid; gap: 16px; }
.invite-form label { display: grid; gap: 6px; }
.invite-form span { font-size: 0.85rem; color: var(--text-muted); }
.invite-form input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 14px; border-radius: 8px; font-size: 0.95rem; min-height: 48px;
}
.invite-form input:focus { outline: none; border-color: var(--gold-hi); }
.form-note { color: var(--text-muted); font-size: 0.8rem; text-align: center; margin: 4px 0 0; }

/* CHAT */
.chat-layout { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 16px; margin-top: 24px; }
.chat-panel {
  background-color: var(--surface); background-image: var(--grain); background-size: 160px 160px; background-blend-mode: soft-light;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; height: 520px;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.chat-head h3 { margin: 0; font-size: 1rem; color: var(--text); }
.chat-status { font-size: 0.75rem; color: var(--up); }
.chat-log { flex: 1; overflow: auto; border: 1px solid var(--border); background: var(--bg); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--wine); color: var(--text); border: 1px solid rgba(176, 141, 60, 0.4); }
.msg.bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form input { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 12px; border-radius: 8px; font-size: 0.92rem; min-height: 48px; }
.chat-form button { background: var(--wine); color: var(--text); border: 1px solid rgba(176, 141, 60, 0.4); border-radius: 8px; padding: 0 16px; font-weight: 600; cursor: pointer; min-height: 48px; }
.chat-form button:hover { background: var(--wine-2); border-color: var(--gold-hi); }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } .chat-panel { height: 420px; } }

/* FOOTER */
.footer {
  position: relative;
  padding: 56px 0 24px; margin-top: 64px;
  background: #0a0a0b;
  border-top: 1px solid var(--border);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-head { font-weight: 600; color: var(--gold); margin-bottom: 10px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer a { display: flex; align-items: center; min-height: 40px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2px; }
.footer a:hover { color: var(--gold-hi); }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.footer-tag {
  font-family: "Archivo", sans-serif; color: var(--gold);
  font-size: 0.95rem; margin-top: 18px; letter-spacing: 0.02em;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .nav { padding: 12px 20px; gap: 12px; }
  .nav-links {
    order: 3; width: 100%; margin-left: 0; padding-top: 4px;
    overflow-x: auto; white-space: nowrap; gap: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav > div:last-child { margin-left: auto; }
}
@media (max-width: 900px) {
  .hero { padding: 56px 0 56px; }
  .hero-grid, .two-col, .porch-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .robot-card.photo { max-width: 320px; }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .porch-band { padding: 48px 0 56px; }
  .span2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .cards.four, .cards.two { grid-template-columns: 1fr; }
  .nav > div:last-child { gap: 8px; }
  .btn-ghost { min-height: 44px; padding: 0 14px; }
  .btn-primary { min-height: 46px; padding: 0 18px; font-size: 0.9rem; }
  .verdict-item { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
}

/* Invite form status */
.form-status {
  margin: 2px 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-muted);
}
.form-status.success { color: var(--up); }
.form-status.error { color: var(--down); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
