/* ============================================
   STACKWISE — STYLESHEET
   Design system: Reflow-inspired
   Palette: warm neutrals, olive accent
   ============================================ */

/* ----- CUSTOM PROPERTIES ----- */
:root {
  /* Backgrounds */
  --bg-cream: #F5F0EB;
  --bg-warm-white: #FAF7F4;
  --bg-sand: #EDE7DF;
  --bg-dark: #1A1915;

  /* Text */
  --text-primary: #1A1915;
  --text-secondary: #6B6560;
  --text-tertiary: #9C9590;
  --text-inverse: #FAF7F4;

  /* Accents */
  --accent-olive: #5C6B4F;
  --accent-olive-light: #7A8B6D;
  --accent-terra: #C4845C;
  --accent-rust: #B85C3A;

  /* Charts */
  --chart-line: #5C6B4F;
  --chart-fill: rgba(92, 107, 79, 0.1);
  --chart-grid: #EDE7DF;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 128px;

  /* Radii */
  --radius-card: 12px;
  --radius-btn: 8px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-fast: 150ms;
  --t-med: 200ms;
  --t-slow: 400ms;
}


/* ----- RESET ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}


/* ----- SKIP LINK ----- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent-olive);
  color: var(--text-inverse);
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  z-index: 1000;
  font-size: 14px;
  font-weight: 500;
  transition: top var(--t-med) var(--ease-out);
}

.skip-link:focus {
  top: 16px;
}


/* ----- CONTAINER ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--s-6);
  }
}


/* ----- TYPOGRAPHY ----- */
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin-bottom: var(--s-3);
}

.section-headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--s-4);
}

.section-sub {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: var(--s-7);
}

.section-header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.body-lg {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.diagram-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  fill: var(--text-primary);
}

.diagram-label-sm {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.diagram-label-xs {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
}

.chart-axis-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  fill: var(--text-tertiary);
}

.chart-callout-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
}


/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-btn);
  transition: all var(--t-med) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent-olive);
  color: var(--text-inverse);
  border: 1.5px solid var(--accent-olive);
}

.btn--primary:hover {
  background-color: var(--accent-olive-light);
  border-color: var(--accent-olive-light);
  transform: translateY(-1px);
}

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

.btn--secondary:hover {
  background: var(--text-primary);
  color: var(--text-inverse);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn--lg {
  padding: 18px 36px;
  font-size: 17px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-olive);
  outline-offset: 2px;
}


/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--t-slow) var(--ease-out),
              box-shadow var(--t-slow) var(--ease-out);
}

.nav--scrolled {
  background: rgba(245, 240, 235, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 25, 21, 0.06);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.nav__logo-text {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
}

.nav__links {
  display: none;
  gap: var(--s-5);
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }
}

.nav__link {
  font-size: 14px;
  font-weight: 450;
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease-out);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-olive);
  transition: width 250ms var(--ease-out);
}

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

.nav__link:hover::after {
  width: 100%;
}

.nav__actions {
  display: none;
}

@media (min-width: 768px) {
  .nav__actions {
    display: flex;
  }
}

.nav__auth-out,
.nav__auth-in {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__auth-out[hidden],
.nav__auth-in[hidden] {
  display: none;
}

.nav__mobile-auth {
  display: flex;
  flex-direction: column;
}

.nav__mobile-auth[hidden] {
  display: none;
}

.nav__mobile-auth-btn {
  width: 100%;
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

@media (min-width: 768px) {
  .nav__hamburger {
    display: none;
  }
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--t-med) var(--ease-out),
              opacity var(--t-med) var(--ease-out);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-cream);
  padding: var(--s-5);
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease-out);
  box-shadow: -4px 0 24px rgba(26, 25, 21, 0.08);
}

.nav__mobile[aria-hidden="false"] {
  transform: translateX(0);
}

.nav__mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.nav__mobile-link {
  font-size: 18px;
  font-weight: 450;
  color: var(--text-primary);
  padding: var(--s-2) 0;
}


/* ============================================
   HERO
   ============================================ */
.hero {
  padding: calc(64px + var(--s-8)) 0 var(--s-8);
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);
  }
}

.hero__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin-bottom: var(--s-4);
}

.hero__headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--s-4);
}

.hero__sub {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: var(--s-5);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.hero__note {
  font-size: 13px;
  color: var(--text-tertiary);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__diagram {
  width: 100%;
  max-width: 520px;
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-4);
}

.diagram-flow {
  width: 100%;
  height: auto;
}


/* ============================================
   PROBLEM SECTION
   ============================================ */
.problem {
  padding: var(--s-9) 0;
}

.problem__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

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

.problem__card {
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-5);
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}

.problem__card:hover {
  border-color: #D5CFC7;
  box-shadow: 0 2px 12px rgba(26, 25, 21, 0.04);
}

.problem__icon {
  margin-bottom: var(--s-3);
}

.problem__title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.problem__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}


/* ============================================
   DEMAND SECTION
   ============================================ */
.demand {
  padding: var(--s-9) 0;
  background: var(--bg-warm-white);
}

.demand__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  align-items: center;
}

@media (min-width: 960px) {
  .demand__layout {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--s-8);
  }
}

.demand__list {
  margin-top: var(--s-5);
}

.demand__list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: var(--s-3);
}

.demand__check {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Chart mockup */
.demand__chart-container {
  background: var(--bg-cream);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-4);
}

.demand__chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--bg-sand);
}

.demand__chart-title {
  font-size: 14px;
  font-weight: 600;
}

.demand__chart-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.demand__chart {
  width: 100%;
  height: auto;
}

.demand__chart-legend {
  display: flex;
  gap: var(--s-4);
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--bg-sand);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.legend-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
}

.legend-line--solid {
  background: var(--chart-line);
}

.legend-line--dashed {
  background: repeating-linear-gradient(
    90deg,
    var(--accent-olive) 0px,
    var(--accent-olive) 6px,
    transparent 6px,
    transparent 10px
  );
}

.legend-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot--alert {
  background: var(--accent-terra);
}


/* ============================================
   LOSSES / VISIBILITY GAP SECTION
   ============================================ */
.losses {
  padding: var(--s-9) 0;
}

.losses__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

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

.losses__card {
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-5);
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}

.losses__card:hover {
  border-color: #D5CFC7;
  box-shadow: 0 2px 12px rgba(26, 25, 21, 0.04);
}

.losses__metric {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.losses__metric-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.losses__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}


/* ============================================
   HOW IT WORKS
   ============================================ */
.how {
  padding: var(--s-9) 0;
  background: var(--bg-warm-white);
}

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

@media (min-width: 960px) {
  .how__steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

.how__step {
  text-align: center;
  max-width: 320px;
  flex: 1;
}

.how__step-number span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-olive);
  display: inline-block;
  margin-bottom: var(--s-3);
}

.how__step-visual {
  margin-bottom: var(--s-4);
}

.how__step-svg {
  width: 180px;
  height: auto;
  margin: 0 auto;
}

.how__step-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.how__step-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.how__connector {
  display: none;
}

@media (min-width: 960px) {
  .how__connector {
    display: flex;
    align-items: center;
    padding-top: 100px;
    width: 80px;
    flex-shrink: 0;
  }

  .how__connector svg {
    width: 100%;
  }
}


/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: var(--s-9) 0;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

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

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

.features__card {
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-5);
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}

.features__card:hover {
  border-color: #D5CFC7;
  box-shadow: 0 2px 12px rgba(26, 25, 21, 0.04);
  transform: translateY(-2px);
}

.features__card-icon {
  margin-bottom: var(--s-3);
}

.features__card-title {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.features__card-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}


/* ============================================
   PRICING
   ============================================ */
.pricing {
  padding: var(--s-9) 0;
  background: var(--bg-warm-white);
}

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  max-width: 960px;
  margin: 0 auto;
}

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

.pricing__card {
  background: var(--bg-cream);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}

.pricing__card:hover {
  box-shadow: 0 4px 20px rgba(26, 25, 21, 0.06);
}

.pricing__card--featured {
  border: 2px solid var(--accent-olive);
  background: var(--bg-cream);
}

.pricing__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-olive);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing__card-header {
  margin-bottom: var(--s-4);
}

.pricing__plan-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: var(--s-1);
}

.pricing__plan-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.pricing__price {
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--bg-sand);
}

.pricing__amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
}

.pricing__period {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-left: 2px;
}

.pricing__features-list {
  flex: 1;
  margin-bottom: var(--s-5);
}

.pricing__features-list li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.pricing__features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-olive);
}

.pricing__cta {
  width: 100%;
  text-align: center;
}

.pricing__note {
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: var(--s-6);
}


/* ============================================
   USE CASES
   ============================================ */
.usecases {
  padding: var(--s-9) 0;
}

.usecases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

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

.usecases__card {
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  padding: var(--s-5);
  transition: border-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}

.usecases__card:hover {
  border-color: #D5CFC7;
  box-shadow: 0 2px 12px rgba(26, 25, 21, 0.04);
}

.usecases__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-olive);
  background: rgba(92, 107, 79, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: var(--s-3);
}

.usecases__title {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.usecases__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}


/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: var(--s-9) 0;
  background: var(--bg-warm-white);
}

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

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

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

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s-4) 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__icon {
  flex-shrink: 0;
  margin-left: var(--s-3);
  transition: transform var(--t-med) var(--ease-out);
}

details[open] .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  padding-bottom: var(--s-4);
}

.faq__answer p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
}


/* ============================================
   FINAL CTA
   ============================================ */
.cta-final {
  padding: var(--s-9) 0;
  background: var(--bg-dark);
}

.cta-final__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-final__headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-inverse);
  margin-bottom: var(--s-4);
}

.cta-final__sub {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-tertiary);
  margin-bottom: var(--s-5);
}

.cta-final__actions .btn--primary {
  background: var(--text-inverse);
  color: var(--bg-dark);
  border-color: var(--text-inverse);
}

.cta-final__actions .btn--primary:hover {
  background: var(--bg-sand);
  border-color: var(--bg-sand);
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-dark);
  padding: var(--s-7) 0 var(--s-5);
  border-top: 1px solid rgba(250, 247, 244, 0.06);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1.5fr 1fr;
  }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text-inverse);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  margin-bottom: var(--s-2);
}

.footer__tagline {
  font-size: 14px;
  color: var(--text-tertiary);
}

.footer__links {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}

.footer__col-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--s-3);
}

.footer__link {
  display: block;
  font-size: 14px;
  color: rgba(250, 247, 244, 0.7);
  margin-bottom: var(--s-2);
  transition: color var(--t-fast) var(--ease-out);
}

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

.footer__bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(250, 247, 244, 0.06);
}

.footer__copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer__contact {
  margin-top: var(--s-2);
}


/* ============================================
   TRUST / DATA HANDLING
   ============================================ */
.trust {
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--bg-sand);
}

.trust__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

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

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

.trust__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}

.trust__icon {
  flex-shrink: 0;
  color: var(--accent-olive);
  margin-top: 2px;
}

.trust__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--s-1);
}

.trust__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}


/* ============================================
   PRODUCT PREVIEWS
   ============================================ */
.previews {
  padding: var(--s-9) 0;
}

.previews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}

@media (min-width: 960px) {
  .previews__grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.previews__panel {
  background: var(--bg-warm-white);
  border: 1px solid var(--bg-sand);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.previews__panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--bg-sand);
  background: var(--bg-cream);
}

.previews__panel-title {
  font-size: 14px;
  font-weight: 600;
}

.previews__panel-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-olive);
  background: rgba(92, 107, 79, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.previews__table-wrap {
  overflow-x: auto;
  padding: var(--s-3);
}

.previews__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.previews__table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  padding: var(--s-2);
  border-bottom: 1px solid var(--bg-sand);
}

.previews__table td {
  padding: var(--s-2);
  border-bottom: 1px solid var(--bg-sand);
  color: var(--text-primary);
  white-space: nowrap;
}

.previews__table tr:last-child td {
  border-bottom: none;
}

.velocity {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
}

.velocity--up { color: var(--accent-olive); }
.velocity--down { color: var(--accent-terra); }
.velocity--flat { color: var(--text-tertiary); }

.risk {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.risk--low {
  color: var(--accent-olive);
  background: rgba(92, 107, 79, 0.08);
}

.risk--medium {
  color: var(--text-secondary);
  background: rgba(107, 101, 96, 0.08);
}

.risk--high {
  color: var(--accent-rust);
  background: rgba(184, 92, 58, 0.08);
}

.risk--critical {
  color: #fff;
  background: var(--accent-rust);
}

/* Volatility badges (index.html previews) */
.volatility-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.volatility--stable {
  color: var(--accent-olive);
  background: rgba(92, 107, 79, 0.08);
}

.volatility--moderate {
  color: var(--accent-terra);
  background: rgba(196, 132, 92, 0.08);
}

.volatility--volatile {
  color: var(--accent-rust);
  background: rgba(184, 92, 58, 0.08);
}

/* Coverage colors (index.html previews) */
.coverage--healthy { color: var(--accent-olive); }
.coverage--warning { color: var(--accent-terra); }
.coverage--critical { color: var(--accent-rust); font-weight: 600; }

/* Reorder tier labels (index.html previews) */
.reorder-tier {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
}

.reorder-tier--high {
  color: #fff;
  background: var(--accent-rust);
}

.reorder-tier--medium {
  color: var(--accent-terra);
  background: rgba(196, 132, 92, 0.12);
}

.previews__reorder-list {
  padding: var(--s-3);
}

.previews__reorder-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--bg-sand);
}

.previews__reorder-item:last-child {
  border-bottom: none;
}

.previews__reorder-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.previews__reorder-icon--high {
  background: rgba(184, 92, 58, 0.1);
  color: var(--accent-rust);
}

.previews__reorder-icon--medium {
  background: rgba(196, 132, 92, 0.1);
  color: var(--accent-terra);
}

.previews__reorder-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.previews__reorder-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.previews__reorder-calc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}


/* Previews — Panel notes and formula explanations */
.previews__panel-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--s-3);
  padding: 0 var(--s-1);
}

.previews__formula-note {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-cream);
  border-radius: var(--radius-btn);
  border: 1px solid var(--bg-sand);
}

.previews__formula-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--s-2);
}

.previews__formula-list {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.8;
  list-style: none;
  padding: 0;
  margin-bottom: var(--s-2);
}

.previews__formula-list li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.previews__formula-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--s-1);
}

/* Legend dot for forecast */
.legend-dot--forecast {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-olive);
}


/* ============================================
   WAITLIST / SIGNUP
   ============================================ */
.waitlist {
  padding: var(--s-9) 0;
  background: var(--bg-dark);
}

.waitlist__inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.waitlist__headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-inverse);
  margin-bottom: var(--s-4);
}

.waitlist__sub {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-tertiary);
  margin-bottom: var(--s-5);
}

.waitlist__form {
  display: flex;
  gap: var(--s-2);
  max-width: 440px;
  margin: 0 auto var(--s-3);
}

.waitlist__input {
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  border: 1.5px solid rgba(250, 247, 244, 0.15);
  border-radius: var(--radius-btn);
  background: rgba(250, 247, 244, 0.06);
  color: var(--text-inverse);
  outline: none;
  transition: border-color var(--t-med) var(--ease-out);
}

.waitlist__input::placeholder {
  color: var(--text-tertiary);
}

.waitlist__input:focus {
  border-color: var(--accent-olive-light);
}

.waitlist__form .btn--primary {
  background: var(--text-inverse);
  color: var(--bg-dark);
  border-color: var(--text-inverse);
  white-space: nowrap;
}

.waitlist__form .btn--primary:hover {
  background: var(--bg-sand);
  border-color: var(--bg-sand);
}

.waitlist__note {
  font-size: 13px;
  color: var(--text-tertiary);
}

@media (max-width: 480px) {
  .waitlist__form {
    flex-direction: column;
  }
}


/* ============================================
   ANIMATIONS
   ============================================ */
/* Scroll-triggered fade-in */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease-out),
              transform 500ms var(--ease-out);
}

.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Child stagger — applied via JS */
.anim-stagger-1 { transition-delay: 80ms; }
.anim-stagger-2 { transition-delay: 160ms; }
.anim-stagger-3 { transition-delay: 240ms; }
.anim-stagger-4 { transition-delay: 320ms; }
.anim-stagger-5 { transition-delay: 400ms; }

/* SVG line draw */
.draw-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.2s var(--ease-out);
}

.draw-line.is-visible {
  stroke-dashoffset: 0;
}

/* Diagram entrance */
.diagram-step {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms var(--ease-out),
              transform 400ms var(--ease-out);
}

.diagram-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.diagram-arrow {
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}

.diagram-arrow.is-visible {
  opacity: 1;
}

/* Chart animations */
.chart-line-forecast {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  transition: stroke-dashoffset 1.5s var(--ease-out);
}

.chart-line-forecast.is-visible {
  stroke-dashoffset: 0;
}

.chart-reorder-marker {
  opacity: 0;
  transform-origin: center;
  transition: opacity 400ms var(--ease-out) 1.2s;
}

.chart-reorder-marker.is-visible {
  opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .anim-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .draw-line,
  .diagram-step,
  .diagram-arrow,
  .chart-line-forecast,
  .chart-reorder-marker {
    opacity: 1;
    transform: none;
    transition: none;
    stroke-dashoffset: 0;
  }

  .anim-stagger-1,
  .anim-stagger-2,
  .anim-stagger-3,
  .anim-stagger-4,
  .anim-stagger-5 {
    transition-delay: 0ms;
  }

  html {
    scroll-behavior: auto;
  }
}
