/* ============================================================
   Redrock Acoustics — Main Stylesheet
   Mobile-first, fully responsive, semantic, accessible
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand colors */
  --black:        #0a0a0a;
  --off-black:    #1a1a1a;
  --white:        #ffffff;
  --light-grey:   #f4f4f4;
  --grey:         #888888;
  --dark-grey:    #333333;
  --accent:       #CC2200;

  /* Typography */
  --font-display: 'Syne', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Syne', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --max-width:        1280px;
  --gutter:           clamp(20px, 4vw, 48px);
  --section-padding:  clamp(56px, 8vw, 112px);

  --radius:    4px;
  --radius-lg: 8px;

  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
}
.brand-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--black);
    padding: 8px var(--gutter) 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a {
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 0;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: clamp(560px, 80vh, 920px);
  padding: clamp(48px, 6vw, 100px) clamp(40px, 11vw, 160px);   /* +~1in horizontal */
  background-color: var(--off-black);
  background-image: url('../images/taos-mountain2560.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  /* Two-column grid: main content left, SpeaD banner right.
     align-items: start lines up the TOP of each child — the top of the
     SpeaD white box sits on the same horizontal line as the top of the
     Redrock mark. The right column has a defined size, so removing the
     SpeaD child leaves the left column's position unchanged.            */
  display: grid;
  grid-template-columns: 1fr clamp(240px, 28vw, 420px);
  align-items: start;
  gap: clamp(20px, 4vw, 80px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.40) 0%,
    rgba(0, 0, 0, 0.60) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Hero text — left column, top-aligned with SpeaD */
.hero-text {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 32px);
  max-width: 100%;
  min-width: 0;
}

.hero-logo {
  width: clamp(140px, 14vw, 240px);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 3.8vw, 76px);
  line-height: 0.95;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  max-width: 100%;

  /* Never break in the middle of a word — wrap at spaces only. */
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

/* SpeaD banner — right column, top of white box aligns with top of Redrock mark */
.spead-promo {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  width: 100%;
  min-width: 0;
  transition: transform 0.3s ease;
}
.spead-promo:hover { transform: translateY(-4px); }

.spead-promo-logo {
  width: 100%;          /* fills the right column — fully responsive */
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  background: var(--light-grey);
}

.spead-promo-cta {
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 900;
  font-size: clamp(14px, 1.8vw, 26px);
  letter-spacing: clamp(1px, 0.2vw, 3px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  transition: color var(--transition);
}
.spead-promo-cta em {
  font-style: italic;
  font-weight: 900;
}
.spead-promo:hover .spead-promo-cta { color: var(--accent); }

/* Mobile: stack vertically */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
    padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 32px);    /* tighter horizontal on mobile */
    gap: clamp(32px, 5vw, 60px);
    align-content: start;
  }
  .hero-text  { grid-column: 1; grid-row: 1; }
  .spead-promo {
    grid-column: 1;
    grid-row: 2;
    max-width: 400px;
    margin-inline: auto;
  }
}

/* ============================================================
   PRODUCTS & SERVICES
   ============================================================ */
.products {
  padding: var(--section-padding) var(--gutter);
  background: var(--white);
}

.section-header {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--dark-grey);
}

.cards {
  max-width: var(--max-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 56px);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--off-black) 0%, var(--dark-grey) 100%);
  position: relative;
  overflow: hidden;
}
.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(204, 34, 0, 0.18), transparent 60%);
}
.card-media-testing  { background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%); }
.card-media-design   { background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%); }
.card-media-spead    { background: linear-gradient(135deg, #2a0500 0%, #1a1a1a 100%); }

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.card-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--dark-grey);
}
.card-cta {
  align-self: flex-start;
  padding: 14px 32px;
  margin-top: 8px;
  border: 2px solid var(--black);
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--black);
  transition: background var(--transition), color var(--transition);
}
.card-cta:hover,
.card-cta:focus-visible {
  background: var(--black);
  color: var(--white);
}

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
}

/* ============================================================
   QUOTE
   ============================================================ */
.quote {
  padding: var(--section-padding) var(--gutter);
  background: var(--black);
  color: var(--white);
}
.quote-text {
  max-width: 880px;
  margin: 0 auto 24px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 4.2vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.quote-text::before { content: '“'; }
.quote-text::after  { content: '”'; }
.quote-author {
  display: block;
  max-width: 880px;
  margin-inline: auto;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  color: var(--grey);
  letter-spacing: 0.5px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  color: var(--grey);
}
.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
}
.footer-brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  margin-bottom: 20px;
}
.footer-brand .brand-name { font-size: 22px; }
.footer-brand .brand-sub  { font-size: 12px; margin-top: 4px; }

.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 20px;
}
.footer-meta {
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.3px;
}
.footer-meta a {
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color var(--transition);
}
.footer-meta a:hover { border-color: var(--accent); }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .nav-toggle, .skip-link { display: none; }
  body { color: #000; background: #fff; }
  .hero { background: #fff; min-height: auto; }
  .hero-overlay { display: none; }
  .hero-title, .hero-logo, .spead-promo-cta { color: #000; text-shadow: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   SUB-PAGE HERO (smaller hero used on all non-homepage pages)
   ============================================================ */
.page-hero {
  position: relative;
  min-height: clamp(280px, 45vh, 480px);
  padding: clamp(48px, 6vw, 96px) clamp(40px, 11vw, 160px);
  background-color: var(--off-black);
  background-image: url('../images/taos-mountain2560.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.65));
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 2; }
.page-hero .eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 80px);
  line-height: 0.95;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  margin-bottom: 16px;
  max-width: 1100px;
}
.page-hero .lead {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  max-width: 820px;
  margin-top: 16px;
}
@media (max-width: 820px) {
  .page-hero {
    padding: clamp(40px, 8vw, 72px) clamp(20px, 4vw, 32px);
    min-height: 240px;
  }
}

/* ============================================================
   SPEAD MODULE TABS — horizontal sub-nav on each module page
   ============================================================ */
.spead-tabs {
  background: var(--off-black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.spead-tabs ul {
  display: flex;
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}
.spead-tabs a {
  display: inline-block;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.spead-tabs a:hover { color: var(--white); }
.spead-tabs a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   SPEAD MAIN INTERFACE NAVIGATION (spead.html landing page)
   ============================================================ */
.spead-nav-section {
  padding: clamp(48px, 6vw, 96px) clamp(20px, 4vw, 64px);
  background: var(--light-grey);
}
.spead-nav-section header {
  max-width: 820px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  text-align: center;
}
.spead-nav-section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 44px);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.spead-nav-section header p {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--dark-grey);
  line-height: 1.55;
}
.spead-nav-image {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
}
.spead-nav-image > img {
  display: block;
  width: 100%;
  height: auto;
}
/* Hotspots are positioned via CSS variables on each <a> for easy editing.
   --top, --left, --width, --height are percentages relative to the image.   */
.nav-hotspot {
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: var(--width);
  height: var(--height);
  background: rgba(204, 34, 0, 0);
  border-radius: 4px;
  outline: 2px solid transparent;
  transition: background 0.2s, outline-color 0.2s;
  text-decoration: none;
}
.nav-hotspot:hover,
.nav-hotspot:focus-visible {
  background: rgba(204, 34, 0, 0.22);
  outline-color: var(--accent);
}
.nav-hotspot::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translate(-12px, -50%);
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav-hotspot:hover::after,
.nav-hotspot:focus-visible::after { opacity: 1; }

/* ============================================================
   MODULE CONTENT — used on spead-voicecoil.html, etc.
   ============================================================ */
.module-content {
  padding: clamp(48px, 6vw, 96px) clamp(20px, 4vw, 64px);
}
.module-content .container {
  max-width: 1200px;
  margin: 0 auto;
}
.module-content h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin: clamp(40px, 5vw, 64px) 0 16px;
}
.module-content h2:first-child { margin-top: 0; }
.module-content p {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--dark-grey);
  margin-bottom: 18px;
  max-width: 820px;
}
.module-content figure { margin: clamp(24px, 3vw, 48px) 0; }
.module-content figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.module-content figcaption {
  font-size: 14px;
  color: var(--grey);
  margin-top: 12px;
  font-style: italic;
}
