/* ============================================================
   NMA Custom Welding & Fabrication — Main Stylesheet
   Phase 3 Local Build — 2026-07-17
   ============================================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
  --bg-dark: #1A1A1A;
  --bg-darker: #111111;
  --bg-card: #252525;
  --bg-light: #F5F3EF;
  --bg-warm: #EDE8E0;
  --text-light: #E8E0D5;
  --text-muted: #A09890;
  --text-dark: #1A1A1A;
  --text-body: #3D3832;
  --accent: #B8631A;
  --accent-light: #D4782F;
  --accent-dark: #8B4513;
  --accent-glow: rgba(184, 99, 26, 0.2);
  --border-subtle: #D5CFC5;
  --border-dark: #333333;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --font-display: 'Oswald', 'Impact', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

h1,h2,h3,h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Navigation --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
  height: var(--nav-height);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: 0; height: 48px; flex-shrink: 0; }
.logo svg { height: 40px; width: auto; }
.logo-img { height: 44px; width: auto; }

.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; }
.nav-links a {
  color: var(--text-muted); font-size: 0.875rem;
  font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 8px 0; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-light); border-bottom-color: var(--accent);
}
.nav-phone {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.nav-phone a {
  color: var(--text-light); font-weight: 600; font-size: 0.95rem;
  white-space: nowrap;
}
.nav-phone a:hover { color: var(--accent-light); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em;
  text-transform: uppercase; cursor: pointer; border: none;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); color: white; }
.btn-outline {
  background: transparent; color: var(--text-light);
  border: 2px solid var(--text-muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-light {
  background: var(--bg-light); color: var(--text-dark);
  border: 2px solid var(--bg-light);
}
.btn-light:hover { background: white; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-light); margin: 5px 0; transition: 0.3s; }

/* --- Hero Section --- */
.hero {
  position: relative; background: var(--bg-dark);
  min-height: 75vh; display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 60%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    rgba(26,26,26,0.92) 0%,
    rgba(26,26,26,0.78) 45%,
    rgba(26,26,26,0.35) 100%
  );
}
.hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero-eyebrow {
  color: var(--accent-light); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px;
  font-family: var(--font-body);
}
.hero h1 {
  color: var(--text-light); font-size: 3.5rem; font-weight: 900;
  margin-bottom: 20px; line-height: 1.08;
}
.hero h1 span { color: var(--accent-light); }
.hero p {
  color: var(--text-muted); font-size: 1.15rem; line-height: 1.7;
  margin-bottom: 32px; max-width: 520px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Trust Strip --- */
.trust-strip {
  background: var(--bg-darker); padding: 28px 0;
  border-bottom: 1px solid var(--border-dark);
}
.trust-items {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
}
.trust-item .num { color: var(--accent-light); font-weight: 800; font-size: 1.3rem; font-family: var(--font-display); }

/* --- Sections --- */
.section { padding: 96px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-light { background: var(--bg-light); }
.section-warm { background: var(--bg-warm); }
.section-label {
  color: var(--accent); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px;
  font-family: var(--font-body);
}
.section-dark .section-label { color: var(--accent-light); }
.section-title { font-size: 2.4rem; font-weight: 800; margin-bottom: 16px; }
.section-dark .section-title { color: var(--text-light); }
.section-subtitle {
  color: var(--text-body); font-size: 1.05rem; max-width: 600px;
  margin-bottom: 48px; line-height: 1.7;
}
.section-dark .section-subtitle { color: var(--text-muted); }

/* --- Service Cards --- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border-dark);
  border-radius: var(--radius-md); padding: 36px;
  transition: transform 0.2s, border-color 0.2s;
}
.service-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.service-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--accent-glow); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px; font-size: 1.4rem;
  color: var(--accent-light);
}
.service-card h3 { color: var(--text-light); font-size: 1.25rem; margin-bottom: 12px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }

/* --- Project Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 32px 20px 16px; opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption span {
  color: var(--text-light); font-size: 0.85rem; font-weight: 500;
}

/* --- About Section --- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.about-image img { border-radius: var(--radius-md); aspect-ratio: 3/4; object-fit: cover; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-body); margin-bottom: 16px; line-height: 1.7; }
.section-dark .about-text p { color: var(--text-muted); }

/* --- Process / Mobile+Shop --- */
.process-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.process-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 40px; border: 1px solid var(--border-dark);
}
.process-card.light { background: white; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); }
.process-card.light h3 { color: var(--text-dark); }
.process-card.light p { color: var(--text-body); }
.process-card h3 { color: var(--text-light); font-size: 1.3rem; margin-bottom: 12px; }
.process-card p { color: var(--text-muted); line-height: 1.7; }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-dark); border-radius: var(--radius-md);
  padding: 56px 48px; text-align: center;
  border: 1px solid var(--border-dark);
}
.cta-banner h2 { color: var(--text-light); font-size: 2rem; margin-bottom: 12px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-banner .cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Contact Info / Service Area --- */
.contact-summary { text-align: center; max-width: 500px; margin: 0 auto; }
.contact-summary h2 { margin-bottom: 24px; }
.contact-info-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.contact-info-list li { display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 1.05rem; }
.contact-info-list .icon { color: var(--accent); font-size: 1.2rem; }
.section-dark .contact-info-list li { color: var(--text-muted); }
.section-dark .contact-info-list a { color: var(--text-light); }
.service-area-note {
  text-align: center; font-size: 0.9rem; color: var(--text-muted);
  max-width: 600px; margin: 0 auto; font-style: italic;
}

/* --- Quote Form --- */
.form-section { max-width: 720px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px;
  color: currentColor; text-transform: uppercase; letter-spacing: 0.04em;
}
.section-warm .form-group label { color: var(--text-dark); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--font-body); transition: border-color 0.2s;
}
.form-group input, .form-group select {
  border: 1px solid var(--border-subtle); background: white;
}
.form-group textarea {
  border: 1px solid var(--border-subtle); background: white;
  resize: vertical; min-height: 120px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-file-upload {
  border: 2px dashed var(--border-subtle); border-radius: var(--radius-md);
  padding: 32px; text-align: center; cursor: pointer; transition: border-color 0.2s;
}
.form-file-upload:hover { border-color: var(--accent); }
.form-file-info { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.form-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--text-muted); }
.form-consent input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.form-notice {
  margin-top: 24px; padding: 16px; background: var(--bg-warm);
  border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-body);
  text-align: center; border: 1px solid var(--border-subtle);
}
.section-warm .form-notice { background: white; }

/* --- Privacy / Policy Pages --- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; margin-top: 40px; margin-bottom: 12px; }
.prose h3 { font-size: 1.2rem; margin-top: 28px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--text-body); margin-bottom: 12px; line-height: 1.7; }
.prose ul { padding-left: 24px; margin-bottom: 16px; }
.prose a { color: var(--accent); text-decoration: underline; }

/* --- Page Header (for interior pages) --- */
.page-header {
  background: var(--bg-dark); padding: 72px 0 56px; text-align: center;
}
.page-header h1 { color: var(--text-light); font-size: 2.8rem; margin-bottom: 12px; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-darker); padding: 64px 0 32px;
  border-top: 1px solid var(--border-dark);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; line-height: 1.6; }
.footer-col h4 { color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border-dark); text-align: center;
  color: var(--text-muted); font-size: 0.8rem;
}

/* --- 404 Page --- */
.page-404 { text-align: center; padding: 120px 0; }
.page-404 h1 { font-size: 5rem; color: var(--accent); margin-bottom: 8px; }
.page-404 h2 { font-size: 1.8rem; margin-bottom: 16px; }
.page-404 p { color: var(--text-body); margin-bottom: 32px; }

/* --- Desktop tel:/sms: link behaviour --- */
/* On desktop, make tel: links non-clickable but keep text selectable */
@media (min-width: 769px) {
  a[href^="tel:"] {
    pointer-events: none;
    cursor: text;
    text-decoration: none;
  }
  a[href^="tel:"].btn {
    cursor: default;
  }
}

/* --- Desktop/Mobile SMS behaviour --- */
.desktop-text-btn {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  color: var(--text-body);
}
.desktop-text-btn strong {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-dark);
  margin-left: 4px;
}

@media (max-width: 768px) {
  .desktop-text-btn { display: none; }
  .mobile-only-btn { display: inline-flex; }
}

@media (min-width: 769px) {
  .mobile-only-btn { display: none; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.8rem; }
  .section { padding: 64px 0; }
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--bg-dark); flex-direction: column; padding: 24px; gap: 16px; border-bottom: 1px solid var(--border-dark); }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .nav-phone .btn { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
  .hero-overlay { background: linear-gradient(0deg, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.7) 100%); }
  .hero-content { max-width: 100%; }
  .trust-items { gap: 24px; }
  .cta-banner { padding: 40px 24px; }
  .page-header h1 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
}

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

.fade-up {
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s ease-out forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100px; left: 24px; background: var(--accent);
  color: white; padding: 12px 20px; z-index: 200; border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }
