/* DevShop AI — hi-fi parallax site styles */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --accent-rgb: 255,59,47;
  --bg:       #0c0a08;
  --bg2:      #131009;
  --accent:     #FF3B2F;
  --accent2:    #ff5a4b;
  --accent3:    #ff8a7d;
  --text:     #F4F2ED;
  --text2:    rgba(244,242,237,0.58);
  --text3:    rgba(244,242,237,0.32);
  --red:      #d44030;
  --blue:     #4a8fc8;
  --border:   rgba(var(--accent-rgb),0.18);
  --font-d:   'Archivo', system-ui, sans-serif;
  --font-b:   'Archivo', system-ui, sans-serif;
  --font-m:   'JetBrains Mono', monospace;
}

/* ── Accent: PURPLE variant (data-accent="purple") ── */
html[data-accent="purple"] {
  --accent:  #9B4DFF;
  --accent2: #a566ff;
  --accent3: #c9a3ff;
  --accent-rgb: 155,77,255;
}
html[data-accent="red"] {
  --accent:  #FF3B2F;
  --accent2: #ff5a4b;
  --accent3: #ff8a7d;
  --accent-rgb: 255,59,47;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Grain + dot-grid overlay ────────────────────────────── */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  opacity: 0.75;
}
/* Dot-grid for depth & parallax visibility */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(var(--accent-rgb),0.09) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ── Nav ───────────────────────────────────────────────── */
#nav-inline {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: transparent;
  pointer-events: none;
  margin-bottom: -96px; /* nav overlays hero — must not push #sticky-scene down (96px = 60px logo + 36px padding) */
}
#nav-inline > * { pointer-events: auto; }
.nav-logo { height: 104px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  font-family: var(--font-b); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bg); background: var(--accent2);
  padding: 10px 22px; border-radius: 999px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent3); transform: translateY(-1px); }
.nav-chat-btn {
  font-family: var(--font-b); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: transparent; color: var(--accent2);
  padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid rgba(var(--accent-rgb),0.45);
  cursor: pointer; transition: 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.nav-chat-btn:hover { border-color: var(--accent2); background: rgba(var(--accent-rgb),0.08); }

/* ── Progress bar ──────────────────────────────────────── */
#progress-line {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 201;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.05s linear;
}

/* ── Scroll section + sticky scene ─────────────────────── */
#scroll-section { position: relative; height: 400vh; }

#sticky-scene {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--bg);
}

/* ── Background canvas ─────────────────────────────────── */
#bg-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
#skyline-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
  opacity: 0.6;
}

/* ── Loader ────────────────────────────────────────────── */
#loader {
  position: absolute; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); gap: 20px;
}
#loader-label {
  font-family: var(--font-m); font-size: 11px;
  color: var(--text3); letter-spacing: 0.1em; text-transform: uppercase;
}
#loader-track {
  width: 200px; height: 2px; background: rgba(var(--accent-rgb),0.2); border-radius: 1px; overflow: hidden;
}
#loader-bar {
  height: 100%; width: 0%; background: var(--accent2);
  transition: width 0.2s ease; border-radius: 1px;
}
.loader-logo { height: 64px; width: auto; filter: brightness(0.9); }

/* ── Paper stage ───────────────────────────────────────── */
#paper-anchor {
  position: absolute; left: 50%; top: 50%; z-index: 10; pointer-events: none;
}
#paper-wrapper {
  position: relative;
  width: 52vh;
  aspect-ratio: 1264 / 1636;
  margin-left: -26vh;
  margin-top: -33.8vh;
  transform-origin: center center;
  will-change: transform, opacity;
  transition: filter 0.3s ease;
}
#paper-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

/* ── Scan overlay ──────────────────────────────────────── */
#scan-overlay {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s ease;
}
#scan-line {
  position: absolute; left: -5%; right: -5%; height: 3px; top: 0;
  transition: top 0.02s linear;
}
#scan-overlay[data-mode="red"] #scan-line {
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.7), var(--accent3), rgba(var(--accent-rgb),0.7), transparent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb),0.8), 0 0 40px rgba(var(--accent-rgb),0.4);
}
#scan-overlay[data-mode="blue"] #scan-line {
  background: linear-gradient(90deg, transparent, rgba(60,120,240,0.7), #7ab4ff, rgba(60,120,240,0.7), transparent);
  box-shadow: 0 0 18px rgba(60,120,240,0.8), 0 0 50px rgba(60,120,240,0.4);
}

/* ── Text blocks ───────────────────────────────────────── */
.text-block {
  position: absolute; top: 0; bottom: 0; z-index: 20;
  width: 36%; max-width: 520px;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none;
  will-change: opacity, transform;
}
.text-block.text-left  { left: 5vw; }
.text-block.text-right { right: 5vw; }
.text-block.text-center {
  left: 0; right: 0; margin: 0 auto;
  width: 54%; text-align: center; align-items: center;
}

.txt-label {
  font-family: var(--font-m); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.txt-headline {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600; line-height: 1.12;
  color: var(--text); margin-bottom: 18px;
  letter-spacing: 0.01em;
}
.txt-body {
  font-family: var(--font-b); font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 300; line-height: 1.65;
  color: var(--text2);
}
.txt-cta {
  display: inline-block; margin-top: 28px;
  font-family: var(--font-b); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg); background: var(--accent2);
  padding: 14px 30px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, transform 0.15s; border: none;
}
.txt-cta:hover { background: var(--accent3); transform: translateY(-2px); }
.txt-cta.secondary {
  background: transparent; color: var(--accent2);
  border: 1.5px solid rgba(var(--accent-rgb),0.5); margin-left: 14px;
}
.txt-cta.secondary:hover { border-color: var(--accent2); background: rgba(var(--accent-rgb),0.08); }

/* ── Screen overlays ───────────────────────────────────── */
.screen-overlay {
  position: absolute; top: 50%; right: 4vw;
  transform: translateY(-50%);
  max-height: 78vh; max-width: 46vw;
  z-index: 15; opacity: 0; pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
  will-change: opacity, transform;
  overflow: hidden;
}
.screen-overlay img {
  display: block; max-height: 78vh; max-width: 46vw;
  width: auto; height: auto;
}
.screen-overlay.screen-center {
  right: auto; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 56vw; max-height: 82vh;
}
.screen-overlay.screen-center img { max-width: 56vw; max-height: 82vh; }

/* Generated (HTML) screens */
.screen-generated {
  background: #f8f7f5;
  max-width: 52vw; max-height: 82vh;
  overflow-y: auto;
  font-family: var(--font-b); color: #1a1814;
}
.sg-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; background: #eeece9;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: sticky; top: 0; z-index: 2;
}
.sg-dot { width: 10px; height: 10px; border-radius: 50%; }
.sg-dot.r { background: #ff5f57; }
.sg-dot.y { background: #febc2e; }
.sg-dot.g { background: #28c840; }
.sg-title { margin-left: 10px; font-size: 11px; font-weight: 500; color: #666; letter-spacing: 0.03em; }
.sg-badge { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 100px; }
.sg-badge.submitted { background: #dbeafe; color: #1d4ed8; }
.sg-badge.confirmed { background: #dcfce7; color: #15803d; }
.sg-badge.awarded   { background: #fef3c7; color: #92400e; }
.sg-body { padding: 28px 32px; }
.sg-h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.sg-sub { font-size: 13px; color: #666; margin-bottom: 24px; }
.sg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.sg-field { background: white; border: 1px solid #e8e5e0; border-radius: 6px; padding: 10px 14px; }
.sg-field-label { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #999; margin-bottom: 4px; }
.sg-field-val { font-size: 13px; font-weight: 500; }
.sg-card { background: white; border: 1px solid #e8e5e0; border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; }
.sg-card-h { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.sg-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0ece6; font-size: 13px; }
.sg-row:last-child { border: none; }
.sg-award-hero { text-align: center; padding: 32px 20px; }
.sg-award-icon { font-size: 48px; margin-bottom: 12px; }
.sg-award-title { font-size: 28px; font-weight: 700; color: #92400e; margin-bottom: 8px; }
.sg-award-sub { font-size: 14px; color: #666; margin-bottom: 24px; }
.sg-award-amount { font-size: 36px; font-weight: 700; color: #1a1814; }
.sg-award-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #999; margin-top: 4px; }

/* ── Scroll prompt ─────────────────────────────────────── */
#scroll-prompt {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: opacity 0.3s ease;
}
.sp-label { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,242,237,0.45); }
.sp-arrow { width: 22px; height: 36px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sp-chev { width: 14px; height: 7px; display: block; animation: scrollChev 1.6s ease-in-out infinite; overflow: visible; }
.sp-chev path { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sp-chev:nth-child(2) { animation-delay: 0.18s; opacity: 0.6; }
.sp-chev:nth-child(3) { animation-delay: 0.36s; opacity: 0.3; }
@keyframes scrollChev { 0%,100%{transform:translateY(-4px);opacity:0.3} 50%{transform:translateY(5px);opacity:1} }

/* ── Below-fold sections ───────────────────────────────── */
.section { position: relative; z-index: 10; padding: 120px 80px; }
.section-label {
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-headline {
  font-family: var(--font-d); font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 600; line-height: 1.12; color: var(--text);
  margin-bottom: 20px; letter-spacing: 0.01em;
}
.section-body {
  font-size: 1.05rem; font-weight: 300; line-height: 1.7;
  color: var(--text2); max-width: 600px;
}
.section-rule { width: 48px; height: 2px; background: var(--accent); margin-bottom: 40px; }

/* bridge */
#bridge { padding: 80px 80px 60px; }
#bridge .section-headline { font-size: clamp(1.6rem, 2.5vw, 2.1rem); max-width: 780px; }

/* industries */
#industries { background: var(--bg2); border-top: 1px solid var(--border); }
.industries-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; background: var(--border); border: 1px solid var(--border); }
.industry-card {
  background: var(--bg2); padding: 36px 28px;
  transition: background 0.3s;
}
.industry-card:hover { background: rgba(var(--accent-rgb),0.06); }
.industry-icon { font-size: 28px; margin-bottom: 16px; }
.industry-name { font-family: var(--font-d); font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.industry-desc { font-size: 0.88rem; font-weight: 300; line-height: 1.6; color: var(--text2); }

/* how it works */
#how-it-works { border-top: 1px solid var(--border); }
.hiw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 60px; }
.hiw-step { position: relative; }
.hiw-step-no {
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.hiw-step-title { font-family: var(--font-d); font-size: 1.3rem; font-weight: 600; margin-bottom: 12px; }
.hiw-step-body { font-size: 0.9rem; font-weight: 300; line-height: 1.7; color: var(--text2); }
.hiw-connector {
  position: absolute; top: 5px; right: -24px; width: 48px; height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
}

/* CTA */
#cta-section {
  background: linear-gradient(135deg, #0c0a08 0%, #181208 50%, #0c0a08 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 120px 80px; text-align: center;
}
#cta-section .section-headline { font-size: clamp(2.4rem, 4vw, 3.6rem); max-width: 800px; margin: 0 auto 20px; }
#cta-section .section-body { margin: 0 auto 40px; text-align: center; }
.cta-cluster { display: flex; align-items: center; justify-content: center; gap: 16px; }
.cta-btn {
  font-family: var(--font-b); font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; border: none; cursor: pointer;
  padding: 16px 36px; border-radius: 999px; transition: 0.2s;
}
.cta-btn.primary { background: var(--accent2); color: var(--bg); }
.cta-btn.primary:hover { background: var(--accent3); transform: translateY(-2px); }
.cta-btn.ghost { background: transparent; color: var(--accent2); border: 1.5px solid rgba(var(--accent-rgb),0.5); }
.cta-btn.ghost:hover { border-color: var(--accent2); }
.cta-tagline { font-family: var(--font-m); font-size: 11px; color: var(--text3); letter-spacing: 0.08em; margin-top: 20px; }

/* Footer */
footer {
  padding: 60px 80px 40px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px;
  border-top: 1px solid var(--border);
}
.foot-brand img { height: 44px; margin-bottom: 16px; }
.foot-tagline { font-size: 0.88rem; font-weight: 300; color: var(--text3); line-height: 1.6; max-width: 260px; }
.foot-col-title { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.foot-col a { display: block; font-size: 0.88rem; color: var(--text3); text-decoration: none; margin-bottom: 8px; transition: color 0.2s; }
.foot-col a:hover { color: var(--text2); }
.foot-bottom { grid-column: 1/-1; padding-top: 28px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.foot-copy { font-size: 0.78rem; color: var(--text3); }

/* ── Back to top ───────────────────────────────────────── */
#back-to-top {
  position: fixed; bottom: 28px; left: 28px; z-index: 300;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,14,6,0.78);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1.5px solid rgba(var(--accent-rgb),0.45);
  color: var(--accent2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, border-color 0.2s;
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { border-color: var(--accent2); background: rgba(40,28,12,0.92); }

/* ── Chat ──────────────────────────────────────────────── */
#chat-bubble {
  position: fixed; bottom: 28px; right: 28px; z-index: 300;
  width: 72px; height: 72px; border-radius: 50%;
  /* Solid accent circle so the black lion reads as clean negative relief. */
  background: radial-gradient(circle at 35% 30%, #ff8a7d 0%, var(--accent2) 45%, var(--accent) 100%);
  border: 2px solid rgba(255,235,180,0.55);
  cursor: pointer;
  box-shadow:
    0 0 0 0 rgba(var(--accent-rgb),0.45),
    0 14px 38px rgba(0,0,0,0.55),
    inset 0 -8px 16px rgba(80,50,8,0.55),
    inset 0 4px 12px rgba(255,240,200,0.45);
  animation: bubblePulse 3s ease-out infinite;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
  overflow: hidden;
}
#chat-bubble:hover { transform: scale(1.08); }
#chat-bubble.open { animation: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.4), 0 10px 30px rgba(0,0,0,0.5); }
@keyframes bubblePulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0.5), 0 8px 24px rgba(0,0,0,0.4); }
  60%  { box-shadow: 0 0 0 16px rgba(var(--accent-rgb),0), 0 8px 24px rgba(0,0,0,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0), 0 8px 24px rgba(0,0,0,0.4); }
}

#chat-modal {
  position: fixed; bottom: 108px; right: 28px; z-index: 299;
  width: 390px; max-height: 560px;
  background: rgba(38,30,16,0.97);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(var(--accent-rgb),0.35);
  border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow:
    0 32px 72px rgba(0,0,0,0.65),
    0 0 0 1px rgba(var(--accent-rgb),0.08) inset,
    0 1px 0 rgba(var(--accent-rgb),0.15) inset;
  transform: translateY(16px) scale(0.97); opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}
#chat-modal.open {
  transform: translateY(0) scale(1); opacity: 1; pointer-events: auto;
}
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid rgba(var(--accent-rgb),0.18);
  background: rgba(var(--accent-rgb),0.07);
}
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  flex: none; overflow: hidden;
  background: #1a1208;
}

/* Logo mark cropped out of the full DevShop AI logo — shared by chat-bubble + chat-avatar */
.leo-mask {
  display:block;
  position:relative;
  width:100%; height:100%;
  border-radius:50%;
  overflow:hidden;
}
.leo-mask img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  padding:14%;
  box-sizing:border-box;
  pointer-events:none;
  display:block;
}
/* Chat bubble: accent disc background, force the lion mark to render BLACK. */
.leo-mask--bubble img {
  filter: brightness(0) saturate(100%);
}
/* Chat modal avatar: keep the lion mark in its original accent. */
.leo-mask--avatar img {
  filter: none;
}

/* Chat bubble — BLACK lion in negative relief on a GOLD circle */
#chat-bubble .leo-mask img { filter: brightness(0); }

/* Chat-modal avatar — GOLD lion (logo's native color) on a BLACK circle */
.chat-avatar .leo-mask img { filter: none; }
.chat-header-info { flex: 1; }
.chat-agent-name { font-family: var(--font-d); font-size: 15px; font-weight: 600; color: var(--accent2); }
.chat-agent-status { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.chat-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #28c840; animation: statusPulse 2s ease infinite; flex: none; }
@keyframes statusPulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.chat-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 18px; padding: 4px 6px; transition: color 0.2s; border-radius: 4px; }
.chat-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb),0.2) transparent;
}
.chat-msg {
  max-width: 90%; padding: 11px 14px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.55; color: var(--text);
}
.chat-msg.agent {
  background: rgba(var(--accent-rgb),0.14);
  border: 1px solid rgba(var(--accent-rgb),0.22);
  align-self: flex-start; border-radius: 4px 12px 12px 12px;
}
.chat-msg.user {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg); font-weight: 500;
  align-self: flex-end; border-radius: 12px 4px 12px 12px;
}
.chat-footer {
  padding: 12px 14px; border-top: 1px solid rgba(var(--accent-rgb),0.15);
  display: flex; gap: 8px; align-items: flex-end;
  background: rgba(0,0,0,0.2);
}
.chat-input {
  flex: 1; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: 10px; padding: 10px 13px; color: var(--text);
  font-family: var(--font-b); font-size: 13.5px; resize: none;
  min-height: 40px; max-height: 100px; outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: rgba(var(--accent-rgb),0.6); background: rgba(255,255,255,0.09); }
.chat-input::placeholder { color: var(--text3); }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); border: none; color: var(--bg);
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 15px;
}
.chat-send:hover { background: var(--accent2); }

/* ═══════════════════════════════════════════════════════════
   DevShop AI rebrand additions (override earlier rules)
   ═══════════════════════════════════════════════════════════ */
/* Wide wordmark logos sit smaller than the old square mark */
.nav-logo { height: 60px; }
.loader-logo { height: 54px; filter: none; }
.foot-brand img { height: 38px; }

/* Terminal mark — replaces the lion in chat bubble + avatar */
.term-mark { display: block; }
#chat-bubble {
  background: #000 !important;
  border-radius: 18px !important;
  border: 2px solid rgba(var(--accent-rgb),0.55) !important;
}
#chat-bubble .term-mark { width: 54%; height: 54%; }
.chat-avatar {
  background: #000 !important; border-radius: 10px !important;
  border: 1.5px solid rgba(var(--accent-rgb),0.5);
  display: flex; align-items: center; justify-content: center;
}
.chat-avatar .term-mark { width: 62%; height: 62%; }

/* Archivo display tightening (was a serif) */
.txt-headline, .section-headline, .hiw-step-title, .industry-name, .chat-agent-name {
  letter-spacing: -0.02em;
}

/* Archivo runs wider than the old type — keep button labels on one line */
.nav-cta, .nav-chat-btn, .txt-cta, .cta-btn { white-space: nowrap; }
.nav-chat-btn { line-height: 1; }

/* ═══════════════════════════════════════════════════════════
   Contact and calendar modals
   ═══════════════════════════════════════════════════════════ */
#contact-modal, #calendar-modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
#contact-modal.open, #calendar-modal.open { opacity: 1; pointer-events: auto; }
.cm-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,4,2,0.72);
  backdrop-filter: blur(8px) saturate(120%);
}
.cm-card {
  position: relative; width: 100%; max-width: 460px;
  background: rgba(30,23,12,0.98);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(var(--accent-rgb),0.35);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) inset;
  padding: 34px 34px 30px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
}
#contact-modal.open .cm-card, #calendar-modal.open .cm-card { transform: translateY(0) scale(1); }
#calendar-modal .cm-card { max-width: min(960px, calc(100vw - 28px)); }
.cm-calendar-card { height: 92vh; max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 24px 26px 20px; }
.cm-calendar-card .cm-eyebrow { margin-bottom: 8px; }
.cm-calendar-card .cm-sub { margin-top: 6px; margin-bottom: 14px; }
.cm-calendar-frame {
  width: 100%;
  height: 100%;
  min-height: 320px;
  flex: 1;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.cm-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: 0.18s;
}
.cm-close:hover { background: rgba(var(--accent-rgb),0.14); color: var(--accent2); border-color: rgba(var(--accent-rgb),0.4); }
.cm-eyebrow {
  font-family: var(--font-m); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent2);
  margin-bottom: 12px;
}
.cm-title { font-family: var(--font-d); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.cm-sub { font-size: 0.92rem; color: var(--text2); line-height: 1.55; margin-top: 8px; margin-bottom: 24px; }
.cm-field { margin-bottom: 16px; }
.cm-field label {
  display: block; font-family: var(--font-m); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); margin-bottom: 7px;
}
.cm-field input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(var(--accent-rgb),0.22); border-radius: 10px;
  padding: 12px 14px; font-family: var(--font-b); font-size: 0.95rem;
  color: var(--text); outline: none; transition: 0.18s;
}
.cm-field input::placeholder { color: var(--text3); }
.cm-field input:focus { border-color: rgba(var(--accent-rgb),0.6); background: rgba(255,255,255,0.08); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.14); }
.cm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cm-submit {
  width: 100%; margin-top: 10px;
  font-family: var(--font-b); font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent2); color: var(--bg); border: none; cursor: pointer;
  padding: 15px 28px; border-radius: 999px; transition: 0.2s;
}
.cm-submit:hover { background: var(--accent3); transform: translateY(-2px); }
.cm-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.cm-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 12px; line-height: 1.45; color: var(--text3); }
.cm-consent input { margin-top: 2px; accent-color: var(--accent2); }
.cm-foot { font-family: var(--font-m); font-size: 11px; color: var(--text3); letter-spacing: 0.04em; text-align: center; margin-top: 16px; }
/* success state */
.cm-success { text-align: center; padding: 14px 0 6px; }
.cm-success .cm-check {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 20px;
  background: rgba(var(--accent-rgb),0.14); border: 1.5px solid rgba(var(--accent-rgb),0.5);
  display: flex; align-items: center; justify-content: center;
}
.cm-success .cm-check svg { width: 30px; height: 30px; }
.cm-success h3 { font-family: var(--font-d); font-size: 1.4rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.cm-success p { font-size: 0.92rem; color: var(--text2); line-height: 1.55; }
@media (max-width: 520px) {
  .cm-row { grid-template-columns: 1fr; }
  .cm-card { padding: 28px 22px 24px; }
  #calendar-modal { padding: 2vw; }
  #calendar-modal .cm-card { max-width: 96vw; }
  .cm-calendar-card { height: 96vh; max-height: calc(100vh - 4vw); padding: 20px 14px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE  ·  phones (portrait + landscape) and tablets
   ═══════════════════════════════════════════════════════════ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Floating controls respect iOS safe-area insets (notch / home bar) */
@supports (padding: max(0px)) {
  #chat-bubble { bottom: max(24px, env(safe-area-inset-bottom)); }
  #back-to-top { bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* ---- Tablet & down: relax heavy desktop padding ---- */
@media (max-width: 1024px) {
  .section,
  #cta-section { padding: 96px 48px; }
  footer { padding: 56px 48px 36px; gap: 36px; }
  .hiw-steps { gap: 32px; }
}

/* ════════ PHONE — PORTRAIT (and narrow tablets) ════════
   Stack the cinematic stage: text band on top, screen mockups
   full-width in the lower band, paper sized to viewport WIDTH. */
@media (max-width: 820px) {
  /* NAV — collapse to logo + single CTA */
  #nav-inline { padding: 12px 18px; margin-bottom: -68px; }
  .nav-logo { height: 44px; }
  .nav-right { gap: 8px; }
  .nav-chat-btn { display: none; }
  .nav-cta { font-size: 12px; padding: 9px 16px; }

  /* Fit the stage to the VISIBLE viewport (excludes the browser's
     bottom toolbar) so centred content & buttons aren't cut off. */
  #sticky-scene { height: 100dvh; }

  /* TEXT — full-width top band with a legibility scrim */
  .text-block {
    width: auto; max-width: none;
    top: 0; bottom: auto; height: 44dvh;
    justify-content: center;
    padding: 84px 22px 0;
    text-align: left;
  }
  .text-block.text-left,
  .text-block.text-right { left: 0; right: 0; }
  .text-block::before {
    content: ""; position: absolute; inset: -84px -22px 0;
    background: linear-gradient(to bottom,
      rgba(10,8,5,0.92) 0%, rgba(10,8,5,0.74) 52%, rgba(10,8,5,0) 100%);
    z-index: -1; pointer-events: none;
  }
  .txt-headline { font-size: clamp(1.55rem, 6.4vw, 2.1rem); margin-bottom: 14px; }
  .txt-body { font-size: 0.95rem; line-height: 1.6; }
  .txt-label { margin-bottom: 10px; }
  .txt-cta { padding: 13px 22px; font-size: 12px; }
  .txt-cta.secondary { margin-left: 0; }

  /* SCREENS — full-width, anchored to the lower band */
  .screen-overlay {
    top: auto; bottom: 2.5dvh;
    left: 0; right: 0; margin: 0 auto;
    max-width: 92vw; max-height: 52dvh;
  }
  .screen-overlay img,
  .screen-generated { max-width: 92vw; max-height: 52dvh; }
  /* Eliminate nested vertical scroll on mobile — let content flow naturally.
     The sticky scene clips anything outside 100dvh anyway. Override the
     combined max-height rule above, allow the card to grow to its content. */
  .screen-generated { overflow-y: visible; max-height: none; }
  .sg-body { padding: 18px 18px; }
  .sg-h1 { font-size: 18px; }
  .sg-sub { font-size: 12px; margin-bottom: 16px; }
  .sg-grid { gap: 8px; margin-bottom: 14px; }
  .sg-field { padding: 8px 11px; }
  .sg-card { padding: 14px 15px; }
  .sg-award-icon { font-size: 38px; }
  .sg-award-title { font-size: 22px; }
  .sg-award-amount { font-size: 28px; }

  /* PAPER — size to width so it never clips off the sides;
     shift anchor point DOWN so the paper lives in the lower band
     and does not overlap the text band (top 44dvh). */
  #paper-anchor {
    top: 72dvh;
  }
  #paper-wrapper {
    width: 58vw;
    margin-left: -29vw;
    margin-top: -37.5vw;   /* half of 58vw × 1636/1264 */
  }

  /* BELOW-FOLD sections */
  .section { padding: 64px 22px; }
  #bridge { padding: 56px 22px 44px; }
  .section-headline { font-size: clamp(1.5rem, 6vw, 2rem); }
  #bridge .section-headline { font-size: clamp(1.35rem, 5.2vw, 1.7rem); }
  .section-body { font-size: 0.98rem; }
  .hiw-steps { grid-template-columns: 1fr; gap: 36px; margin-top: 40px; }
  .hiw-connector { display: none; }

  /* CTA */
  #cta-section { padding: 72px 22px; }
  #cta-section .section-headline { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .cta-cluster { flex-direction: column; gap: 12px; }
  .cta-btn { width: 100%; }

  /* FOOTER */
  footer {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px; padding: 48px 22px 32px;
  }
  .foot-brand { grid-column: 1 / -1; }
  .foot-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }

  /* CHAT — near full-width bottom sheet */
  #chat-modal {
    width: auto; left: 12px; right: 12px;
    bottom: 96px; max-height: 68vh;
  }
  #chat-bubble { width: 60px; height: 60px; right: 16px; }
  #back-to-top { left: 16px; }
}

/* ---- Small phones (portrait) ---- */
@media (max-width: 480px) {
  .nav-cta { font-size: 11px; padding: 8px 13px; letter-spacing: 0.04em; }
  .sg-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .txt-headline { font-size: clamp(1.45rem, 7.4vw, 1.95rem); }
}

/* ════════ PHONE — LANDSCAPE ════════
   Short viewport, ample width → restore a side-by-side layout:
   text on one side, screen on the other, paper sized to HEIGHT.
   Keyed on (orientation + short height) so it also fixes wide
   landscape phones that fall outside the 820px portrait block,
   and overrides the portrait stack on narrow ones. */
@media (orientation: landscape) and (max-height: 520px) {
  /* NAV */
  #nav-inline { padding: 10px 20px; margin-bottom: -60px; }
  .nav-logo { height: 40px; }
  .nav-chat-btn { display: none; }
  .nav-cta { font-size: 12px; padding: 8px 16px; }

  /* Fit the stage to the visible viewport (excludes browser toolbar). */
  #sticky-scene { height: 100dvh; }

  /* TEXT — side band, vertically centred, no heavy scrim */
  .text-block {
    width: 38%; max-width: 340px;
    top: 0; bottom: 0; height: auto;
    justify-content: center;
    padding: 54px 0 22px;
    text-align: left;
  }
  .text-block.text-left  { left: 4vw; right: auto; }
  .text-block.text-right { left: auto; right: 4vw; }
  .text-block::before { display: none; }
  .txt-headline { font-size: clamp(1.2rem, 3.6dvh, 1.9rem); margin-bottom: 8px; }
  .txt-body { font-size: clamp(0.74rem, 2.2dvh, 0.9rem); line-height: 1.45; }
  .txt-label { margin-bottom: 6px; }
  .txt-cta { padding: 9px 16px; font-size: 11px; margin-top: 14px; }
  .txt-cta.secondary { margin-left: 10px; }

  /* SCREENS — opposite side, bottom-anchored to fit short height */
  .screen-overlay {
    top: auto; bottom: 5dvh;
    left: auto; right: 4vw; margin: 0;
    max-width: 44vw; max-height: 84dvh;
  }
  .screen-overlay img,
  .screen-generated { max-width: 44vw; max-height: 84dvh; }
  .sg-body { padding: 14px 16px; }
  .sg-h1 { font-size: 16px; }
  .sg-sub { font-size: 11px; margin-bottom: 12px; }
  .sg-grid { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
  .sg-card { padding: 12px 14px; }
  .sg-award-icon { font-size: 32px; margin-bottom: 8px; }
  .sg-award-title { font-size: 19px; }
  .sg-award-amount { font-size: 25px; }

  /* PAPER — size to height (width is ample in landscape) */
  #paper-wrapper {
    width: 46dvh;
    margin-left: -23dvh;
    margin-top: -29.8dvh;   /* half of 46dvh × 1636/1264 */
  }

  /* BELOW-FOLD — trim vertical padding, keep multi-column (width allows) */
  .section,
  #cta-section { padding: 60px 40px; }
  #bridge { padding: 50px 40px; }
  .hiw-steps { grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
  .hiw-connector { display: block; }
  .cta-cluster { flex-direction: row; gap: 16px; }
  .cta-btn { width: auto; }
  footer {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px; padding: 48px 40px 30px;
  }
  .foot-brand { grid-column: auto; }
  .foot-bottom { flex-direction: row; align-items: center; }

  /* CHAT — compact corner panel, not a full-width sheet */
  #chat-modal {
    width: 360px; left: auto; right: 16px;
    bottom: 76px; max-height: 82vh;
  }
  #chat-bubble { width: 56px; height: 56px; right: 16px; }
}

/* ---- Very short landscape (compact phones) ---- */
@media (orientation: landscape) and (max-height: 400px) {
  .text-block { width: 38%; max-width: 320px; padding-top: 46px; }
  .txt-headline { font-size: clamp(1.05rem, 4dvh, 1.55rem); }
  .txt-body { font-size: clamp(0.7rem, 2.4dvh, 0.84rem); }
  .screen-overlay,
  .screen-overlay img,
  .screen-generated { max-height: 80dvh; }
}

/* ── Voice mode ──────────────────────────────────────────── */

/* Mic button — sits between textarea and send arrow */
.chat-mic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(var(--accent-rgb),0.3);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.chat-mic:hover {
  background: rgba(var(--accent-rgb),0.1);
  border-color: rgba(var(--accent-rgb),0.55);
  color: var(--accent2);
}

/* Icon variants: show mic when idle/connecting/error, show stop when live */
.mic-icon { width: 16px; height: 16px; display: block; }
.chat-mic .mic-icon--stop { display: none; }
.chat-mic.mic--live .mic-icon--mic { display: none; }
.chat-mic.mic--live .mic-icon--stop { display: block; }

/* Idle state */
.chat-mic.mic--idle {
  /* default styles already set */
}

/* Connecting — subtle pulse on the border */
.chat-mic.mic--connecting {
  border-color: rgba(var(--accent-rgb),0.6);
  color: var(--accent2);
  animation: micConnectPulse 1.1s ease-in-out infinite;
}
@keyframes micConnectPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0.35); }
  50%       { box-shadow: 0 0 0 6px rgba(var(--accent-rgb),0); }
}

/* Live — red "end call" look */
.chat-mic.mic--live {
  background: var(--accent);
  border-color: var(--accent2);
  color: #fff;
  animation: none;
}
.chat-mic.mic--live:hover {
  background: var(--accent2);
  border-color: var(--accent3);
  color: #fff;
  transform: scale(1.06);
}

/* Error — brief shake, then auto-resets to idle */
.chat-mic.mic--error {
  border-color: var(--accent);
  color: var(--accent);
  animation: micShake 0.45s ease;
}
@keyframes micShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* Status pill — sits inline inside .chat-header-info below the static status
   line, hidden by default. Replaces (hides) the static line while voice is live.
   Contains a label span + volume bars span side by side. */
.voice-status-pill {
  display: none; /* hidden; shown via .visible */
  align-items: center;
  gap: 7px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent3);
  white-space: nowrap;
  pointer-events: none;
  margin-top: 2px;
}
.voice-status-pill.visible {
  display: flex;
}
/* When pill is visible, hide the static agent-status line (toggled via JS) */
#chat-agent-status-text.voice-active {
  display: none;
}
/* Label text inside the pill */
.vsp-label {
  display: inline-block;
}
/* Volume bar cluster */
.vsp-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.vsp-bar {
  width: 2px;
  border-radius: 1px;
  background: var(--accent2);
  min-height: 2px;
  /* height is driven by JS inline style */
  transition: height 0.05s linear;
  will-change: height;
}

/* .chat-msg.voice — no visible marker; identical to regular bubbles */

/* Placeholder user bubble while awaiting transcript */
.chat-msg.voice-pending {
  max-width: 90%; padding: 11px 14px; border-radius: 12px 4px 12px 12px;
  font-size: 13.5px; line-height: 1.55;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg); font-weight: 500;
  align-self: flex-end;
  opacity: 0.65;
}
/* The three animated dots inside the pending bubble */
.voice-pending-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.voice-pending-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: vpDot 1.2s ease-in-out infinite;
}
.voice-pending-dots span:nth-child(2) { animation-delay: 0.2s; }
.voice-pending-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes vpDot {
  0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
  40%          { transform: scale(1);   opacity: 1; }
}

/* Responsive: mic button already 38x38 — stays within input row at ≤820px
   Chat footer already flex with gap:8px; mic fits naturally.
   Pill is inline in the header — no overflow needed. */
@media (max-width: 820px) {
  .voice-status-pill {
    font-size: 9px;
    gap: 5px;
  }
  .vsp-bars { height: 10px; }
}
