/* ═══════════════════════════════════════════════════════════════
   OCTOPILOT — Section Styles
   Per-section visual treatment: Hero → Footer
   ═══════════════════════════════════════════════════════════════ */


/* ────────────────────────────────────
   1. HERO / Command Arrival
   ──────────────────────────────────── */

.hero {
  position: relative;
  min-height: 115vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
  padding-top: 96px;
  padding-bottom: var(--space-3xl);
}

/* Layered background atmosphere */
.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 25%, rgba(180, 14, 26, 0.22), transparent 40%),
    radial-gradient(ellipse at 78% 15%, rgba(100, 8, 14, 0.18), transparent 35%),
    radial-gradient(ellipse at 50% 80%, rgba(60, 4, 8, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, #030203 100%);
  z-index: 0;
}

/* Vignette */
.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

/* Tagline — centered at top */
.hero__header {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: var(--space-xl) var(--space-2xl) 0;
  max-width: 1100px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 0;
  white-space: nowrap;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.6);
}

.hero__title-accent {
  color: var(--accent-bright);
}

/* Robot — center stage */
.hero__robot-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: visible;
}

.hero__spline-wrap {
  position: relative;
  width: 100%;
  height: clamp(560px, 72vh, 900px);
  overflow: visible;
  contain: layout paint;
}

/* Canvas overflows container — shows full robot including arms */
.hero__spline-wrap canvas {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 124% !important;
  height: 144% !important;
  pointer-events: none !important;
  will-change: transform;
}

.hero__spline-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
}

/* Gradient fade covers the extended canvas — blends into bg for 3D depth */
.hero__spline-wrap::after {
  content: "";
  position: absolute;
  top: -22%;
  bottom: -22%;
  left: -12%;
  right: -12%;
  background:
    radial-gradient(ellipse 58% 42% at 50% 45%, transparent 28%, var(--bg-deep) 100%),
    linear-gradient(to right,  var(--bg-deep) 0%,  transparent 18%, transparent 82%,  var(--bg-deep) 100%),
    linear-gradient(to top,    var(--bg-deep) 0%,  transparent 22%),
    linear-gradient(to bottom, var(--bg-deep) 0%,  transparent 20%);
  pointer-events: none;
  z-index: 4;
}

/* Spline loading fallback glow */
.hero__spline-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(196, 20, 32, 0.15), transparent 60%);
  transition: opacity 0.6s;
}

.hero__spline-fallback.is-loaded {
  opacity: 0;
  pointer-events: none;
}

/* CTAs — bottom */
.hero__footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl) var(--space-2xl) 0;
}

/* Soft divider above CTAs */
.hero__footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-content);
}


/* ────────────────────────────────────
   2. POSITIONING STATEMENT
   ──────────────────────────────────── */

.positioning {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.positioning__statement {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin: 0 auto var(--space-xl);
  color: var(--text-primary);
}

.positioning__statement em {
  font-style: normal;
  color: var(--accent-bright);
}

.positioning__body {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 60ch;
  margin: 0 auto;
}


/* ────────────────────────────────────
   3. OS PILLARS
   ──────────────────────────────────── */

.pillars {
  padding: var(--space-4xl) 0;
}

.pillars__grid {
  max-width: 840px;
  margin: 0 auto;
}

/* Connecting line between pillars */
.pillars__grid .pillar {
  position: relative;
}

.pillars__grid .pillar::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-dim), var(--border));
  opacity: 0.4;
}

.pillars__grid .pillar:first-child::before {
  top: 50%;
}

.pillars__grid .pillar:last-child::before {
  bottom: 50%;
}


/* ────────────────────────────────────
   4. WORKFLOW SEQUENCE
   ──────────────────────────────────── */

.workflow {
  padding: var(--space-4xl) 0;
  overflow: hidden;
}

.workflow__rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  position: relative;
  padding: 0;
}

/* Remove old horizontal line */
.workflow__rail::before {
  display: none;
}

.workflow__stage {
  position: relative;
  z-index: 1;
}

/* Hide old signal dots */
.workflow__signal {
  display: none;
}

.workflow__stage-inner {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  height: 100%;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: default;
}

/* Accent top bar — reveals on hover */
.workflow__stage-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.workflow__stage-inner:hover {
  border-color: var(--border-accent);
  background: rgba(196, 20, 32, 0.05);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.workflow__stage-inner:hover::before {
  opacity: 1;
}

.workflow__stage-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent-dim);
  opacity: 0.38;
  line-height: 1;
  margin-bottom: var(--space-md);
  transition: opacity 0.4s;
}

.workflow__stage-inner:hover .workflow__stage-number {
  opacity: 0.65;
}

.workflow__stage-title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.workflow__stage-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.65;
}

/* Abstract UI preview inside workflow */
.workflow__preview {
  margin-top: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}


/* ────────────────────────────────────
   5. FEATURE ARCHITECTURE
   ──────────────────────────────────── */

.features {
  padding: var(--space-4xl) 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: var(--space-md);
}

/* Asymmetric layout: first 2 cards are large, span 2 cols */
.features__grid .card:nth-child(1) {
  grid-column: span 2;
  grid-row: span 1;
}

.features__grid .card:nth-child(2) {
  grid-column: span 2;
  grid-row: span 1;
}

/* Cards 3-5 split across second row */
/* Card backgrounds mesh */
.features__grid .card {
  position: relative;
}

.features__grid .card .card__mesh {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.04;
  background:
    radial-gradient(circle at 20% 80%, var(--accent), transparent 50%);
  pointer-events: none;
  transition: opacity 0.4s;
}

.features__grid .card:hover .card__mesh {
  opacity: 0.08;
}


/* ────────────────────────────────────
   6. AMBASSADOR / Brand Statement
   ──────────────────────────────────── */

.ambassador {
  padding: var(--space-5xl) 0;
  overflow: hidden;
}

.ambassador__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

/* Centered variant (no image) */
.ambassador--centered .ambassador__inner {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.ambassador--centered .ambassador__tagline {
  border-left: none;
  padding-left: 0;
}

.ambassador--centered .ambassador__attributes {
  max-width: 420px;
  margin: 0 auto;
}

/* Left: Copy */
.ambassador__copy {
  position: relative;
  z-index: 2;
}

.ambassador__headline {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5.5vw, 6rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: var(--space-lg) 0 var(--space-xl);
  color: var(--text-primary);
}

.ambassador__headline-accent {
  display: block;
  color: var(--accent-bright);
  text-shadow: 0 0 60px rgba(220, 30, 42, 0.35);
}

.ambassador__tagline {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  color: var(--text-secondary);
  line-height: 1.35;
  font-weight: 300;
  letter-spacing: -0.01em;
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent-dim);
  margin-bottom: var(--space-2xl);
}

/* Attribute bars */
.ambassador__attributes {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ambassador__attr {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.ambassador__attr-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  width: 80px;
  flex-shrink: 0;
}

.ambassador__attr-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.ambassador__attr-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}

.is-visible .ambassador__attr-bar span {
  transform: scaleX(1);
}

.ambassador__attributes .ambassador__attr:nth-child(1) .ambassador__attr-bar span { transition-delay: 0.3s; }
.ambassador__attributes .ambassador__attr:nth-child(2) .ambassador__attr-bar span { transition-delay: 0.5s; }
.ambassador__attributes .ambassador__attr:nth-child(3) .ambassador__attr-bar span { transition-delay: 0.7s; }
.ambassador__attributes .ambassador__attr:nth-child(4) .ambassador__attr-bar span { transition-delay: 0.9s; }

/* Right: Visual */
.ambassador__visual {
  position: relative;
  z-index: 1;
}

.ambassador__img-wrap {
  position: relative;
  overflow: hidden;
  /* Fade all edges into the dark background — no hard box */
  -webkit-mask-image:
    radial-gradient(ellipse 92% 88% at 50% 46%, black 48%, transparent 100%);
  mask-image:
    radial-gradient(ellipse 92% 88% at 50% 46%, black 48%, transparent 100%);
}

.ambassador__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Bottom fade handled by the mask-image on .ambassador__img-wrap */

/* Red atmospheric glow beneath image */
.ambassador__img-glow {
  position: absolute;
  bottom: -60px;
  left: 10%;
  right: 10%;
  height: 120px;
  background: radial-gradient(ellipse, rgba(220, 30, 42, 0.2), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}


/* ────────────────────────────────────
   7. TRUST / CONTROL
   ──────────────────────────────────── */

.trust {
  padding: var(--space-4xl) 0;
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.trust__bg {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background:
    linear-gradient(135deg, var(--bg-deep), var(--bg-elevated));
}


/* ────────────────────────────────────
   8. WEB APP SECTION
   ──────────────────────────────────── */

.webapp {
  padding: var(--space-4xl) 0;
}

.webapp__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3xl);
  align-items: center;
}

.webapp__copy {
  max-width: 480px;
}

.webapp__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.webapp__text {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

/* Browser mockup enhancements */
.webapp__mockup .browser-mockup__content {
  position: relative;
  overflow: hidden;
}

/* Animated content lines inside mockup */
.webapp__mockup .mockup-line {
  animation: fade-in 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.webapp__mockup .mockup-line:nth-child(1) { animation-delay: 0.2s; }
.webapp__mockup .mockup-line:nth-child(2) { animation-delay: 0.3s; }
.webapp__mockup .mockup-line:nth-child(3) { animation-delay: 0.4s; }
.webapp__mockup .mockup-line:nth-child(4) { animation-delay: 0.5s; }
.webapp__mockup .mockup-line:nth-child(5) { animation-delay: 0.6s; }
.webapp__mockup .mockup-line:nth-child(6) { animation-delay: 0.7s; }
.webapp__mockup .mockup-line:nth-child(7) { animation-delay: 0.8s; }

/* Stylized sidebar panel inside mockup */
.mockup-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 180px;
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--border);
  padding: var(--space-md);
}

.mockup-sidebar__item {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mockup-sidebar__item--active {
  background: var(--accent-subtle);
  color: var(--accent-bright);
}

/* Content area for the mockup */
.mockup-main {
  margin-left: 196px;
}

.mockup-main__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

/* Command panel placeholder */
.mockup-command {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mockup-command__prompt {
  color: var(--accent);
}


/* ────────────────────────────────────
   9. MAC APP STORE
   ──────────────────────────────────── */

.macapp {
  padding: var(--space-4xl) 0;
}

.macapp__card {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Metallic sheen */
.macapp__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.macapp__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.macapp__icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.macapp__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.macapp__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}


/* ────────────────────────────────────
   10. FINAL CTA
   ──────────────────────────────────── */

.finale {
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Dramatic background glow */
.finale__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(196, 20, 32, 0.12), transparent 60%);
  pointer-events: none;
}

.finale__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.finale__subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.finale__ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}


/* ────────────────────────────────────
   11. FOOTER
   ──────────────────────────────────── */

.site-footer {
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(5, 5, 5, 0.6));
}

/* Top brand area */
.footer__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.footer__hero .nav-brand__logo {
  width: 42px;
  height: 42px;
}

.footer__tagline {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 38ch;
  line-height: 1.6;
}

/* Links grid */
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer__heading {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color 0.3s;
  padding: var(--space-xs) 0;
}

.footer__links a:hover {
  color: var(--accent-bright);
}

/* Company info block */
.footer__company-info {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__company-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.footer__address {
  font-style: normal;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

.footer__founded {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-ghost);
  letter-spacing: 0.08em;
}

/* Bottom bar */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--text-ghost);
  line-height: 1.6;
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease-out);
}

.footer__social a:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.footer__social svg {
  width: 16px;
  height: 16px;
  fill: var(--text-secondary);
}

.footer__social a:hover svg {
  fill: var(--accent-bright);
}
