/* Staun Tyre Deflators — site-wide styles.
   Single shared stylesheet for header, nav, footer, buttons, and color
   variables. Keep it that way — see README "Working on this site" section
   for why. Page-specific overrides belong in that page's own <style> block. */

:root {
  --rust: #ff6700;        /* primary brand color — Staun logo orange */
  --rust-dark: #cc5200;
  --brass: #c49a3e;       /* accent — nods to the brass deflator body */
  --brass-dark: #a37f2f;
  --near-black: #1a140f;
  --charcoal: #2c2620;
  --secondary-gray: #5a534c;
  --light-sand: #f6f1ea;
  --white: #ffffff;
  --text-dark: #241f1a;
  --border-color: #e4dccd;
  --shadow: 0 2px 8px rgba(26, 20, 15, 0.12);
  --shadow-hover: 0 4px 18px rgba(26, 20, 15, 0.18);
}

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

.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;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
}

/* Header & Navigation */
header {
  background: var(--near-black);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 0.98rem;
}

nav a:hover {
  color: var(--brass);
}

/* Grouped nav dropdowns (Shop, Learn) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--white);
  font: inherit;
  font-weight: 500;
  font-size: 0.98rem;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--brass);
}

.nav-dropdown-toggle .caret {
  font-size: 0.65em;
  transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-toggle .caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.9rem;
  min-width: 200px;
  background: var(--near-black);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 0.5rem 0;
  z-index: 60;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 0.65rem 1.25rem;
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--near-black) 0%, var(--charcoal) 55%, var(--rust-dark) 130%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: #e7ded0;
}

/* Product-page photo hero: background-image set inline per page via
   style="background-image: url('images/header-x.png')" — kept inline
   (not var()'d through this stylesheet) because a relative url() passed
   through a CSS custom property resolves against the stylesheet that
   declares the consuming property, not the element with the inline
   declaration; an inline background-image resolves against the page
   itself, which is correct both on the deployed site and inside a
   sandboxed preview served from a different origin/subpath.
   aspect-ratio is locked to the source photos' real ratio (1500x400 /
   1117x298 are both ~3.75:1) so the box always matches the image exactly —
   cover then never has anything to crop, at any viewport width. This is
   why no min-height/media-query sizing is used here: a fixed pixel height
   is what caused the mobile text-cropping bug in the first place. */
.hero-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 1500 / 400;
}

.cta-button {
  display: inline-block;
  background: var(--rust);
  color: var(--white);
  padding: 1rem 2.5rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--rust-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 68, 14, 0.35);
}

.cta-button-ebay {
  background: #0064d2;
}

.cta-button-ebay:hover {
  background: #0050a8;
  box-shadow: 0 4px 12px rgba(0, 100, 210, 0.35);
}

.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.section-header p {
  font-size: 1.15rem;
  color: var(--secondary-gray);
}

/* Product grid / cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.product-info {
  padding: 1.5rem;
}

.product-badge {
  display: inline-block;
  background: var(--rust);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-badge.badge-brass {
  background: var(--brass-dark);
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--near-black);
}

.product-info p {
  color: var(--secondary-gray);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.product-features {
  list-style: none;
  margin-bottom: 1rem;
}

.product-features li {
  padding: 0.25rem 0;
  color: var(--secondary-gray);
  font-size: 0.9rem;
}

.product-features li::before {
  content: "\2713 ";
  color: var(--rust);
  font-weight: bold;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
}

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

.btn-primary:hover {
  background: var(--rust-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--near-black);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--charcoal);
  transform: translateY(-2px);
}

/* Homepage featured tiles */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.aplus-banners img {
  display: block;
  width: 100%;
  height: auto;
}

.feature-tile {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-decoration: none;
}

.feature-tile:hover,
.feature-tile:focus-visible {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.feature-tile .placeholder-img {
  aspect-ratio: 1 / 1;
}

.feature-tile-label {
  display: block;
  background: var(--near-black);
  color: var(--white);
  text-align: center;
  padding: 0.65rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Placeholder image blocks — swap for real photography.
   Keeping these as a distinct, honest style (not a fake photo) until
   product/lifestyle photography is dropped into /images. */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--light-sand), var(--light-sand) 14px, #efe6d8 14px, #efe6d8 28px);
  border: 1px dashed var(--brass-dark);
  color: var(--secondary-gray);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 1rem;
  line-height: 1.4;
}

.placeholder-img span {
  background: rgba(255, 255, 255, 0.82);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
}

.product-card .placeholder-img {
  width: 100%;
  height: 260px;
}

.main-image.placeholder-img {
  height: 380px;
  border-radius: 8px;
}

.main-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  border: 1px solid var(--border-color);
}

.feature-tile img:not(.placeholder-img) {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--light-sand);
}

.nomenclature-figure {
  margin-top: 1rem;
}

.nomenclature-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Product detail page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-details h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.spec-line {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rust-dark);
  margin-bottom: 1.25rem;
}

.product-description {
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--secondary-gray);
}

.features-list {
  margin-bottom: 2rem;
}

.features-list h3 {
  margin-bottom: 1rem;
  color: var(--near-black);
}

.features-list ul {
  list-style: none;
}

.features-list li {
  padding: 0.5rem 0;
  color: var(--secondary-gray);
}

.features-list li::before {
  content: "\2022 ";
  color: var(--rust);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Brand story */
.brand-story {
  background: var(--light-sand);
  padding: 4rem 2rem;
}

.brand-story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.brand-story h2 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--near-black);
}

.brand-story-content .brand-story-tagline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--near-black);
  margin-bottom: 1.5rem;
}

.brand-story p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--secondary-gray);
  margin-bottom: 1rem;
  text-align: left;
}

.brand-story-content > p {
  text-align: center;
}

.brand-story-origin {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--near-black);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* UGC video gallery */
.ugc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.ugc-grid video {
  width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: 8px;
  background: var(--near-black);
}

.ugc-grid figure {
  margin: 0;
}

.ugc-grid figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--near-black);
  text-align: center;
}

/* Video instructions page: video + which product(s) it applies to */
.video-instruction-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.video-instruction-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.video-instruction-card video {
  width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: 8px;
  background: var(--near-black);
}

.video-instruction-info h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.applies-to {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.applies-to-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary-gray);
  width: 100%;
}

.applies-to-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  width: 84px;
}

.applies-to-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.applies-to-item:hover img {
  transform: translateY(-2px);
}

.applies-to-item span {
  font-size: 0.78rem;
  text-align: center;
  color: var(--near-black);
  font-weight: 500;
}

@media (max-width: 768px) {
  .video-instruction-card {
    grid-template-columns: 1fr;
  }
}

.callout {
  border-left: 4px solid var(--rust);
  padding-left: 1.5rem;
  margin: 3rem 0;
}

.callout h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.callout p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--secondary-gray);
}

.cta-panel {
  background: var(--light-sand);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 3rem;
}

.cta-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.cta-panel p {
  color: var(--secondary-gray);
  margin-bottom: 1.5rem;
}

/* FAQ accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--near-black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--rust);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 1rem;
  color: var(--secondary-gray);
  font-size: 1rem;
  line-height: 1.8;
}

/* Blog */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.empty-state {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--light-sand);
  border-radius: 8px;
}

.empty-state h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--near-black);
}

.empty-state p {
  color: var(--secondary-gray);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

/* Contact form */
.contact-embed {
  background: var(--light-sand);
  padding: 3rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-embed .form-wrap {
  width: 100%;
  max-width: 560px;
}

.contact-embed .intro {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--secondary-gray);
  margin-bottom: 2rem;
  text-align: center;
}

.contact-embed form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.contact-embed .name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-embed .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-embed label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--near-black);
}

.contact-embed label .req {
  color: var(--rust);
}

.contact-embed input[type="text"],
.contact-embed input[type="email"],
.contact-embed textarea {
  background: var(--white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 0.95rem;
  padding: 0.7rem 0.875rem;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  font-family: inherit;
}

.contact-embed input:focus,
.contact-embed textarea:focus {
  border-color: var(--rust);
}

.contact-embed textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-embed .actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-embed button[type="submit"] {
  background: var(--rust);
  border: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 2.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.contact-embed button[type="submit"]:hover {
  background: var(--rust-dark);
}

.contact-embed button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-embed .status-msg {
  font-size: 0.9rem;
  display: none;
}

.contact-embed .status-msg.success {
  color: #3f7d2f;
}

.contact-embed .status-msg.error {
  color: #b3261e;
}

/* Footer */
footer {
  background: var(--near-black);
  color: var(--white);
  padding: 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--brass);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-social a {
  color: var(--white);
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--brass);
}

.footer-note {
  color: #b7ada0;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.15rem;
  }

  .product-grid,
  .product-detail,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .brand-story-content .brand-story-tagline,
  .brand-story h2 {
    font-size: 1.4rem;
  }

  .header-content {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    width: 100%;
    order: 3;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav ul.nav-open {
    max-height: 760px;
    padding: 0.5rem 0 1rem;
  }

  nav ul li a {
    display: block;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-dropdown-toggle {
    width: 100%;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    opacity: 0.65;
  }

  .nav-dropdown-toggle .caret {
    display: none;
  }

  .nav-dropdown-menu {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow: visible;
  }

  .nav-dropdown-menu li a {
    padding: 0.65rem 0 0.65rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
  }

  .contact-embed .name-row {
    grid-template-columns: 1fr;
  }

  .founder-intro {
    text-align: center;
  }
}
