/* OTR Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base */
html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
  background-color: var(--color-void);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

h1 {
  font-size: clamp(2.5rem, 8vw, var(--font-size-5xl));
}

h2 {
  font-size: clamp(2rem, 5vw, var(--font-size-3xl));
}

h3 {
  font-size: var(--font-size-xl);
}

p {
  max-width: 65ch;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-accent-light) 40%, var(--color-deep-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

section {
  padding: var(--space-24) 0;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-4) 0;
  background: rgba(var(--color-void-rgb), 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(var(--color-void-rgb), 0.95);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.nav__logo svg {
  width: 32px;
  height: 32px;
}

.logo-ring--outer {
  transform-box: fill-box;
  transform-origin: center;
  animation: logoPulse 3s ease-in-out infinite;
  stroke: var(--color-teal);
  opacity: 0.15;
}

.logo-ring--middle {
  transform-box: fill-box;
  transform-origin: center;
  animation: logoPulse 3s ease-in-out infinite 0.4s;
  stroke: var(--color-deep-orange);
  opacity: 0.2;
}

.logo-core {
  fill: var(--color-orange);
  opacity: 0.8;
}

.logo-pupil {
  fill: var(--color-void);
}

.logo-truck {
  stroke: var(--color-text-muted);
}

.logo-wheel {
  fill: var(--color-text-muted);
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.1; transform: scale(0.92); }
  50%      { opacity: 0.9; transform: scale(1.08); }
}

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

.nav__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav__link:hover {
  color: var(--color-text-primary);
}

.nav__cta {
  display: none;
}

@media (min-width: 768px) {
  .nav__cta {
    display: block;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-orange));
  color: var(--color-void);
  box-shadow: var(--shadow-glow-sm);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-orange));
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-border-light);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.btn--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-32) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--color-orange-subtle) 0%, var(--color-maroon-subtle) 35%, transparent 65%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  margin-bottom: var(--space-6);
  letter-spacing: var(--letter-spacing-tighter);
}

.hero__scenarios {
  height: 1.3em;
  overflow: hidden;
  display: block;
  color: var(--color-maroon-muted);
}

.hero__scenario {
  display: block;
  line-height: 1.3;
  animation: cycleText 9s ease-in-out infinite;
}

@keyframes cycleText {
  0%, 30% {
    transform: translateY(0);
  }
  33%, 63% {
    transform: translateY(-100%);
  }
  66%, 96% {
    transform: translateY(-200%);
  }
  100% {
    transform: translateY(-300%);
  }
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  animation: float 3s ease-in-out infinite;
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
}

/* Problem Section */
.problem {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.problem__grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .problem__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.problem__stat {
  text-align: center;
  padding: var(--space-8);
}

.problem__number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-maroon-muted);
  line-height: 1;
  letter-spacing: var(--letter-spacing-tighter);
  margin-bottom: var(--space-2);
}

.problem__label {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

/* How It Works Section */
.how-it-works {
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-4);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.steps {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.step:hover {
  border-color: var(--color-teal-muted);
  box-shadow: 0 0 20px var(--color-teal-subtle);
}

.step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-teal-subtle);
  border: 1px solid var(--color-teal-muted);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-teal-light);
  margin-bottom: var(--space-6);
}

.step__title {
  margin-bottom: var(--space-3);
}

.step__description {
  color: var(--color-text-secondary);
}

/* Features Section */
.features {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.features__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature {
  padding: var(--space-6);
  background: var(--color-void);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 15px var(--color-brick-subtle);
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-surface), var(--color-maroon-subtle));
  border-radius: var(--radius-md);
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
}

.feature__icon svg {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.feature__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.feature__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Playbooks Section */
.playbooks__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .playbooks__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .playbooks__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.playbook {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.playbook:hover {
  border-color: rgba(232, 128, 5, 0.3);
}

.playbook__icon {
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.playbook__icon svg {
  color: var(--color-deep-orange-muted);
  flex-shrink: 0;
}

.playbook__content {
  flex: 1;
}

.playbook__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.playbook__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* CTA Section */
.cta {
  text-align: center;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center bottom, var(--color-deep-orange-subtle) 0%, var(--color-brick-subtle) 30%, transparent 65%);
  pointer-events: none;
}

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

.cta__title {
  margin-bottom: var(--space-6);
}

.cta__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 640px) {
  .cta__actions {
    flex-direction: row;
    justify-content: center;
  }
}

.cta__note {
  margin-top: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Footer */
.footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.footer__brand svg {
  width: 24px;
  height: 24px;
}

.footer__links {
  display: flex;
  gap: var(--space-6);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-text-primary);
}

.footer__copy {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Phone Mockup */
.phone-mockup {
  position: relative;
  max-width: 300px;
  margin: var(--space-12) auto 0;
}

.phone-mockup__frame {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 40px;
  padding: var(--space-2);
  box-shadow: var(--shadow-lg), 0 0 30px var(--color-brick-subtle);
}

.phone-mockup__screen {
  background: var(--color-void);
  border-radius: 32px;
  padding: var(--space-4);
  min-height: 400px;
}

.phone-mockup__notch {
  width: 100px;
  height: 24px;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
}

.phone-mockup__chat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  line-height: 1.35;
  text-align: left;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--color-border-light);
  color: var(--color-text-primary);
  border-bottom-right-radius: 4px;
}

.chat-bubble--bot {
  align-self: flex-start;
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble--typing {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-4);
}

.chat-bubble--typing span {
  width: 8px;
  height: 8px;
  background: var(--color-text-muted);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.chat-bubble--typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-bubble--typing span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Phone Mockup – light mode contrast boost */
[data-mode="light"] .phone-mockup__frame {
  border-color: var(--color-border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-mode="light"] .phone-mockup__screen {
  background: var(--color-surface-raised);
}

[data-mode="light"] .phone-mockup__notch {
  background: var(--color-border);
}

[data-mode="light"] .chat-bubble--bot {
  background: var(--color-void);
  border: 1px solid var(--color-border);
}

[data-mode="light"] .chat-bubble--user {
  background: var(--color-border);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Hero Truck Illustration */
.hero__illustration {
  max-width: 500px;
  margin: var(--space-10) auto 0;
  color: var(--color-text-muted);
}

.hero__illustration svg {
  width: 100%;
  height: auto;
}

.hero-beacon--core {
  opacity: 0.9;
}

.hero-beacon--ring1 {
  transform-box: fill-box;
  transform-origin: center;
  stroke: var(--color-teal);
  animation: logoPulse 3s ease-in-out infinite;
}

.hero-beacon--ring2 {
  transform-box: fill-box;
  transform-origin: center;
  stroke: var(--color-deep-orange);
  animation: logoPulse 3s ease-in-out infinite 0.4s;
}

.hero-beacon--ring3 {
  transform-box: fill-box;
  transform-origin: center;
  stroke: var(--color-teal);
  animation: logoPulse 3s ease-in-out infinite 0.8s;
}

@media (max-width: 639px) {
  .hero__illustration {
    display: none;
  }
}

/* Road-line Section Dividers */
.road-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  color: var(--color-accent-muted, var(--color-text-muted));
  opacity: 0.3;
}

.road-divider svg {
  width: 100%;
  height: 4px;
  display: block;
  animation: roadDash 8s linear infinite;
}

/* Tire-tread texture accent */
.problem,
.playbooks {
  position: relative;
}

.problem::after,
.playbooks::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--color-border) 0.5px, transparent 0.5px);
  background-size: 8px 8px;
  opacity: 0.1;
  pointer-events: none;
}

/* Mobile fixes */
@media (max-width: 639px) {
  /* Hide nav links, show only logo + CTA */
  .nav__links { display: none; }
  .nav__cta   { display: block; }

  /* Tame section spacing */
  section { padding: var(--space-12) 0; }

  /* Hero: reduce height and padding */
  .hero {
    min-height: auto;
    padding: var(--space-24) 0 var(--space-12);
  }
  .hero__subtitle { font-size: var(--font-size-base); }

  /* Keep scenario text on one line so the cycling animation doesn't clip mid-phrase */
  .hero__scenarios { font-size: clamp(1.25rem, 5.5vw, 2.5rem); }

  /* Hide scroll indicator (not useful on touch) */
  .hero__scroll { display: none; }

  /* Shrink phone mockup */
  .phone-mockup        { max-width: 260px; }
  .phone-mockup__screen { min-height: 320px; }

  /* Smaller stat numbers */
  .problem__number { font-size: var(--font-size-3xl); }
  .problem__stat   { padding: var(--space-4); }

  /* Ensure tap-friendly buttons */
  .btn           { min-height: 44px; width: 100%; }
  .btn--small    { min-height: 44px; display: inline-flex; align-items: center; }
  .nav__cta.btn  { width: auto; }
}
