/* ---------- GLOBAL STYLES ---------- */
:root {
  --bg: #0f1115;
  --bg-alt: #171a21;
  --card: #1f232b;
  --accent: #e79b31;
  --accent-soft: rgba(231, 155, 49, 0.14);
  --text: #f5f5f5;
  --muted: #b7b9c0;
  --border: #272b34;
  --danger: #d9534f;
  --success: #4caf50;
  --link: #5fd4d4;
  --link-hover: #8ae6e6;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #1b2735 0, #090a0f 60%);
  color: var(--text);
  line-height: 1.6;
  position: relative; /* for watermark layer */
  z-index: 0;
}

/* tiled watermark-style background logo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/LOGO.jpg");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 20%;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

/* Light cyan links site-wide */
a {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--link); /* keep visited links same color */
}

/* Lighter cyan + orange underline on hover site-wide */
a:hover {
  color: var(--link-hover);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

/* Match hover underline when tabbing through links */
a:focus-visible {
  outline: none;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

/* Buttons should NOT adopt link underline/visited behavior */
.btn,
.btn:visited {
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

/* Ensure visited doesn't turn button links blue */
.btn-outline,
.btn-outline:visited {
  color: var(--muted);
}

.btn-primary,
.btn-primary:visited {
  color: #16120b;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  color: var(--muted);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #16120b;
}

/* Make "4x4.rocks" orange anywhere you wrap it like:
   <span class="site-name">4x4.rocks</span>
*/
.site-name {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* If site-name is inside a link, keep it orange even on hover */
a .site-name,
a.site-name,
a:hover .site-name,
a.site-name:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3rem 0;
}

h1, h2, h3 {
  font-weight: 650;
}

/* Section titles (h2/h3/etc) */
.section-title {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: var(--muted);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Category + subcategory titles */
.card-title {
  color: var(--accent);
}

/* Subcategory headings within page content */
main h3,
main h4 {
  color: var(--accent);
}

/* ---------- HEADER / NAV ---------- */

header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(6, 7, 11, 0.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

/* Brand (supports BOTH: old text brand and new logo brand) */
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit; /* prevents link color from coloring tagline */
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none; /* prevent global underline on logo/tagline */
}

/* Hide the old orange "4x" square everywhere */
.brand-mark {
  display: none;
}

/* NEW logo sizing */
.brand-logo {
  height: 100px; /* your requested size */
  width: auto;
  display: block;
}

/* Scale logo down on smaller screens so the header doesn't explode */
@media (max-width: 900px) {
  .brand-logo { height: 70px; }
}
@media (max-width: 600px) {
  .brand-logo { height: 54px; }
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* OLD text-brand support (if any page still uses it) */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span:first-child {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-text span:last-child {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--link);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.12rem;
}

/* Header keeps the orange bar hover effect */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease-out;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Prevent double-underline in header (global hover underline + header bar) */
.nav-links a:hover,
.nav-links a:focus-visible {
  text-decoration: none;
  color: var(--link-hover);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.btn-outline {
  border-color: var(--border);
  background: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f8c15a);
  font-weight: 600;
  box-shadow: 0 0 22px rgba(231, 155, 49, 0.45);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 0 26px rgba(231, 155, 49, 0.65);
}

.burger {
  display: none;
  width: 24px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 999px;
}

/* ---------- HERO SECTION ---------- */

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.4rem;
  align-items: center;
}

.hero-kicker {
  margin-bottom: 0.8rem;
}

.hero-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-subtitle {
  color: var(--muted);
  margin-bottom: 1.35rem;
  max-width: 32rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.hero-rig-card {
  background: radial-gradient(circle at top left, #2d3544 0, #151821 40%);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.hero-rig-label {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  background: rgba(10, 11, 15, 0.75);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-rig-photo {
  height: 210px;
  border-radius: 12px;
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25)),
    url("images/3wheel02.jpg");
  background-size: cover;
  background-position: center;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.4);
}

/* NEW: fine-print credit under the hero photo (index.html) */
.photo-credit {
  margin: -0.45rem 0 0.9rem; /* pulls credit closer to the photo */
  font-size: 0.5rem;
  color: var(--muted);
}

.photo-credit-name {
  font-style: italic;
}

.hero-rig-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.8rem;
}

.hero-rig-meta-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-rig-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-rig-location {
  color: var(--muted);
  font-size: 0.8rem;
}

.hero-rig-quick {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- LAYOUT HELPERS ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-list {
  list-style: none;
  font-size: 0.9rem;
  margin: 0.2rem 0 0.4rem;
}

.card-list li + li {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.small-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--link);
}

.small-link:hover {
  color: var(--link-hover);
}

/* ---------- SECTIONS ---------- */

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.rig-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- MEDIA (VIDEO & PHOTO) ---------- */

.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.video-thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  position: relative;
}

.video-embed {
  background: #000;
}

.video-embed video {
  width: 100%;
  height: auto;
  display: block;
}

.video-thumb-inner {
  height: 170px;
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1)),
    url("https://images.unsplash.com/photo-1504215680853-026ed2a45def?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
}

.video-label {
  position: absolute;
  bottom: 0.55rem;
  left: 0.65rem;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.video-meta {
  padding: 0.55rem 0.7rem 0.7rem;
  font-size: 0.8rem;
}

.video-meta-title {
  margin-bottom: 0.2rem;
  font-weight: 550;
  color: var(--accent);
}

.video-meta-sub {
  color: var(--muted);
}

/* --- Photo grid for build & media pages --- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-grid figure {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
}

.photo-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-grid figcaption {
  padding: 0.6rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- CTA ---------- */

.cta-section {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  background: radial-gradient(circle at center, #232735 0, #0b0c10 58%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78);
  margin-bottom: 2.5rem;
}

.cta-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.cta-sub {
  max-width: 30rem;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .split-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 2rem;
  }
}

/* UPDATED: mobile nav opens/closes via .nav.is-open (set by JS) */
@media (max-width: 780px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-links,
  .nav-cta {
    display: none;     /* hidden until burger toggles open */
    width: 100%;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.9rem 0 0.6rem;
  }

  .nav-cta {
    gap: 0.6rem;
    padding: 0 0 0.9rem;
  }

  .nav.is-open .nav-links,
  .nav.is-open .nav-cta {
    display: flex;
  }

  .burger {
    display: flex;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .videos-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-rig-photo {
    height: 190px;
  }
}

@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- FOOTER (Simple centered footer layout) ---------- */

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.8rem 0 2rem;
  background: #050608;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-simple {
  text-align: center;
}

.footer-simple-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.footer-simple-tagline {
  margin-bottom: 0.8rem;
  font-size: 0.72rem;
  color: #9fa3ac;
}

.footer-simple-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-bottom: 0.8rem;
  font-size: 0.76rem;
}

.footer-simple-nav a {
  color: var(--link);
  text-decoration: none;
}

.footer-simple-nav a:hover {
  color: var(--link-hover);
}

.footer-simple-copy {
  font-size: 0.7rem;
  color: #6c7079;
}