/* DeanWay Labs — dark lab aesthetic, gold on near-black navy */
:root {
  --bg: #060b16;
  --surface: #0d1526;
  --surface-2: #111c33;
  --gold: #c9a227;
  --gold-light: #e8c766;
  --text: #e8ecf4;
  --muted: #8b94a7;
  --border: rgba(201, 162, 39, 0.22);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
h1, h2, h3 { line-height: 1.2; color: #fff; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; }
.section { padding: 72px 0; }
.section-sub { color: var(--muted); margin-bottom: 30px; }
.gold { color: var(--gold-light); }
.kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;
  color: var(--gold); margin-bottom: 14px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 11, 22, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-emblem {
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
}
.brand-text { color: #fff; font-weight: 700; font-size: 1.15rem; }
.brand-text em { font-style: normal; color: var(--gold-light); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--gold-light); }
.pill {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gold-light); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; white-space: nowrap;
}
@media (max-width: 720px) { .nav { display: none; } }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #0b1e3b; }
.btn-ghost { border: 2px solid rgba(232,199,102,0.5); color: var(--gold-light); }
.btn-ghost:hover { border-color: var(--gold-light); background: rgba(201,162,39,0.08); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* Hero */
.hero {
  padding: 100px 0 110px; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 75% 0%, rgba(201,162,39,0.12), transparent 60%),
    linear-gradient(180deg, #0a1224 0%, var(--bg) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(201,162,39,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,39,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); max-width: 14ch; margin-bottom: 18px; }
.hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 56ch; }

/* Image hero (logo banner) */
.hero-image { background: none; padding: 0; }
.hero-image::before { display: none; }
.hero-bg { display: block; width: 100%; height: auto; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6,11,22,0.6), transparent 40%);
}
.hero-image .hero-inner {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding-bottom: 30px;
}
.hero-ctas { margin-top: 0; justify-content: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 560px) {
  .hero-image .hero-inner { padding-bottom: 18px; }
  .hero-ctas .btn { padding: 12px 20px; font-size: 0.92rem; }
}

/* Mission */
#mission p { color: #c6cddc; margin-bottom: 18px; font-size: 1.08rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(201,162,39,0.5); }
.card-tag {
  font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--gold); margin-bottom: 10px;
}
.card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.card p:last-child { color: var(--muted); font-size: 0.97rem; }

/* Absolutes */
.absolutes { list-style: none; counter-reset: abs; display: grid; gap: 16px; }
.absolutes li {
  counter-increment: abs; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 22px 76px; position: relative;
}
.absolutes li::before {
  content: counter(abs, decimal-leading-zero);
  position: absolute; left: 22px; top: 22px;
  font-family: ui-monospace, Menlo, monospace; font-weight: 700;
  color: var(--gold); font-size: 1.1rem;
}
.absolutes strong { display: block; color: #fff; margin-bottom: 4px; font-size: 1.05rem; }
.absolutes span { color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0; text-align: center;
}
.site-footer strong { color: var(--gold-light); }
.site-footer .fine { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* ---- Talk to the Lab: chat ---- */
.kicker-light { color: var(--gold-light); }
.hero-title {
  font-size: clamp(2.4rem, 7vw, 4rem); max-width: 14ch; margin: 14px 0 18px;
  color: #fff;
}
.lede-light { font-size: 1.15rem; color: #c6cddc; max-width: 56ch; }

.chat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.chat-id { display: flex; align-items: center; gap: 12px; }
.chat-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #35d07f; box-shadow: 0 0 10px rgba(53,208,127,0.8);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.55; } }
.chat-id strong { display: block; color: #fff; font-size: 1rem; }
.chat-sub { font-size: 0.78rem; color: var(--muted); }
.op-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; letter-spacing: 0.5px;
}
.op-btn.on { color: var(--gold-light); border-color: var(--gold); }
.chat-log {
  height: 320px; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { max-width: 85%; }
.msg p {
  padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; line-height: 1.5;
  margin: 0;
}
.msg-user { align-self: flex-end; }
.msg-user p { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #0b1e3b; border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; }
.msg-ai p { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.dots span {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-light); margin-right: 5px; animation: blink 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 40% { opacity: 0.25; } }
.chat-chips {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px;
}
.chat-chips button {
  background: transparent; border: 1px solid var(--border); color: var(--gold-light);
  border-radius: 999px; padding: 8px 14px; font-size: 0.82rem; cursor: pointer;
}
.chat-chips button:hover { border-color: var(--gold-light); }
.contact-form { padding: 0 18px 14px; display: grid; gap: 10px; }
.contact-form[hidden] { display: none; }
.form-title { color: #fff; font-weight: 700; }
.contact-form input {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 0.95rem; width: 100%;
}
.contact-form input:focus { outline: none; border-color: var(--gold); }
.form-row { display: flex; gap: 10px; }
.form-note { font-size: 0.85rem; color: var(--gold-light); min-height: 1.2em; }
.chat-input {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--border); background: var(--surface-2);
}
.chat-input input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 12px 18px; font-size: 0.95rem;
}
.chat-input input:focus { outline: none; border-color: var(--gold); }
.btn-sm { padding: 10px 22px; font-size: 0.9rem; }

/* ---- Build log feed ---- */
.feed { display: grid; gap: 14px; }
.feed-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  border-left: 3px solid var(--gold);
}
.feed-date {
  font-family: ui-monospace, Menlo, monospace; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--gold);
  margin-bottom: 6px;
}
.feed-text { color: #c6cddc; }
.feed-loading { color: var(--muted); }

/* ---- Talking hero ---- */
.hero-talking { min-height: 92vh; display: flex; align-items: flex-end; }
.hero-talking .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 6%;
}
.hero-talking .hero-shade {
  background: linear-gradient(to top, rgba(6,11,22,0.94) 0%, rgba(6,11,22,0.55) 32%, rgba(6,11,22,0.12) 60%, rgba(6,11,22,0.3) 100%);
}
.hero-talking .hero-inner { padding-bottom: 26px; }
.hero-talking .hero-title { font-size: clamp(1.9rem, 5.5vw, 3rem); }
.hero-talking .lede-light { font-size: 1.02rem; }
.hero-corner-emblem {
  position: absolute; top: 18px; right: 18px; width: 60px; height: 60px;
  border-radius: 50%; box-shadow: 0 0 16px rgba(201,162,39,0.55);
  z-index: 2;
}
.voice-toggle {
  position: absolute; top: 92px; right: 24px; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(13,21,38,0.8); border: 1px solid var(--border);
  font-size: 1.25rem; cursor: pointer; color: #fff;
}
.voice-toggle.off { opacity: 0.45; }
.hero-ctas-small { margin-top: 22px; }
.hero-ctas-small .btn { padding: 11px 22px; font-size: 0.9rem; }
