/* ==========================================================================
   Base Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Body
   ========================================================================== */

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3 {
  font-family: var(--font-headline);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}

h1, h2 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Sticky Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
  padding: var(--space-sm) var(--section-pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.inner--wide {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
}

.section {
  padding: var(--section-pad-v) var(--section-pad-h);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: var(--space-sm);
}

.gold-rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  display: block;
  margin: var(--space-md) 0 var(--space-lg);
}

/* ==========================================================================
   Section Backgrounds
   ========================================================================== */

.section--dark {
  background: var(--black);
}

.section--charcoal {
  background: var(--charcoal);
}

/* ==========================================================================
   Scroll Reveal Animation
   ========================================================================== */

/* Scroll reveal — initial hidden state for sections below hero */
.section:not(.hero):not(.footer) > .inner,
.section:not(.hero):not(.footer) > .inner--wide {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section:not(.hero):not(.footer) > .inner.reveal,
.section:not(.hero):not(.footer) > .inner--wide.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .section:not(.hero):not(.footer) > .inner,
  .section:not(.hero):not(.footer) > .inner--wide {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

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

.hero .gold-rule {
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--warm-white);
  font-size: 1.125rem;
  line-height: 1.8;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  text-align: center;
}

.footer__logo svg {
  height: 24px;
  width: auto;
  margin-bottom: var(--space-sm);
}

.footer p {
  color: var(--warm-white);
  font-size: 0.875rem;
}

/* ==========================================================================
   Progressive Disclosure
   ========================================================================== */

.disclosure {
  border: 1px solid rgba(201, 162, 39, 0.15);
  border-radius: 4px;
  margin-top: var(--space-md);
  overflow: hidden;
}

.disclosure summary {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-weight: 600;
  color: var(--gold);
  list-style: none;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary::after {
  content: '+';
  float: right;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--gold-dim);
  transition: transform 0.2s ease;
}

.disclosure[open] summary::after {
  content: '\2212';
}

.disclosure__body {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--warm-white);
  line-height: 1.7;
}

.disclosure__body p {
  margin-top: var(--space-sm);
}

.disclosure__body p:first-child {
  margin-top: 0;
}

/* ==========================================================================
   Callout Blocks
   ========================================================================== */

.callout {
  border-left: 3px solid var(--gold-dim);
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  color: var(--warm-white);
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout strong {
  color: var(--gold);
}

/* ==========================================================================
   Section Content
   ========================================================================== */

.section__body {
  color: var(--warm-white);
  line-height: 1.7;
  margin-top: 0;
}

.section__body p + p {
  margin-top: var(--space-sm);
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: var(--space-lg);
}

.compare-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.compare-table thead th {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: var(--white);
  border-bottom: 2px solid rgba(201, 162, 39, 0.3);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.compare-table__highlight {
  background: rgba(201, 162, 39, 0.08);
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}

thead .compare-table__highlight {
  border-top: 2px solid var(--gold);
}

tbody tr:last-child .compare-table__highlight {
  border-bottom: 2px solid var(--gold);
}

.compare-table__customer,
.compare-table__supplier {
  display: block;
  line-height: 1.5;
}

.compare-table__customer {
  color: var(--white);
  font-weight: 600;
}

.compare-table__supplier {
  color: var(--warm-white);
  font-size: 0.85rem;
  opacity: 0.8;
}

.callout-group {
  margin-top: var(--space-lg);
}

/* ==========================================================================
   Calculator
   ========================================================================== */

.calc-presets {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.calc-preset {
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.3);
  color: var(--warm-white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calc-preset:hover {
  border-color: var(--gold);
}

.calc-preset--active {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-input-group label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.calc-value {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
}

.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
  touch-action: none;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--charcoal);
  box-shadow: 0 0 0 10px rgba(201, 162, 39, 0);
  transition: box-shadow 0.15s ease;
}

.calc-slider:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 10px rgba(201, 162, 39, 0.15);
}

.calc-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--charcoal);
}

.calc-actual {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 4px;
}

.calc-actual__inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.calc-actual__inner label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.calc-slider--actual {
  background: linear-gradient(to right, var(--gold-dim), var(--gold)) !important;
}

.calc-value--actual {
  color: var(--gold);
  font-weight: 600;
}

.calc-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.calc-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: var(--space-md);
  text-align: center;
}

.calc-card--hybrid {
  border-color: rgba(201, 162, 39, 0.3);
  background: rgba(201, 162, 39, 0.06);
}

.calc-card__title {
  font-size: 1rem !important;
  margin-bottom: 8px;
}

.calc-card__cost {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.calc-card__margin {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--warm-white);
}

.calc-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  display: block;
  margin-bottom: 4px;
}

.calc-charts {
  margin-top: var(--space-lg);
  display: grid;
  gap: var(--space-lg);
}

.calc-chart-wrap h3 {
  font-size: 1rem !important;
  margin-bottom: var(--space-sm);
  color: var(--warm-white);
}

.calc-chart-container {
  position: relative;
  height: 300px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --section-pad-v: 64px;
  }

  .nav__links {
    display: none;
  }

  h1, h2 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  h3 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
  }

  .calc-inputs {
    grid-template-columns: 1fr;
  }

  .calc-summary {
    grid-template-columns: 1fr;
  }

  .calc-chart-container {
    height: 250px;
  }

  .calc-presets {
    flex-direction: column;
  }

  .calc-preset {
    width: 100%;
  }

  .calc-slider {
    height: 8px;
  }

  .calc-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }

  .calc-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .calc-input-group {
    padding: 4px 0;
  }

  .calc-card__cost {
    font-size: 1.2rem;
  }

  .calc-chart-wrap h3 {
    font-size: 0.9rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --section-pad-v: 80px;
  }

  .calc-inputs {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}
