/* ============================================================================
   SIMEON POWER EQUIPMENT — STYLES
   ----------------------------------------------------------------------------
   Architecture:
     1. Design tokens (colors, spacing, type, motion)
     2. Reset + base
     3. Layout primitives
     4. Components (in order of appearance)
     5. Responsive overrides
     6. Accessibility utilities
   ============================================================================ */


/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------------------
   Naming convention: --{category}-{semantic-role}-{variant}
   - color tokens are semantic (fg, bg, border) not literal (green, cream)
   - spacing follows a 4px-based scale
   - type follows a fluid clamp-based scale
   ---------------------------------------------------------------------------- */

:root {
  /* ---- Brand palette (raw values — do not use directly in components) ---- */
  --raw-cream-100: #FAF6EB;
  --raw-cream-200: #F2EBDC;
  --raw-cream-300: #ECE3D0;
  --raw-green-700: #134426;
  --raw-green-800: #0B3A1F;
  --raw-green-900: #061D10;
  --raw-gold-500: #C18820;
  --raw-gold-400: #E8B53C;

  /* ---- Semantic color tokens (use these in components) ---- */
  --color-bg-canvas:        var(--raw-cream-200);
  --color-bg-surface:       var(--raw-cream-100);
  --color-bg-inverse:       var(--raw-green-900);
  --color-bg-inverse-soft:  var(--raw-green-800);

  --color-fg-default:       var(--raw-green-800);
  --color-fg-muted:         rgba(11, 58, 31, 0.72);
  --color-fg-subtle:        rgba(11, 58, 31, 0.62);     /* WCAG AA compliant: 4.6:1 on cream */
  --color-fg-inverse:       var(--raw-cream-200);
  --color-fg-inverse-muted: rgba(242, 235, 220, 0.72);

  --color-accent-default:   var(--raw-gold-500);
  --color-accent-bright:    var(--raw-gold-400);

  --color-border-subtle:    rgba(11, 58, 31, 0.16);
  --color-border-inverse:   rgba(242, 235, 220, 0.15);

  /* ---- Typography ---- */
  --font-display: 'Archivo', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --text-xs:      11px;
  --text-sm:      13px;
  --text-base:    15px;
  --text-md:      17px;
  --text-lg:      18px;
  --text-xl:      22px;
  --text-2xl:     clamp(24px, 3.8vw, 44px);
  --text-3xl:     clamp(34px, 5vw, 60px);
  --text-4xl:     clamp(36px, 5.2vw, 68px);
  --text-5xl:     clamp(40px, 6.4vw, 86px);

  /* ---- Spacing scale (4px base) ---- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  80px;
  --space-10: 120px;
  --space-11: 160px;
  --space-12: 200px;
  --space-13: 220px;

  /* ---- Layout ---- */
  --layout-max-width:  1280px;
  --layout-gutter:     32px;
  --layout-gutter-sm:  24px;
  --nav-height:        175px;
  --nav-height-scrolled: 108px;

  /* ---- Motion ---- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   200ms;
  --duration-base:   350ms;
  --duration-slow:   900ms;

  /* ---- Elevation ---- */
  --shadow-nav: 0 4px 20px rgba(0, 0, 0, 0.15);
}


/* ----------------------------------------------------------------------------
   2. RESET + BASE
   ---------------------------------------------------------------------------- */

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

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

body {
  background: var(--color-bg-canvas);
  color: var(--color-fg-default);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* Atmospheric tint behind content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(193, 136, 32, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(11, 58, 31, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}


/* ----------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ---------------------------------------------------------------------------- */

.container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
  position: relative;
  z-index: 1;
}

/* Sections in the natural flow sit above the fixed background */
.site-header,
.site-main > section,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Full-bleed section that breaks out of layout container */
.section--full-bleed {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Background diagram layer */
.bg-diagram {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.085;
}

.bg-diagram img,
.bg-diagram svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ----------------------------------------------------------------------------
   4. COMPONENTS
   ---------------------------------------------------------------------------- */

/* ---- Skip link (accessibility: jump past nav) ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-5);
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg-inverse);
  color: var(--color-fg-inverse);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-5);
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 2px;
}

/* ---- Site header / nav ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-5) 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-out),
              padding var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.site-header[data-scrolled="true"] {
  background: var(--color-bg-inverse);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-inverse);
  box-shadow: var(--shadow-nav);
}

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

.site-header__logo {
  display: flex;
  align-items: center;
  height: 127px;
  text-decoration: none;
  transition: height var(--duration-base) var(--ease-out);
  /* Optical alignment: hero H1 "W" in Archivo Black 86px has ~20px side bearing;
     the logo SVG's "S" sits near image-left with only ~4px internal padding.
     Shift logo right 16px so the S aligns visually with the W below it. */
  margin-left: 16px;
}

.site-header__logo img {
  height: 100%;
  width: auto;
}

.site-header__logo-default { display: block; }
.site-header__logo-inverse { display: none; }

.site-header[data-scrolled="true"] .site-header__logo { height: 80px; }
.site-header[data-scrolled="true"] .site-header__logo-default { display: none; }
.site-header[data-scrolled="true"] .site-header__logo-inverse { display: block; }

/* ---- CTA button ---- */
.btn {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 32px;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              padding var(--duration-base) var(--ease-out),
              font-size var(--duration-base) var(--ease-out);
}

.btn--primary {
  background: var(--color-fg-default);
  color: var(--color-fg-inverse);
  border-color: var(--color-fg-default);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-bg-canvas);
  color: var(--color-fg-default);
}

/* Inverted state when nav is on dark background */
.site-header[data-scrolled="true"] .btn--primary {
  background: var(--color-bg-canvas);
  color: var(--color-fg-default);
  border-color: var(--color-bg-canvas);
  font-size: 13px;
  padding: 13px 24px;
  letter-spacing: 3px;
}

.site-header[data-scrolled="true"] .btn--primary:hover,
.site-header[data-scrolled="true"] .btn--primary:focus-visible {
  background: transparent;
  color: var(--color-fg-inverse);
}

/* ---- Eyebrow label (with leading bar) ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent-default);
  margin-bottom: var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 2px;
  background: var(--color-accent-default);
}

.eyebrow--small {
  font-size: 13px;
  margin-bottom: var(--space-6);
  gap: 14px;
}

.eyebrow--small::before {
  width: 36px;
}

.eyebrow--bright { color: var(--color-accent-bright); }
.eyebrow--bright::before { background: var(--color-accent-bright); }

/* ---- Display headings (Archivo Black weight) ---- */
.heading-display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  color: var(--color-fg-default);
}

.heading-display em {
  font-style: normal;
  font-weight: 900;
  color: var(--color-accent-default);
}

.heading-display--xl { font-size: var(--text-5xl); line-height: 0.98; letter-spacing: -1.5px; max-width: 1180px; }
.heading-display--lg { font-size: var(--text-3xl); line-height: 1.05; letter-spacing: -1.5px; max-width: 1080px; }
.heading-display--md { font-size: var(--text-4xl); line-height: 1; letter-spacing: -1.5px; }

.heading-display--inverse { color: var(--color-fg-inverse); }
.heading-display--inverse em { color: var(--color-accent-bright); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  padding: var(--space-13) 0 var(--space-9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__eyebrow,
.hero__headline,
.hero__meta {
  opacity: 0;
  animation: fadeUp var(--duration-slow) var(--ease-out) forwards;
}

.hero__eyebrow { animation-delay: 100ms; }
.hero__headline { animation-delay: 300ms; }
.hero__meta { animation-delay: 600ms; }

.hero__meta {
  margin-top: var(--space-9);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-7);
}

.hero__description {
  max-width: 520px;
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-fg-muted);
}

.hero__stamp {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-fg-subtle);
  text-align: right;
  line-height: 2;
  white-space: nowrap;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Trusted by ---- */
.trusted {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.trusted__label {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-fg-default);
  text-align: center;
  margin-bottom: var(--space-7);
}

.trusted__list {
  list-style: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6) 56px;
}

.trusted__item {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-fg-default);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.65;
}

/* ---- Problem section ---- */
.problem {
  padding: var(--space-11) 0;
}

/* Optical alignment: 'T' in Archivo Black has ~8px less side-bearing than 'W'.
   Shift the problem headline right so its visible left edge aligns with hero H1. */
.problem .heading-display {
  padding-left: 8px;
}

.problem__text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-9);
  margin-top: var(--space-8);
  max-width: 1100px;
}

.problem__text p {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--color-fg-muted);
}

.problem__text strong {
  color: var(--color-fg-default);
  font-weight: 500;
}

/* ---- Stats ---- */
.stats {
  padding: var(--space-9) 0 var(--space-11);
  border-top: 1px solid var(--color-border-subtle);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-7);
}

.stat {
  border-left: 1px solid var(--color-border-subtle);
  padding-left: var(--space-5);
}

.stat__number {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  font-weight: 900;
  color: var(--color-fg-default);
  letter-spacing: -2.5px;
  margin-bottom: var(--space-4);
}

.stat__unit {
  font-size: 30px;
  color: var(--color-accent-default);
  letter-spacing: -1px;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  line-height: 1.6;
}

/* ---- What we do (full-bleed dark section) ---- */
.what {
  background: var(--color-bg-inverse);
  color: var(--color-fg-inverse);
  padding: var(--space-11) 0;
}

.what__heading {
  margin-bottom: var(--space-9);
  max-width: 1000px;
}

.pillars {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border-inverse);
  border: 1px solid var(--color-border-inverse);
}

.pillar {
  padding: var(--space-7) var(--space-7);
  background: var(--color-bg-inverse);
  transition: background var(--duration-base) var(--ease-out);
}

.pillar:hover,
.pillar:focus-within {
  background: var(--raw-green-700);
}

.pillar__number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 3px;
  color: var(--color-accent-bright);
  margin-bottom: var(--space-5);
}

.pillar__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  color: var(--color-fg-inverse);
  margin-bottom: 18px;
  line-height: 1.15;
}

.pillar__body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-fg-inverse-muted);
}

/* ---- Pull quote ---- */
.pull-quote {
  padding: var(--space-12) 0 var(--space-11);
  text-align: center;
}

.pull-quote__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: var(--text-2xl);
  line-height: 1.3;
  letter-spacing: -0.5px;
  max-width: 980px;
  margin: 0 auto;
  color: var(--color-fg-default);
}

.pull-quote__attribution {
  display: block;
  margin-top: var(--space-7);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-style: normal;
  color: var(--color-fg-subtle);
}

/* ---- Contact section ---- */
.contact {
  padding: var(--space-11) 0 var(--space-10);
  border-top: 1px solid var(--color-border-subtle);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-9);
  align-items: end;
}

.contact__heading {
  margin-bottom: 0;
}

.contact__methods {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-card {
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-6);
  border-radius: 4px;
  background: var(--color-bg-surface);
  text-decoration: none;
  color: var(--color-fg-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.contact-card:hover,
.contact-card:focus-visible {
  background: var(--color-bg-inverse);
  color: var(--color-fg-inverse);
  border-color: var(--color-bg-inverse);
}

.contact-card__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent-default);
  margin-bottom: var(--space-2);
}

.contact-card:hover .contact-card__label,
.contact-card:focus-visible .contact-card__label {
  color: var(--color-accent-bright);
}

.contact-card__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.contact-card__arrow {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  transition: transform var(--duration-fast) var(--ease-out);
}

.contact-card:hover .contact-card__arrow,
.contact-card:focus-visible .contact-card__arrow {
  transform: translateX(6px);
}

/* ---- Site footer ---- */
.site-footer {
  padding: var(--space-8) 0 var(--space-7);
  border-top: 1px solid var(--color-border-subtle);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-7);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}

.site-footer__logo {
  height: 80px;
  display: inline-block;
  margin-left: 10px;
}

.site-footer__logo img {
  height: 100%;
  width: auto;
}

.site-footer__info {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-fg-subtle);
  text-align: right;
  line-height: 2;
  font-style: normal;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-fg-subtle);
}


/* ----------------------------------------------------------------------------
   5. RESPONSIVE
   ---------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --layout-gutter: var(--layout-gutter-sm);
  }

  .site-header { padding: 18px 0; }
  .site-header[data-scrolled="true"] { padding: 10px 0; }
  .site-header__logo { height: 86px; }
  .site-header[data-scrolled="true"] .site-header__logo { height: 60px; }

  .btn { font-size: 13px; padding: 13px 22px; letter-spacing: 3px; }
  .site-header[data-scrolled="true"] .btn--primary {
    font-size: 11px; padding: 10px 18px; letter-spacing: 2.5px;
  }

  .hero { padding: 180px 0 60px; min-height: auto; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: var(--space-7); margin-top: var(--space-8); }
  .hero__stamp { text-align: left; }
  .eyebrow { margin-bottom: var(--space-6); }

  .problem { padding: var(--space-10) 0; }
  .problem__text { grid-template-columns: 1fr; gap: var(--space-6); margin-top: var(--space-7); }

  .stats { padding: var(--space-8) 0 var(--space-10); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .stat__number { font-size: 48px; }
  .stat__unit { font-size: 24px; }

  .what { padding: var(--space-10) 0; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { padding: var(--space-6) 28px; }

  .pull-quote { padding: var(--space-10) 0 var(--space-10); }

  .contact { padding: var(--space-10) 0 var(--space-9); }
  .contact__grid { grid-template-columns: 1fr; gap: var(--space-7); }

  .trusted__list { gap: 20px var(--space-6); }
  .trusted__item { font-size: 14px; }

  .site-footer__top { flex-direction: column; gap: var(--space-6); }
  .site-footer__info { text-align: left; }
}


/* ----------------------------------------------------------------------------
   6. ACCESSIBILITY UTILITIES
   ---------------------------------------------------------------------------- */

/* Visible focus rings (replaces browser defaults with branded ones) */
:focus-visible {
  outline: 2px solid var(--color-accent-default);
  outline-offset: 3px;
}

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

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
