/* Dave's AI Labs: classic, warm, unhurried */
:root {
  --ink: #0c1222;
  --ink-2: #111a2e;
  --ink-3: #18233d;
  --line: rgba(201, 165, 90, .22);
  --line-soft: rgba(245, 240, 230, .08);
  --ivory: #f4efe4;
  --muted: #b3b6c2;
  --gold: #c9a55a;
  --gold-2: #e3c88b;
  --gold-deep: #9c7b3a;
  --radius: 14px;
  --max: 1140px;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--ivory);
  font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 3px 3px;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: var(--ivory); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; justify-content: center; }
[hidden] { display: none !important; }

/* typography */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.06; text-wrap: balance; }
h2, .lede, .sub { text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.1; margin-bottom: 14px; }
h3 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
h4 { font-size: 21px; margin-bottom: 6px; }
em { font-style: italic; color: var(--gold-2); font-weight: 500; }
.kicker { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 18px; font: 600 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.kicker.left { justify-content: flex-start; }
.rule { width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.kicker .rule:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.sub { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto 40px; }
.sec-head { text-align: center; margin-bottom: 48px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(12,18,34,.88); backdrop-filter: blur(12px); border-color: var(--line-soft); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ivory); }
.brand-name { font: 600 24px/1 var(--serif); letter-spacing: .01em; }
.brand.small { font: 600 18px/1 var(--serif); color: var(--ivory); gap: 10px; }
.crest { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-2); font: 600 20px/1 var(--serif); background: radial-gradient(circle at 30% 30%, rgba(201,165,90,.18), transparent 70%); flex: none; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.nav-links a:hover { color: var(--gold-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font: 600 15px/1 var(--sans); letter-spacing: .02em; cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s; text-decoration: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-deep)); color: #1b1408; box-shadow: 0 6px 24px rgba(201,165,90,.22); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(201,165,90,.35); color: #1b1408; }
.btn-line { background: transparent; color: var(--ivory); border-color: var(--line); }
.btn-line:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.exp .link-btn, .ind .link-btn { align-self: flex-start; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-2); font: 600 15px var(--sans); cursor: pointer; letter-spacing: .02em; }
.link-btn:hover { color: var(--ivory); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.icon-btn:hover { color: var(--ivory); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #1b1408; box-shadow: 0 0 0 0 rgba(27,20,8,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(27,20,8,0); } 100% { box-shadow: 0 0 0 0 rgba(27,20,8,0); } }

/* hero */
.hero { position: relative; padding: 110px 0 60px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 720px; background: radial-gradient(600px 300px at 50% 30%, rgba(201,165,90,.16), transparent 70%), radial-gradient(500px 260px at 15% 10%, rgba(120,140,200,.10), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; text-align: center; max-width: 960px; }
.lede { font-size: 19px; color: var(--muted); max-width: 720px; margin: 26px auto 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-note { margin-top: 22px; font: italic 500 19px var(--serif); color: var(--gold); }
.creds { position: relative; margin-top: 80px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.creds div { padding: 22px 12px; text-align: center; font: 600 18px/1.25 var(--serif); color: var(--ivory); }
.creds div + div { border-left: 1px solid var(--line-soft); }
.creds span { display: block; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* sections */
.section { padding: 110px 0; position: relative; }
.panel { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* experience */
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.exp { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 30px 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color .3s, transform .3s; }
.exp:hover { border-color: var(--line); transform: translateY(-3px); }
.exp p { color: var(--muted); margin: 0; font-size: 15px; }
.exp .proves { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: auto; padding-top: 10px; }
.exp-icon { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold-2); font-size: 20px; margin-bottom: 6px; }

/* roi */
.roi { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.roi .sub { margin: 0 0 30px; }
.field { margin-bottom: 22px; }
.field label { display: flex; justify-content: space-between; font-size: 15px; color: var(--ivory); margin-bottom: 10px; }
.field output { font: 600 20px/1 var(--serif); color: var(--gold-2); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--line); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--gold); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); cursor: pointer; }
.roi-result { border: 1px solid var(--line); border-radius: 20px; padding: 40px 32px; text-align: center; background: radial-gradient(400px 200px at 50% 0%, rgba(201,165,90,.12), transparent 70%), var(--ink-3); }
.roi-label { margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.roi-number { margin: 10px 0 6px; font: 600 clamp(48px, 6vw, 68px)/1 var(--serif); color: var(--gold-2); }
.roi-sub { margin: 0; color: var(--ivory); }
.roi-result hr { border: 0; border-top: 1px solid var(--line-soft); margin: 24px 0; }
.roi-fine { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

/* quiz */
.quiz { display: grid; gap: 18px; }
.q { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px 22px; background: rgba(255,255,255,.015); }
.q p { margin: 0 0 12px; font: 600 21px var(--serif); }
.q label { display: inline-flex; align-items: center; gap: 8px; margin: 4px 18px 4px 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.q label:has(input:checked) { color: var(--gold-2); }
.q input { accent-color: var(--gold); }
.q.missing { border-color: rgba(227,120,100,.6); }
.quiz .btn { justify-self: center; margin-top: 8px; }
.quiz-result { margin-top: 28px; border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px; background: var(--ink-3); text-align: center; }
.quiz-result .score { font: 600 64px/1 var(--serif); color: var(--gold-2); margin: 6px 0; }
.quiz-result p { color: var(--muted); max-width: 600px; margin: 10px auto; }
.quiz-result h3 { color: var(--ivory); }

/* promise */
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.promise { border-top: 1px solid var(--gold); padding: 26px 4px 0; }
.promise p { color: var(--muted); margin: 0; font-size: 15px; }
@media (max-width: 1000px) { .promise-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .promise-grid { grid-template-columns: 1fr; } }

/* services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.svc { background: var(--ink-2); padding: 36px 30px; }
.svc p { color: var(--muted); margin: 0; font-size: 15px; }
.num { display: block; font: italic 500 22px var(--serif); color: var(--gold); margin-bottom: 10px; }

/* industries */
.ind-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ind { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 30px 28px; background: rgba(255,255,255,.015); display: flex; flex-direction: column; gap: 8px; }
.ind.live { border-color: var(--line); background: radial-gradient(500px 200px at 0% 0%, rgba(201,165,90,.10), transparent 70%), rgba(255,255,255,.02); }
.ind p { margin: 0; color: var(--muted); font-size: 15px; }
.ind-tag { font-size: 12px !important; letter-spacing: .16em; text-transform: uppercase; color: var(--gold) !important; }
.ind-tag b { color: var(--ivory); }
.ind-metrics { color: var(--ivory) !important; }
.ind-metrics b { font: 600 20px var(--serif); color: var(--gold-2); }

/* method */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; padding: 28px 18px 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.steps li::before { content: counter(s, upper-roman); font: italic 500 22px var(--serif); color: var(--gold); }
.steps li::after { content: ""; position: absolute; top: -5px; left: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.steps b { font: 600 22px var(--serif); }
.steps span { color: var(--muted); font-size: 14.5px; }
.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tenets div { border-left: 1px solid var(--gold); padding: 4px 0 4px 20px; }
.tenets p { margin: 0; color: var(--muted); font-size: 15px; }

/* about */
.about { display: grid; grid-template-columns: .55fr 1.45fr; gap: 56px; align-items: center; }
.about p { color: var(--muted); font-size: 17px; }
.about-mono { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(201,165,90,.20), transparent 65%), var(--ink-3); position: relative; }
.about-mono::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--line-soft); }
.about-mono span { font: italic 600 clamp(56px, 9vw, 96px)/1 var(--serif); color: var(--gold-2); }
.about-meta { font-size: 14px !important; letter-spacing: .04em; }

/* closing + footer */
.closing { background: radial-gradient(700px 320px at 50% 0%, rgba(201,165,90,.14), transparent 70%); }
.closing .sub { margin-bottom: 34px; }
.footer { border-top: 1px solid var(--line-soft); padding: 30px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .pulse { animation: none; } }

/* chat widget */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--gold); background: var(--ink-3); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 6px rgba(201,165,90,.08); display: grid; place-items: center; }
.chat-fab .crest { width: 44px; height: 44px; font-size: 24px; }
.chat { position: fixed; right: 22px; bottom: 96px; z-index: 41; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 130px)); display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.55); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line-soft); background: var(--ink-3); }
.chat-title { display: flex; align-items: center; gap: 10px; flex: 1; }
.chat-title b { font: 600 19px/1.1 var(--serif); display: block; }
.chat-title span { font-size: 12px; color: var(--muted); }
.hood { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.hood input { accent-color: var(--gold); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; }
.msg.bot { background: var(--ink-3); border: 1px solid var(--line-soft); border-top-left-radius: 4px; }
.msg.you { align-self: flex-end; background: rgba(201,165,90,.16); border: 1px solid var(--line); border-top-right-radius: 4px; }
.msg.tool { display: none; align-self: stretch; max-width: 100%; font: 500 11.5px/1.5 var(--mono); color: var(--gold); background: transparent; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.chat.hood-on .msg.tool { display: block; }
.typing span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.chat-chips button { background: transparent; border: 1px solid var(--line); color: var(--gold-2); border-radius: 999px; padding: 7px 12px; font: 500 12.5px var(--sans); cursor: pointer; }
.chat-chips button:hover { border-color: var(--gold); color: var(--ivory); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); }
.chat-input input { flex: 1; background: var(--ink); border: 1px solid var(--line-soft); color: var(--ivory); border-radius: 999px; padding: 11px 16px; font: 15px var(--sans); outline: none; }
.chat-input input:focus { border-color: var(--gold); }

/* voice modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(6,9,18,.75); backdrop-filter: blur(6px); padding: 16px; }
.modal-card { position: relative; width: min(460px, 100%); background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px; padding: 44px 32px 34px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-card p { color: var(--muted); margin: 10px 0 26px; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.orb { width: 120px; height: 120px; margin: 0 auto 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(227,200,139,.35), rgba(201,165,90,.08) 60%, transparent 70%); }
.orb span { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold-deep)); transition: transform .12s; }
.orb.live span { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.18); } }

/* responsive */
@media (max-width: 1000px) {
  .exp-grid { grid-template-columns: 1fr 1fr; }
  .creds { grid-template-columns: repeat(3, 1fr); }
  .creds div:nth-child(4) { border-left: 0; }
  .roi, .about { grid-template-columns: 1fr; }
  .about-mono { max-width: 220px; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 24px; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .brand-name { font-size: 20px; }
  .nav .btn-sm { display: none; }
  .hero { padding: 72px 0 40px; }
  .section { padding: 76px 0; }
  .exp-grid, .svc-grid, .ind-grid, .tenets, .steps { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr 1fr; }
  .creds div { border-left: 0 !important; }
  .chat { right: 16px; bottom: 90px; }
  .chat-fab { right: 16px; bottom: 16px; }
}
