/* ═══════════════════════════════════════════════════════════
   OPFORGE — Landing Page Styles
   Palette: warm paper base / deep-ember accent / iron text
   ═══════════════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────────────── */
:root {
  --iron:        #1E1A16;
  --iron-mid:    #2C2720;
  --paper:       #F5F0EB;
  --paper-dark:  #EDE7DF;
  --ember:       #C0401A;
  --ember-hover: #A83516;
  --ember-wash:  #FEF0EA;
  --white:       #FFFFFF;
  --muted:       #6E6F73;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius:    8px;
  --radius-lg: 12px;

  --max-w: 1160px;
  --pad-x: 140px;
}

@media (max-width: 1280px) { :root { --pad-x: 60px; } }
@media (max-width: 900px)  { :root { --pad-x: 32px; } }
@media (max-width: 640px)  { :root { --pad-x: 20px; } }

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--iron);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; padding: 0; }

/* ─── UTILITIES ──────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}
.eyebrow--bright { color: var(--ember); }
.eyebrow--ember  { color: var(--ember); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  border: none;
}

.btn-ember {
  background: var(--ember);
  color: var(--white);
}
.btn-ember:hover {
  background: var(--ember-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192,64,26,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--iron);
  border: 1px solid rgba(30,26,22,0.22);
}
.btn-ghost:hover {
  color: var(--ember);
  border-color: var(--ember);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ─── SECTION TRANSITIONS — removed ─────────────────────── */
.section-transition { display: none; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--paper-dark);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 14px;
  height: 14px;
  background: var(--ember);
  border-radius: 2px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--iron);
  letter-spacing: -0.01em;
}
.logo--muted .logo-text { color: rgba(255,255,255,0.7); }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(rgba(30,26,22,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,26,22,0.055) 1px, transparent 1px),
    var(--white);
  background-size: 48px 48px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Vignette fades grid at edges, keeps centre clean */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 35%, var(--white) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  padding: 64px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-headline {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--iron);
}

.hero-sub {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* ─── PROBLEM ─────────────────────────────────────────────── */
.problem {
  background: var(--paper);
  padding: 96px 0;
  position: relative;
}

.problem-header {
  margin-bottom: 56px;
  text-align: center;
}

.problem-headline {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--iron);
  max-width: 820px;
  margin: 0 auto;
}

.stats-block {
  display: flex;
  flex-direction: column;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 36px 0;
  border-top: 1px solid rgba(30,26,22,0.1);
}
.stat-row:last-child { border-bottom: 1px solid rgba(30,26,22,0.1); }

.stat-value {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ember);
  line-height: 1;
  flex-shrink: 0;
  width: 200px;
}

.stat-desc {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--iron);
  flex: 1;
}

/* ─── COMPARISON CHART ────────────────────────────────────── */
.comparison-chart {
  margin-top: 56px;
  padding-top: 0;
}

.comparison-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot--without { background: rgba(30,26,22,0.18); }
.legend-dot--with    { background: var(--ember); }

.comparison-rows {
  display: flex;
  flex-direction: column;
}

.comparison-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 40px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(30,26,22,0.06);
}

.comparison-metric {
  font-size: 15px;
  font-weight: 600;
  color: var(--iron);
  line-height: 1.4;
}

.dir-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--ember);
  margin-left: 4px;
}

.bar-pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-track {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-rail {
  flex: 1;
  height: 8px;
  background: rgba(30,26,22,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  min-width: 0;
}
.bar-fill--without { background: rgba(30,26,22,0.18); }
.bar-fill--with    { background: var(--ember); }

.bar-val {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  width: 90px;
}
.bar-val--without { color: var(--muted); }
.bar-val--with    { color: var(--ember); }

@media (max-width: 900px) {
  .comparison-row { grid-template-columns: 180px 1fr; gap: 0 24px; }
  .bar-val { width: 80px; }
}

@media (max-width: 640px) {
  .comparison-chart { margin-top: 40px; padding-top: 36px; }
  .comparison-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 0;
  }
  .bar-val { width: 70px; font-size: 12px; }
}

/* ─── ROTATING QUESTIONS ─────────────────────────────────── */
.rotating-questions {
  margin: 48px 0 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rotating-questions-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rotating-question {
  font-size: clamp(15px, 1.4vw, 17px);
  font-style: italic;
  color: var(--iron);
  line-height: 1.6;
  max-width: 680px;
  min-height: 28px;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.rotating-question::before {
  content: '\201C';
  color: var(--ember);
  font-style: normal;
  font-weight: 700;
  margin-right: 1px;
}
.rotating-question::after {
  content: '\201D';
  color: var(--ember);
  font-style: normal;
  font-weight: 700;
  margin-left: 1px;
}
.rotating-question.is-fading { opacity: 0; }

/* ─── SOLUTION ─────────────────────────────────────────────── */
.solution {
  background: var(--white);
  padding: 96px 0;
  position: relative;
}

.solution-header {
  text-align: center;
  margin-bottom: 56px;
}

.solution-headline {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--iron);
  max-width: 820px;
  margin: 0 auto;
}

.steps {
  display: flex;
  flex-direction: column;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid rgba(30,26,22,0.1);
}
.step:last-child { border-bottom: 1px solid rgba(30,26,22,0.1); }

.step-num {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ember);
  flex-shrink: 0;
  width: 44px;
  padding-top: 6px;
}

.step-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-body h3 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--iron);
}
.step-body p {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}

/* ─── PRODUCT TOUR ─────────────────────────────────────────── */
.product-tour {
  background: var(--paper);
  padding-top: 96px;
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}

.tour-header {
  text-align: center;
  margin-bottom: 48px;
}

.tour-headline {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--iron);
}

/* Carousel — horizontally-scrolling flex track.
   background-size: 180% auto crops 1440×796 SVG to show the app screenshot
   background-position: 50% −(0.075 × slide-width) positions it correctly */
.carousel-viewport {
  width: 100%;
  max-width: 100%;
  height: 510px; /* 486px slide + 24px for shadow room below */
  overflow: hidden;
  position: relative;
  margin-bottom: 32px;
  transform: translateZ(0);
}

.carousel-track {
  display: flex;
  gap: 28px;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  width: 720px;
  height: 486px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  background-color: var(--paper-dark);
  box-shadow: 4px 6px 14px rgba(30,26,22,0.18);
}

/* slide backgrounds */
.carousel-slide[data-index="0"] { background-image: url('assets/slide-1-campaign-setup.png'); }
.carousel-slide[data-index="1"] { background-image: url('assets/slide-2-interview.png'); }
.carousel-slide[data-index="2"] { background-image: url('assets/slide-3-swimlane.png'); }
.carousel-slide[data-index="3"] { background-image: url('assets/slide-4-process-report.png'); }

.slide-dim {
  position: absolute;
  inset: 0;
  background: rgba(245,240,235,0.72);
  border-radius: var(--radius);
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.carousel-slide.is-active .slide-dim { opacity: 0; }

/* Edge fades */
.carousel-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 160px;
  pointer-events: none;
  z-index: 2;
}
.carousel-fade--left  { left: 0;  background: linear-gradient(to right, #F5F0EB, rgba(245,240,235,0)); }
.carousel-fade--right { right: 0; background: linear-gradient(to left,  #F5F0EB, rgba(245,240,235,0)); }

/* Nav buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ember);
  color: var(--white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.carousel-btn:hover { background: var(--ember-hover); }
.carousel-btn--prev { left: 24px; }
.carousel-btn--next { right: 24px; }

/* Dots + caption */
.carousel-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(30,26,22,0.18);
  transition: background 0.2s, transform 0.2s;
  border: none; cursor: pointer; padding: 0;
}
.carousel-dot.is-active { background: var(--ember); transform: scale(1.25); }

.carousel-caption {
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.6;
  color: var(--iron);
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  min-height: 56px;
  transition: opacity 0.25s ease;
  padding: 0 var(--pad-x);
}
.carousel-caption.is-fading { opacity: 0; }

/* Step tab navigation */
.carousel-thumbs {
  display: flex;
  border-top: 1px solid rgba(30,26,22,0.1);
  margin-top: -1px;
}

.thumb {
  flex: 1;
  padding: 14px 8px 12px;
  border-top: 2px solid transparent;
  border-bottom: none; border-left: none; border-right: none;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-top: -1px;
}

.thumb.is-active { border-top-color: var(--ember); }

.thumb-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  transition: color 0.2s;
  white-space: nowrap;
}
.thumb.is-active .thumb-label { color: var(--ember); }
.thumb:hover:not(.is-active) .thumb-label { color: var(--iron); }

/* ─── CTA ─────────────────────────────────────────────────── */
.cta {
  background: var(--white);
  padding: 112px 0;
  text-align: center;
  position: relative;
}

.cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-headline {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--iron);
  max-width: 660px;
}

.cta-sub {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--muted);
}

.cta-note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  opacity: 0.8;
}

/* ─── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--iron-mid);
  padding: 48px var(--pad-x);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

/* ─── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE: TABLET (≤ 900px) ──────────────────────── */
@media (max-width: 900px) {
  .problem, .solution, .product-tour, .cta { padding-top: 80px; padding-bottom: 80px; }

  .stat-row { gap: 28px; }
  .stat-value { width: auto; }

  .step { gap: 24px; }

  .carousel-viewport { height: 388px; }
  .carousel-slide { width: 540px; height: 364px; }
  .carousel-fade { width: 80px; }
  .thumb-label { font-size: 10px; }
}

/* ─── RESPONSIVE: MOBILE (≤ 640px) ──────────────────────── */
@media (max-width: 640px) {
  /* Nav */
  .nav { height: 56px; }
  .hero { padding-top: 56px; }
  .nav-actions .btn-lg { padding: 8px 14px; font-size: 13px; }

  /* Hero */
  .hero-content { padding: 48px var(--pad-x); gap: 20px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Sections */
  .problem, .solution, .product-tour, .cta { padding-top: 64px; padding-bottom: 64px; }

  /* Problem */
  .problem-header { text-align: left; margin-bottom: 40px; }
  .stat-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px 0; }
  .stat-value { width: auto; }

  /* Solution */
  .solution-header { text-align: left; margin-bottom: 40px; }
  .step { flex-direction: column; gap: 6px; padding: 28px 0; }
  .step-num { padding-top: 0; width: auto; }

  /* Carousel */
  .carousel-viewport { height: 244px; }
  .carousel-slide { width: 300px; height: 220px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 14px; }
  .carousel-btn--prev { left: 10px; }
  .carousel-btn--next { right: 10px; }
  .carousel-btn { display: none; } /* swipe handles navigation on mobile */
  .carousel-thumbs { display: none; } /* dots nav takes over on mobile */
  .carousel-caption { min-height: 0; padding: 0; }

  /* Tour */
  .tour-header { text-align: left; margin-bottom: 32px; }

  /* CTA */
  .cta { padding: 72px 0; }

  /* Footer */
  .footer-top { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ─── RESPONSIVE: SMALL PHONES (≤ 390px) ────────────────── */
@media (max-width: 390px) {
  .nav-actions { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
