/* ==========================================================================
   InvoiceSensei Landing Page — FEATURE TABLE EDITION
   Based on: Light Editorial / Clean Fintech (landing_claude_light)
   Change: Feature comparison table instead of feature cards
   Fonts: Bricolage Grotesque (display) + IBM Plex Sans (body) + IBM Plex Mono (code)
   Colors: White #FFFFFF, Gold #D4A017, Ink #1A1A2E, Soft Gray #F7F7F8
   ========================================================================== */

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #1A1A2E;
  --ink-light: #2D2D44;
  --ink-mid: #3D3D56;
  --gold: #D4A017;
  --gold-dim: #B8890F;
  --gold-light: #F0D060;
  --gold-glow: rgba(212, 160, 23, 0.1);
  --gold-glow-strong: rgba(212, 160, 23, 0.15);
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --soft-gray: #F4F4F6;
  --border-light: #E8E8EC;
  --border-mid: #D4D4DA;
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A72;
  --text-muted: #8A8A9E;
  --text-dim: #AEAEC0;

  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gold { color: var(--gold); }
.gold-bold { color: var(--gold); font-weight: 600; }

/* ── Reveal Animations ─────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 1px 0 var(--border-light);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.nav__logo-text .gold {
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  letter-spacing: 0.01em;
}

.nav__links a:hover {
  color: var(--gold);
}

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

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn--gold {
  background: var(--gold);
  color: white;
}

.btn--gold:hover {
  background: var(--gold-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(212, 160, 23, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-mid);
}

.btn--outline:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: 10px;
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.825rem;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--soft-gray) 0%, var(--white) 100%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 24px 72px;
  overflow: hidden;
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 160, 23, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 160, 23, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero__content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold-dim);
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--ink);
}

.hero__title .gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

/* ── Hero Visual: Extraction Demo ──────────────────────────────────────── */
.hero__visual {
  margin-top: 64px;
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.extraction-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}

.invoice-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.invoice-card__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.invoice-card__logo-placeholder {
  width: 44px;
  height: 44px;
  background: rgba(212, 160, 23, 0.12);
  border-radius: 10px;
  flex-shrink: 0;
}

.invoice-card__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.line {
  height: 8px;
  background: var(--soft-gray);
  border-radius: 4px;
}

.w30 { width: 30%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w90 { width: 90%; }

.invoice-card__divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

.invoice-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invoice-card__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

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

.invoice-card__amount {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gold);
}

.invoice-card__format {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(212, 160, 23, 0.1);
  color: var(--gold-dim);
  border-radius: 6px;
  letter-spacing: 0.05em;
}

/* Arrow Flow */
.extraction-demo__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.arrow-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.arrow-flow__line {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
  overflow: hidden;
}

.arrow-flow__pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: flow-pulse 2s infinite var(--ease-out-expo);
  box-shadow: 0 0 12px rgba(212, 160, 23, 0.5);
}

@keyframes flow-pulse {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

.arrow-flow__label {
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
}

/* Data Card Output */
.data-card {
  background: var(--white);
  border: 1px solid rgba(212, 160, 23, 0.25);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(212, 160, 23, 0.08);
}

.data-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-card__icon {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.9rem;
}

.data-card__rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  opacity: 0;
  transform: translateX(12px);
  animation: row-appear 0.5s calc(var(--delay) * 0.15s + 1s) var(--ease-out-expo) forwards;
}

.data-row:last-child {
  border-bottom: none;
}

@keyframes row-appear {
  to { opacity: 1; transform: translateX(0); }
}

.data-row__key {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.data-row__value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.data-row__value.gold {
  color: var(--gold);
}

.data-card__export {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.data-card__export span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  opacity: 0.8;
}

/* ── Compliance Bar ────────────────────────────────────────────────────── */
.compliance-bar {
  background: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.compliance-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.compliance-bar__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.compliance-bar__badge svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* ── Trust Strip ───────────────────────────────────────────────────────── */
.trust-strip {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
}

.trust-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-strip__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.trust-strip__logos {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-strip__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.provider-icon {
  color: var(--gold);
  font-size: 0.7rem;
}

/* ── Section Shared ────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-desc {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 16px auto 0;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════════════
   FEATURE COMPARISON TABLE
   ══════════════════════════════════════════════════════════════════════════ */

.features {
  padding: 120px 0;
  background: var(--white);
}

.feature-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}

/* ── Table Head ── */
.feature-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.feature-table thead tr {
  background: var(--soft-gray);
}

.feature-table th {
  padding: 24px 20px;
  text-align: center;
  vertical-align: bottom;
  font-weight: 400;
  border-bottom: 2px solid var(--border-light);
}

.feature-table__feature-col {
  text-align: left !important;
  font-size: 0.75rem;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  width: 35%;
}

.feature-table__plan-col {
  width: 16.25%;
}

/* Featured column (Pro) highlight */
.feature-table__plan-col--featured {
  background: rgba(212, 160, 23, 0.06);
  position: relative;
}

.feature-table__plan-col--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
}

.feature-table__featured-cell {
  background: rgba(212, 160, 23, 0.04);
}

/* Plan Headers */
.plan-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.plan-header__badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--gold);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.plan-header__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.plan-header__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.plan-header__period {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── Table Body ── */
.feature-table tbody td {
  padding: 12px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.feature-table__label {
  text-align: left !important;
  color: var(--text-primary) !important;
  font-weight: 500;
}

.feature-table__hint {
  display: block;
  font-size: 0.775rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Category rows */
.feature-table__category td {
  padding: 16px 20px 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold) !important;
  background: var(--soft-gray);
  text-align: left !important;
  border-bottom: 2px solid var(--border-light);
}

/* Check / Cross */
.ft-check {
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

.ft-cross {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Table Footer (CTA row) ── */
.feature-table tfoot td {
  padding: 24px 20px;
  background: var(--soft-gray);
  border-top: 2px solid var(--border-light);
}

.feature-table tfoot .feature-table__featured-cell {
  background: rgba(212, 160, 23, 0.08);
}

.feature-table__footer-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
}

/* Row hover */
.feature-table tbody tr:not(.feature-table__category):hover td {
  background: rgba(212, 160, 23, 0.03);
}

.feature-table tbody tr:not(.feature-table__category):hover .feature-table__featured-cell {
  background: rgba(212, 160, 23, 0.08);
}

/* ── Mobile Feature Table ── */
.feature-table-mobile {
  display: none;
}

.plan-tabs {
  display: flex;
  gap: 4px;
  background: var(--soft-gray);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  position: sticky;
  top: 60px;
  z-index: 10;
}

.plan-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.plan-tab--active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.plan-tab--featured.plan-tab--active {
  background: var(--gold);
  color: white;
}

.plan-mobile-cards {
  position: relative;
}

.plan-mobile-card {
  display: none;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px 24px;
}

.plan-mobile-card--active {
  display: block;
}

.plan-mobile-card--featured {
  border-color: var(--gold);
}

.plan-mobile-card__header {
  margin-bottom: 24px;
}

.plan-mobile-card__badge {
  display: inline-block;
  padding: 3px 12px;
  background: var(--gold);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.plan-mobile-card__price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
}

.plan-mobile-card__period {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-mobile-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.plan-mobile-card__limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--soft-gray);
  border-radius: 12px;
}

.plan-mobile-card__limit {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.plan-mobile-card__limit strong {
  color: var(--gold);
  font-weight: 700;
}

.plan-mobile-card__features {
  list-style: none;
  margin-bottom: 24px;
}

.plan-mobile-card__features li {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.plan-mobile-card__features li:last-child {
  border-bottom: none;
}

.plan-mobile-card__features li.muted {
  color: var(--text-dim);
}

/* ── How it Works ──────────────────────────────────────────────────────── */
.how-it-works {
  padding: 120px 0;
  background: var(--soft-gray);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.how-it-works::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 160, 23, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 160, 23, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.how-it-works .section-title .gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  position: relative;
}

.step {
  flex: 1;
  max-width: 320px;
  text-align: center;
  padding: 40px 32px;
}

.step__number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 24px;
}

.step__visual {
  margin-bottom: 24px;
}

.step__icon-wrap {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.15);
  border-radius: 20px;
  color: var(--gold);
  transition: all 0.4s var(--ease-out-expo);
}

.step:hover .step__icon-wrap {
  background: rgba(212, 160, 23, 0.15);
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(212, 160, 23, 0.1);
}

.step__content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.step__content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step__connector {
  display: flex;
  align-items: center;
  padding: 0;
  align-self: center;
}

.connector-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 160, 23, 0.3), transparent);
}

/* ── Screenshots ───────────────────────────────────────────────────────── */
/* Screenshot-Galerie (innerhalb how-it-works) */
.screenshot-gallery {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.screenshot-tile {
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: inherit;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(212, 160, 23, 0.15);
}

.screenshot-tile:hover,
.screenshot-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  outline: none;
}

.screenshot-tile:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.5), 0 12px 32px rgba(0, 0, 0, 0.08);
}

.screenshot-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  display: block;
  background: var(--soft-gray);
}

.screenshot-tile__caption {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.screenshot-tile__zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.screenshot-tile:hover .screenshot-tile__zoom,
.screenshot-tile:focus-visible .screenshot-tile__zoom {
  opacity: 1;
  transform: scale(1);
}

/* Touch-Geräte ohne Hover: Zoom-Icon dauerhaft zeigen, damit die Tapbarkeit erkennbar ist */
@media (hover: none) {
  .screenshot-tile__zoom {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Lightbox ─────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox[aria-hidden="false"] {
  display: flex;
  opacity: 1;
}

.lightbox__stage {
  margin: 0;
  max-width: min(1400px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: var(--soft-gray);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: inherit;
  padding: 0;
}

.lightbox__close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(1.05);
}

.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 1.4rem; }
  .lightbox__image { max-height: calc(100vh - 120px); }
}

@media (max-width: 900px) {
  .screenshot-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}

/* ── API Section ───────────────────────────────────────────────────────── */
.api-section {
  padding: 120px 0;
  background: var(--white);
}

.api-section__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}

.api-section__text .section-desc {
  margin-left: 0;
  margin-right: 0;
}

.api-section__features {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-feature {
  font-size: 0.95rem;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-secondary);
}

.api-feature .gold {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Code Window */
.api-section__code {
  min-width: 0;
}

.code-window {
  background: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ink-mid);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  min-width: 0;
}

.code-window__dots {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-window__dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-window__dots span:nth-child(1) { background: #FF5F57; }
.code-window__dots span:nth-child(2) { background: #FEBC2E; }
.code-window__dots span:nth-child(3) { background: #28C840; }

.code-window__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 14px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

.code-window__content {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
}

.code-comment { color: rgba(255, 255, 255, 0.25); }
.code-cmd { color: var(--gold-light); }
.code-string { color: #98C379; }
.code-key { color: #61AFEF; }
.code-bool { color: #D19A66; }
.code-number { color: #D19A66; }

/* ── Security ──────────────────────────────────────────────────────────── */
.security {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

.security__inner {
  background: var(--soft-gray);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 48px;
}

.security__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.security__item {
  text-align: center;
}

.security__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: var(--gold-glow-strong);
  border-radius: 12px;
  color: var(--gold-dim);
}

.security__item h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.security__item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq {
  padding: 120px 0;
  background: var(--white);
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--border-light);
}

.faq__item:first-child {
  border-top: 1px solid var(--border-light);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: color 0.3s;
}

.faq__question:hover {
  color: var(--gold);
}

.faq__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-out-expo), color 0.3s;
}

.faq__item--open .faq__chevron {
  transform: rotate(180deg);
  color: var(--gold);
}

.faq__answer {
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo), padding 0.4s var(--ease-out-expo);
  max-height: 0;
  padding: 0 0;
}

.faq__answer[hidden] {
  display: block;
  max-height: 0;
  padding: 0 0;
}

.faq__item--open .faq__answer {
  max-height: 300px;
  padding: 0 0 20px;
}

.faq__answer p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Final CTA ─────────────────────────────────────────────────────────── */
.final-cta {
  padding: 120px 0;
  background: var(--soft-gray);
  color: var(--text-primary);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-light);
}

.final-cta::before {
  content: '';
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(212, 160, 23, 0.08), transparent 70%);
  pointer-events: none;
}

.final-cta__inner {
  position: relative;
  z-index: 1;
}

.final-cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--ink);
}

.final-cta__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  color: var(--text-primary);
  padding: 64px 0 32px;
  border-top: 1px solid var(--border-light);
}

.footer .nav__logo {
  color: var(--ink);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__col h5 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer__col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 0;
  transition: color 0.3s;
}

.footer__col a:hover {
  color: var(--gold);
}

.footer__bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__legal a:hover {
  color: var(--gold);
}

/* ══════════════════════════════════════════════════════════════════════════
   LEGAL PAGES (Impressum, Datenschutz, AGB)
   ══════════════════════════════════════════════════════════════════════════ */

.legal-page {
  padding: 120px 24px 80px;
  min-height: 100vh;
  background: var(--white);
}

.legal-page__content {
  max-width: 780px;
  margin: 0 auto;
}

.legal-page__content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 40px;
  line-height: 1.2;
}

.legal-page__content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 40px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.legal-page__content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-light);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page__content p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-page__content ul {
  margin: 8px 0 16px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-page__content li {
  margin-bottom: 4px;
}

.legal-page__content li strong {
  color: var(--ink-light);
}

.legal-page__content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.legal-page__content a:hover {
  color: var(--gold-dim);
}

.placeholder {
  background: var(--gold-glow);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-dim);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .api-section__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .security__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .legal-page {
    padding: 100px 20px 60px;
  }

  .legal-page__content h1 {
    margin-bottom: 28px;
  }

  .legal-page__content h2 {
    margin-top: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer__legal {
    justify-content: center;
  }

  .nav__links,
  .nav__actions {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  /* Mobile Nav */
  .nav.mobile-open {
    background: var(--white);
  }

  .nav.mobile-open .nav__inner {
    flex-wrap: wrap;
  }

  .nav.mobile-open .nav__links {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px 0;
    gap: 16px;
    order: 3;
  }

  .nav.mobile-open .nav__links a {
    color: var(--text-secondary);
  }

  .nav.mobile-open .nav__actions {
    display: flex;
    width: 100%;
    padding-bottom: 16px;
    order: 4;
  }

  .hero {
    padding: 120px 20px 60px;
    min-height: auto;
  }

  .hero__title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .hero__stats {
    gap: 20px;
  }

  .hero__stat-divider {
    display: none;
  }

  .extraction-demo {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 360px;
    margin: 0 auto;
  }

  .extraction-demo__arrow {
    transform: rotate(90deg);
    padding: 8px 0;
  }

  .arrow-flow__line {
    width: 48px;
  }

  /* Feature Table: Desktop hidden, Mobile shown */
  .feature-table-wrap {
    display: none;
  }

  .feature-table-mobile {
    display: block;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step__connector {
    transform: rotate(90deg);
  }

  .security__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .security__inner {
    padding: 32px 24px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .footer__links {
    grid-template-columns: 1fr;
  }

  .plan-tabs {
    gap: 2px;
  }

  .plan-tab {
    padding: 8px 4px;
    font-size: 0.75rem;
  }
}
