/* Cameron Welding Supply — single shared stylesheet (mobile-first) */

:root {
  --navy: #17365d;
  --navy-dark: #102745;
  --navy-mid: #1e4577;
  --sky: #a9c1e8;
  --accent: #919ec6;
  --white: #ffffff;
  --ink: #1d2733;
  --muted: #55637a;
  --bg-soft: #f4f6fa;
  --line: #dfe5f0;
  --header-h: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 39, 69, 0.06), 0 2px 8px rgba(16, 39, 69, 0.08);
  --shadow-md: 0 2px 4px rgba(16, 39, 69, 0.08), 0 12px 32px rgba(16, 39, 69, 0.14);
  --shadow-lg: 0 4px 8px rgba(16, 39, 69, 0.10), 0 24px 56px rgba(16, 39, 69, 0.22);
  --space: clamp(1rem, 3vw, 2rem);
  --section-pad: clamp(3.5rem, 9vw, 7rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.75vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.75vw, 1.5rem); }

.section-title { text-align: center; }
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  margin: 0.5em auto 0;
  background: linear-gradient(90deg, var(--navy), var(--accent));
}

.container {
  width: min(100% - 2 * var(--space), 1200px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--navy);
  padding: 12px 20px;
  z-index: 300;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-solid {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-solid:hover {
  background: var(--navy-mid);
  box-shadow: var(--shadow-md);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover { box-shadow: var(--shadow-md); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-jumbo {
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.3rem);
  padding: 0.85em 1.7em;
}

.phone-icon::before { content: "\260E\FE0E"; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.text-link:hover { border-bottom-color: var(--navy); }

/* ---------- Chips ---------- */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.75rem 0 0;
  padding: 0;
}
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
}
.chips-dark li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--navy);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Blur lives on ::before — backdrop-filter directly on a sticky header
     creates a containing block that traps the fixed-position mobile menu. */
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}

.header-inner {
  width: min(100% - 2 * var(--space), 1360px);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo { display: flex; align-items: center; min-width: 0; }
.logo img { width: auto; height: clamp(40px, 10vw, 54px); }

/* Mobile nav: full-screen overlay */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.site-nav.open {
  opacity: 1;
  visibility: visible;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 3vh, 1.5rem);
  text-align: center;
}
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 4px 16px;
  color: var(--white);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--sky); }
.site-nav .nav-call {
  background: var(--white);
  color: var(--navy);
  font-size: 1.15rem;
}
.site-nav .nav-call:hover { background: #e8ecf4; }

/* Hamburger */
.nav-toggle {
  position: relative;
  z-index: 160;
  width: 48px;
  height: 48px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s, opacity 0.25s, background-color 0.25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: var(--white); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

body.nav-open { overflow: hidden; }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    background: none;
    opacity: 1;
    visibility: visible;
    display: block;
    transition: none;
  }
  .site-nav ul {
    flex-direction: row;
    gap: 0.25rem;
  }
  .site-nav a:not(.btn) {
    position: relative;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 600;
  }
  .site-nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 8px;
    height: 2px;
    border-radius: 1px;
    background: var(--navy);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
  }
  .site-nav a:not(.btn):hover { color: var(--navy); }
  .site-nav a:not(.btn):hover::after { transform: scaleX(1); }
  .site-nav .nav-call {
    background: var(--navy);
    color: var(--white);
    font-size: 0.95rem;
    margin-left: 0.85rem;
  }
  .site-nav .nav-call:hover { background: var(--navy-mid); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(145, 158, 198, 0.28), transparent 65%),
    radial-gradient(900px 480px at -10% 110%, rgba(30, 69, 119, 0.55), transparent 60%),
    linear-gradient(165deg, var(--navy) 40%, var(--navy-dark) 100%);
  color: var(--white);
  padding-block: var(--section-pad);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.hero-copy h1 { margin-bottom: 0.45em; }
.hero-copy > p { color: rgba(255, 255, 255, 0.92); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.75rem;
}

.hero-areas-label {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--sky);
  margin-bottom: 0;
}

.hero-photo {
  display: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: -1px;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 690px) {
  .hero-photo {
    display: block;
    max-height: 600px;
  }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* ---------- Highlights ---------- */

.highlights {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem var(--space);
}
@media (min-width: 800px) {
  .highlights-grid { grid-template-columns: repeat(4, 1fr); }
}

.highlight {
  text-align: center;
  display: grid;
  gap: 0.15rem;
}
.highlight-figure {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.highlight-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Products ---------- */

.products {
  padding-block: var(--section-pad);
  background: var(--white);
}

.products-grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 800px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-media {
  position: relative;
  aspect-ratio: 16 / 8.5;
}
.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 39, 69, 0.88) 0%, rgba(16, 39, 69, 0.35) 55%, rgba(16, 39, 69, 0.15) 100%);
}
.product-media h3 {
  position: absolute;
  z-index: 1;
  left: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  bottom: 1rem;
  margin: 0;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.product-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.product-body p { margin: 0 0 0.75rem; }
.product-body .chips { margin: 0 0 1rem; }
.product-body .text-link { margin-top: auto; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  padding-block: var(--section-pad);
  background-image: url('../images/truck.jpg');
  background-size: cover;
  background-position: center;
}
@media (min-width: 1000px) {
  .contact { background-attachment: fixed; }
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(244, 246, 250, 0.97), rgba(244, 246, 250, 0.88));
}

.contact-inner { position: relative; }

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}

.contact-aside h3 { margin-bottom: 0.4em; }
.contact-aside > p { color: var(--muted); max-width: 44ch; }
.contact-aside .btn { margin-block: 0.5rem 1.25rem; }

.contact-areas {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 44ch;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.field-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 540px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--navy);
}
.req { color: #c02b0a; }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  color: var(--ink);
  border: 1px solid #b9c2d6;
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23, 54, 93, 0.18);
}

.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn-submit {
  width: 100%;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */

.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.site-footer p { margin: 0.3em 0; }
.footer-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.footer-tagline {
  color: var(--sky);
  font-size: 0.95rem;
}
.site-footer a {
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 8px;
}
.site-footer a:hover { color: var(--sky); }
.site-footer .footer-areas {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 60ch;
  margin-inline: auto;
}
.site-footer .footer-copyright {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Utility pages (404 / thanks) ---------- */

.page-simple {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(145, 158, 198, 0.28), transparent 65%),
    linear-gradient(165deg, var(--navy) 40%, var(--navy-dark) 100%);
  color: var(--white);
  padding: var(--section-pad) var(--space);
}
.page-simple .btn { margin-top: 1.25rem; }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* If JS never runs, everything stays visible */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
