/* ==========================================================================
   OverToBot — Page-specific layouts
   ========================================================================== */

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.8; }
.hero__glow {
  position: absolute;
  z-index: -1;
  width: 900px; height: 700px;
  right: -260px; top: -260px;
  background: radial-gradient(closest-side, rgba(76, 195, 255, 0.16), transparent);
  pointer-events: none;
}
.hero__glow--2 { right: auto; left: -380px; top: 240px; width: 700px; height: 600px; background: radial-gradient(closest-side, rgba(91, 124, 255, 0.1), transparent); }
.hero .bg-grid { z-index: -1; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero__content > * + * { margin-top: 26px; }
.hero__content .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.hero__actions { margin-top: 36px; }
.hero__capabilities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding: 0; list-style: none; }

/* Pipeline visual */
.pipeline {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(148, 176, 214, 0.08), rgba(148, 176, 214, 0.02));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
:root[data-theme="light"] .pipeline { background: rgba(255, 255, 255, 0.85); }
.pipeline__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.pipeline__dots { display: flex; gap: 6px; margin-right: 8px; }
.pipeline__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.pipeline__live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--success); }
.pipeline__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.18); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.pipeline__list { position: relative; display: grid; gap: 10px; margin: 0; padding: 22px; list-style: none; }
.pipeline__track { position: absolute; left: 44px; top: 44px; bottom: 44px; width: 1px; background: linear-gradient(var(--border-strong), var(--accent-line), var(--border-strong)); }
.pipeline__pulse { position: absolute; left: -3px; top: 0; width: 7px; height: 36px; border-radius: 4px; background: linear-gradient(transparent, var(--accent), transparent); animation: pulse-travel 5s var(--ease) infinite; }
@keyframes pulse-travel { 0% { top: -10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.pipeline__stage {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px 12px 0;
  border-radius: 12px;
  animation: stage-glow 5s var(--ease) infinite;
}
.pipeline__stage:nth-child(3) { animation-delay: 0.9s; }
.pipeline__stage:nth-child(4) { animation-delay: 1.8s; }
.pipeline__stage:nth-child(5) { animation-delay: 2.7s; }
.pipeline__stage:nth-child(6) { animation-delay: 3.6s; }
.pipeline__stage .icon-tile { position: relative; z-index: 1; background: var(--surface-solid); width: 44px; height: 44px; }
.pipeline__label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.pipeline__title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: 0; margin-top: 2px; }
.pipeline__meta { font-size: 0.8rem; color: var(--text-3); margin-top: 2px; }
.pipeline__state { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); }
.pipeline__stage--core { background: linear-gradient(90deg, var(--accent-soft), transparent 80%); }
.pipeline__stage--core .icon-tile { box-shadow: 0 0 0 5px var(--accent-soft); }
.pipeline__stage--core .pipeline__state { color: var(--accent); border-color: var(--accent-line); }
.pipeline__stage--result .pipeline__state { color: var(--success); border-color: rgba(61, 220, 151, 0.35); }
@keyframes stage-glow { 0%, 100% { opacity: 0.78; } 8%, 20% { opacity: 1; } }

/* ---------- Home: "more than a model" layers ---------- */
.layers { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 550;
  font-size: 0.95rem;
}
.layer span { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: var(--text-3); letter-spacing: 0.06em; }
.layer--model { border-color: var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--accent); width: 62%; margin-inline: auto; justify-content: center; }
.layer:nth-child(2) { width: 72%; margin-inline: auto; }
.layer:nth-child(3) { width: 80%; margin-inline: auto; }
.layer:nth-child(4) { width: 86%; margin-inline: auto; }
.layer:nth-child(5) { width: 92%; margin-inline: auto; }
.layer:nth-child(6) { width: 96%; margin-inline: auto; }

/* ---------- Industries ---------- */
.industry { display: flex; flex-direction: column; gap: 14px; }
.industry h3 { font-size: 1.05rem; }
.industry p { font-size: 0.9rem; color: var(--text-2); }

/* ---------- Stat-free highlight row (capabilities) ---------- */
.capability-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.capability-row > div { padding: 28px 24px 28px 0; }
.capability-row > div + div { padding-left: 24px; border-left: 1px solid var(--border); }
.capability-row h3 { font-size: 1rem; margin-top: 12px; }
.capability-row p { font-size: 0.88rem; color: var(--text-2); margin-top: 6px; }
.capability-row .icon { width: 22px; height: 22px; color: var(--accent); }

/* ---------- Service detail rows (services page) ---------- */
.service-detail { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 36px 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 24px); }
.service-detail:last-child { border-bottom: 1px solid var(--border); }
.service-detail__num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); padding-top: 6px; }
.service-detail h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.service-detail__text > * + * { margin-top: 12px; }
.service-detail__text p { color: var(--text-2); }

/* ---------- About ---------- */
.principles { counter-reset: principle; }
.principle { padding: 26px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 60px 1fr; gap: 20px; }
.principle::before { counter-increment: principle; content: counter(principle, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding-top: 4px; }
.principle h3 { font-size: 1.1rem; }
.principle p { margin-top: 8px; color: var(--text-2); }

/* ---------- Prose (legal & long-form) ---------- */
.prose { color: var(--text-2); font-size: 1rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 2vw, 1.6rem); color: var(--text); }
.prose h3 { margin-top: 1.8em; font-size: 1.1rem; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; }
.legal-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-3); }
.legal-note { margin-top: 24px; }

/* ---------- Contact & consultation ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.8fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.form-card { padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.contact-aside { position: sticky; top: calc(var(--header-h-compact) + 24px); display: grid; gap: 16px; }
.contact-aside .card h2 { font-size: 1.05rem; }
.next-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.next-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 0.9rem; color: var(--text-2); }
.next-steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent-line); color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; }
.next-steps strong { color: var(--text); display: block; }

.assistant-prompt { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 20px 24px; margin-bottom: 28px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), transparent); }
.assistant-prompt p { font-size: 0.92rem; color: var(--text-2); }
.assistant-prompt strong { color: var(--text); display: block; font-size: 1rem; margin-bottom: 2px; }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found__code { font-family: var(--font-mono); color: var(--accent); letter-spacing: 0.2em; }

/* ---------- AI advantage: relay-race animation (human → robot) ---------- */
.relay { margin: 0; }
.relay__stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(420px 220px at 85% 10%, rgba(76, 195, 255, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), transparent 80%),
    var(--bg-2);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.relay__svg { width: 100%; height: auto; display: block; aspect-ratio: 800 / 262; }
.relay.is-narrow .relay__svg { aspect-ratio: 440 / 262; }
.relay__svg text { font-family: var(--font-mono); letter-spacing: 0.14em; }

.relay__ground { stroke: var(--border-strong); stroke-width: 2; }
.relay__lane { stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 10 12; }
.relay__ticks line { stroke: var(--border-strong); stroke-width: 1.5; }
.relay__zone rect { fill: var(--accent-soft); }
.relay__zone text { fill: var(--accent); font-size: 10px; opacity: 0.8; }
.relay__finish line { stroke: var(--text-3); stroke-width: 3; stroke-linecap: round; }
.relay__check { fill: var(--text-2); }
.relay__done rect { fill: var(--accent-soft); stroke: var(--accent-line); }
.relay__done text { fill: var(--success); font-size: 11px; font-weight: 600; }

.relay__human line,
.relay__human path { stroke: var(--text); stroke-width: 9; stroke-linecap: round; fill: none; }
.relay__human .relay__torso { stroke-width: 12; }
.relay__head { fill: var(--text); }
.relay__human .relay__band { stroke: var(--warning); stroke-width: 4; }
.relay__human .relay__band--tail { stroke-width: 3; }
.relay__limb--b { opacity: 0.5; }
.relay__baton { fill: url(#relay-baton-grad); stroke: none; }
.relay__stop-a { stop-color: #ffc861; }
.relay__stop-b { stop-color: #ff9d4d; }

.relay__metal { fill: var(--text-2); }
.relay__joint { fill: var(--accent); }
.relay__shell { fill: var(--surface-solid); stroke: var(--accent); stroke-width: 2.5; }
.relay__core { fill: var(--accent); }
.relay__visor { fill: var(--accent-2); }
.relay__antenna { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.relay__speed line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: 0.55; }
.relay__speed line:nth-child(even) { stroke: var(--accent-2); opacity: 0.35; }

.relay__label { fill: var(--text-3); font-size: 10px; }
.relay__label--ai { fill: var(--accent); }

.relay__toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--glass);
  color: var(--text-2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.relay__toggle:hover { color: var(--text); border-color: var(--accent-line); }
.relay__toggle .icon { width: 16px; height: 16px; }
.relay__toggle .icon--play { display: none; fill: currentColor; stroke: none; }
.relay.is-paused .relay__toggle .icon--play { display: block; }
.relay.is-paused .relay__toggle .icon--pause { display: none; }

.relay__caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 0.9rem; color: var(--text-2); }
.relay__caption-step { padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); }
.relay__caption-step--ai { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.relay__caption-arrow { color: var(--accent); }

/* ---------- AI advantage: benefits ---------- */
.benefit { display: flex; flex-direction: column; gap: 12px; }
.benefit h3 { font-size: 1.02rem; }
.benefit p { font-size: 0.9rem; color: var(--text-2); }
.expert-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
}
.expert-note h3 { font-size: 1.1rem; }
.expert-note p { margin-top: 6px; color: var(--text-2); }
@media (max-width: 640px) { .expert-note { grid-template-columns: 1fr; padding: 20px; } }
.advantage-head { align-items: end; }
.advantage-scene { margin-top: clamp(32px, 5vw, 56px); }
@media (max-width: 640px) { .relay__caption-arrow { display: none; } }
