/* Section-specific styles */

/* ---------- Odds section (changes the odds, process diagram) ---------- */
.odds-section {
  background: var(--bg-soft, #f7f7f5);
}
.odds-diagram {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.odds-row {
  position: relative;
  background: #fff;
  border: 1px solid var(--line, rgba(0,0,0,0.08));
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02), 0 8px 24px -16px rgba(0,0,0,0.08);
}
.odds-label {
  position: absolute;
  top: -12px;
  left: 32px;
  background: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line, rgba(0,0,0,0.08));
}
.odds-label-pro {
  color: var(--brand-blue-deep, #1B7FBF);
}
.odds-label-stalled {
  color: #E84E1B;
}
.odds-stalled-tag {
  position: absolute;
  bottom: -10px;
  left: 32px;
  background: #fff;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #E84E1B;
  border: 1px solid var(--line, rgba(0,0,0,0.08));
}
.odds-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .odds-row { padding: 28px 16px 22px; }
  .odds-label, .odds-stalled-tag { left: 16px; }
}

/* ---------- Pillars ---------- */
.pillar-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 56px;
  overflow-x: auto;
}
.pillar-tab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--on-dark-3);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  transition: color .2s ease, border-color .3s ease;
  white-space: nowrap;
}
.pillar-tab:hover { color: var(--on-dark-2); }
.pillar-tab.active {
  color: var(--on-dark);
  border-bottom-color: var(--accent);
}
.pillar-tab-num {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--on-dark-3);
}
.pillar-tab.active .pillar-tab-num { color: var(--accent); }
.pillar-tab-name { font-size: 18px; font-weight: 500; }

.pillar-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1024px) {
  .pillar-content { grid-template-columns: 1fr; gap: 40px; }
}

.pillar-copy .display-3 { margin-bottom: 16px; }
.pillar-bullets {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pillar-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--on-dark-2);
  font-size: 15px;
  line-height: 1.5;
}
.bullet-mark {
  width: 6px; height: 6px;
  border-radius: 999px;
  margin-top: 8px;
  flex-shrink: 0;
}

.pillar-screen-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-dark-strong);
  box-shadow: var(--shadow-deep);
  aspect-ratio: 4 / 3;
}
.pillar-screen-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  background: linear-gradient(180deg, #1A2438, #131C2D);
  border-bottom: 1px solid var(--line-dark);
}
.pillar-screen-traffic { width: 11px; height: 11px; border-radius: 999px; }
.pillar-screen-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--on-dark-3);
  margin-left: 12px;
}
.pillar-screen-img {
  position: absolute;
  inset: 36px 0 0 0;
  width: 100%;
  height: calc(100% - 36px);
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity .5s ease;
}
.pillar-screen-img.show { opacity: 1; }

/* ---------- Mobile gallery ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tile-grid { grid-template-columns: 1fr; }
}
.tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.tile-img-wrap {
  aspect-ratio: 4 / 5;
  background: #F0F2F5;
  overflow: hidden;
}
.tile-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.tile figcaption {
  padding: 16px 18px 18px;
}
.tile-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
}
.tile-caption { margin-top: 4px; color: var(--ink-3); font-size: 11px; }

/* ---------- Mini Demo ---------- */
/* ---------- Mini Demo (Ask EQALL, autoplay script) ---------- */
.demo-body-single { display: block !important; min-height: 0 !important; }

/* Fixed height so the chat container doesn't reflow as messages stream in.
   Was min-height: 540px + max-height: 640px which let the frame grow from
   540→640. We now lock to a single value at each viewport size:
     • desktop ≥ 720px wide  → 600px tall (no growth, no reflow)
     • mobile  < 720px wide  → 460px tall (still locked, sized for phones)
   The chat scrolls internally if content overflows; auto-scroll keeps the
   latest message in view either way. */
.demo-chat {
  padding: 32px clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 600px;
  overflow-y: auto;
}
@media (max-width: 720px) {
  .demo-chat {
    height: 460px;
    padding: 20px 16px;
  }
}
@media (max-width: 380px) {
  .demo-chat { height: 420px; }
}

.demo-msg-card-row { align-items: flex-start; }
.demo-msg-avatar-spacer { width: 28px; flex-shrink: 0; }

.demo-msg-avatar-img,
.demo-msg-user-avatar-img {
  width: 28px; height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

.demo-msg-user-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-dark);
  display: grid; place-items: center;
  color: var(--on-dark-2);
  flex-shrink: 0;
}

.demo-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  animation: cardPop .35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes cardPop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.demo-card-avatar {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.demo-card-avatar-img { background: #1A1A1A; }
.demo-card-avatar-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.demo-card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(46,163,242,0.16);
  color: #5DBEF7;
  display: grid; place-items: center;
}
.demo-card-title {
  color: var(--on-dark);
  font-weight: 500;
  font-size: 14px;
}
.demo-card-sub {
  color: var(--on-dark-3);
  font-size: 12px;
  margin-top: 2px;
}

.demo-msg { animation: bubbleIn .28s ease both; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.demo-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--line-dark);
  background: rgba(255,255,255,0.02);
}
/* The pill that shows the typed prompt. Locking its height + clipping
   overflow so it never grows or shrinks based on text content. The text
   span is single-line (white-space: nowrap) and clips horizontally —
   same behavior as a real <input type="text"> that's not wide enough. */
.demo-input {
  flex: 1;
  min-width: 0;            /* lets flex item shrink + lets inner overflow clip */
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 14px;         /* vertical padding moved into height calc */
  height: 44px;            /* fixed height — was min-height:22px which let it grow */
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
  font-size: 14px;
  position: relative;
  overflow: hidden;        /* clip any overflow so the pill never reshapes */
}
.demo-input-prompt {
  color: var(--on-dark-3);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity .15s ease;
  white-space: nowrap;
}
.demo-input-text {
  color: var(--on-dark);
  white-space: nowrap;     /* was 'pre' — now strictly single-line */
  overflow: hidden;
  text-overflow: clip;
  min-width: 0;
}
.demo-input:has(.demo-input-text:not(:empty)) .demo-input-prompt { opacity: 0; }
.demo-input-caret {
  display: inline-block;
  width: 1.5px;
  height: 16px;
  background: var(--brand-blue);
  margin-left: 1px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.demo-input-send {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.demo-msg { display: flex; gap: 10px; align-items: flex-start; }
.demo-msg.user { flex-direction: row-reverse; }
.demo-msg-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2EA3F2, #2DD4BF);
  display: grid; place-items: center;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}
.demo-msg-bubble {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 78%;
  white-space: pre-wrap;
}
.demo-msg.ai .demo-msg-bubble {
  background: rgba(255,255,255,0.05);
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
}
.demo-msg.user .demo-msg-bubble {
  background: var(--brand-blue);
  color: #fff;
}
.demo-msg-bubble.typing { display: inline-flex; gap: 4px; padding: 16px 14px; }
.demo-msg-bubble.typing span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--on-dark-3);
  animation: typing 1.2s infinite;
}
.demo-msg-bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.demo-msg-bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.demo-suggestions { display: none; }

/* ---------- Stats ---------- */
.stats-grid { gap: 0; }
.stat-card {
  padding: 40px 32px;
  border: 1px solid var(--line-dark);
  background: rgba(255,255,255,0.02);
  border-radius: 0;
}
.stat-card:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.stat-card:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.stat-card + .stat-card { border-left: 0; }
@media (max-width: 720px) {
  .stat-card { border-radius: 0 !important; border-left: 1px solid var(--line-dark); }
  .stat-card + .stat-card { border-left: 1px solid var(--line-dark); border-top: 0; }
}
.accent-blue-light { color: #5DBEF7; }
.accent-green-light { color: #A8E07C; }

.testimonial {
  margin-top: 96px;
  max-width: 880px;
  position: relative;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  color: var(--brand-blue);
  opacity: 0.4;
  position: absolute;
  top: -40px; left: -20px;
  pointer-events: none;
}
.testimonial-attribution {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

/* ---------- Compare ---------- */
.compare-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 16px;
  overflow-x: auto;
}
.compare-table .col-eqall { background: rgba(46,163,242,0.05); }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table .col-eqall.head {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.patent-badge {
  display: inline-flex;
  margin-left: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(123,200,74,0.16);
  color: var(--brand-green-deep);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  vertical-align: middle;
}
.compare-legend {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  padding: 16px 18px 8px;
  font-size: 11px;
}

/* ---------- Security ---------- */
@media (max-width: 900px) {
  .security-grid { grid-template-columns: 1fr !important; }
}
.security-item { padding: 4px 0; }
.security-check {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(123,200,74,0.16);
  color: var(--brand-green-deep);
  display: grid; place-items: center;
}

/* ---------- Final CTA ---------- */
.final-cta-card {
  position: relative;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(46,163,242,0.18), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(123,200,74,0.12), transparent 60%),
    linear-gradient(180deg, #0F1B2D, #07111F);
  border-radius: var(--r-xl);
  padding: clamp(48px, 8vw, 96px);
  overflow: hidden;
  border: 1px solid var(--line-dark);
}
.final-cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 40% at 50% 50%, rgba(46,163,242,0.22), transparent);
  pointer-events: none;
}

/* ---------- Footer ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr !important; gap: 32px !important; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}
.store-badge {
  display: inline-flex !important;
  padding: 10px 14px !important;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--on-dark) !important;
  font-size: 13px;
  font-weight: 500;
}
.store-badge:hover { background: rgba(255,255,255,0.10); }
