/* ===================================================
   IDM Steel Metal Fabricators LLC — Design System
   =================================================== */

:root {
  /* Colors — dark premium palette */
  --bg-primary: #0d0d0d;
  --bg-surface: #141414;
  --bg-elevated: #1c1c1c;
  --bg-overlay: rgba(0, 0, 0, 0.6);

  --text-primary: #f2ede8;
  --text-secondary: #8a8279;
  --text-muted: #5c5650;

  --accent: #c4a35a;
  --accent-hover: #d4b56c;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.10);

  /* Spacing (8px system) */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-10: 80px;
  --sp-12: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 180ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 500;
}

p {
  color: var(--text-secondary);
  max-width: 60ch;
}

/* ===== UTILITY ===== */
.section-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.section-title {
  margin-bottom: var(--sp-2);
}

.section-subtitle {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-6);
  max-width: 56ch;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  min-height: 48px;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero secondary CTA — high contrast on video */
.btn-services-hero {
  border: 2px solid rgba(196, 163, 90, 0.65);
  background: rgba(196, 163, 90, 0.14);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.btn-services-hero:hover {
  background: rgba(196, 163, 90, 0.28);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(196, 163, 90, 0.2);
}

.btn-full {
  width: 100%;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-3);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  max-width: min(280px, 38vw);
}

/* Mobile nav (default) */
.main-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  padding: var(--sp-10) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transform: translateX(100%);
  transition: transform 300ms var(--ease);
  z-index: 99;
}

.main-nav.is-open {
  transform: translateX(0);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.nav-link {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: var(--radius-pill);
  transition: background var(--duration) var(--ease);
  min-height: 48px;
}

.nav-cta:hover {
  background: var(--accent-hover);
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  z-index: 101;
}

.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 300ms var(--ease), opacity 200ms var(--ease);
  margin-left: auto;
}

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

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

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

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(13, 13, 13, 0.88) 0%,
    rgba(13, 13, 13, 0.65) 60%,
    rgba(13, 13, 13, 0.45) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-3);
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.hero-title {
  margin-bottom: var(--sp-3);
  color: var(--text-primary);
}

.hero-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: var(--sp-4);
  max-width: 50ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* Hero card — hidden on mobile */
.hero-card {
  display: none;
}

/* ===== SERVICES ===== */
.services {
  padding: var(--sp-10) 0;
  background: var(--bg-primary);
}

.services-grid {
  display: flex;
  gap: var(--sp-3);
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  flex: 0 0 88vw;
  min-width: 0;
  transition: border-color var(--duration) var(--ease);
}

.service-card:hover {
  border-color: var(--border-light);
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 163, 90, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
}

.service-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.service-title {
  margin-bottom: var(--sp-1);
}

.service-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== ABOUT ===== */
.about {
  padding: var(--sp-10) 0;
  background: var(--bg-surface);
}

.about-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-6);
}

.about-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: var(--sp-3);
}

.about-stats {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.about-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  border: 1px solid var(--border);
}

.about-image {
  max-width: 320px;
  width: 100%;
}

/* ===== CONTACT ===== */
.contact {
  padding: var(--sp-10) 0;
  background: var(--bg-primary);
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
}

.contact-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
}

.contact-card-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: var(--sp-1);
}

.contact-card-title {
  font-size: 1rem;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
}

.contact-card-value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
}

a.contact-card-value:hover {
  color: var(--accent);
}

.contact-card-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Form */
.contact-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-card);
}

.contact-form-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.contact-form-lead {
  font-size: 0.9375rem;
  margin-bottom: var(--sp-4);
  max-width: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}

.form-input {
  display: block;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px var(--sp-2);
  min-height: 52px;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== CAROUSEL (mobile scroll-snap) ===== */
.carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  scroll-snap-align: start;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-1);
  padding-top: var(--sp-3);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 0 var(--sp-4);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  text-align: center;
}

.footer-brand-block {
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: none;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.footer-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
}

.footer-nav a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
  padding: 2px 0;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-contact-line {
  display: block;
  line-height: 1.5;
}

.footer-contact a.footer-contact-line {
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}

.footer-contact a.footer-contact-line:hover {
  color: var(--accent);
}

.footer-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-services {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-services li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 0;
  position: relative;
  text-align: center;
}

.footer-services li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  opacity: 0.85;
}

.footer-bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: none;
}

.footer-legal {
  margin-top: var(--sp-2);
  font-size: 0.75rem !important;
  color: var(--text-muted);
  opacity: 0.95;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   RESPONSIVE — Tablet (min-width: 768px)
   ================================================================ */
@media (min-width: 768px) {
  .section-container {
    padding: 0 var(--sp-5);
  }

  .services,
  .about,
  .contact {
    padding: var(--sp-12) 0;
  }

  /* Services — 2-column grid, disable carousel */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    overflow: visible;
    scroll-snap-type: none;
  }

  .service-card {
    flex: none;
  }

  .services .carousel-dots {
    display: none;
  }

  /* Contact grid — two columns */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
    align-items: start;
  }

  /* About grid — two columns */
  .about-grid {
    flex-direction: row;
    align-items: center;
  }

  .about-content {
    flex: 1.2;
  }

  .about-image-wrap {
    flex: 0.8;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5);
    align-items: start;
    text-align: left;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
    max-width: 48ch;
    margin-left: 0;
    margin-right: 0;
  }

  .footer-brand {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .footer-col {
    align-items: flex-start;
  }

  .footer-nav {
    align-items: flex-start;
  }

  .footer-contact {
    align-items: flex-start;
  }

  .footer-services {
    align-items: flex-start;
  }

  .footer-services li {
    text-align: left;
  }

  .footer-bottom {
    text-align: left;
  }

  .footer-bottom p {
    text-align: left;
  }
}

/* ================================================================
   RESPONSIVE — Desktop (min-width: 1024px)
   ================================================================ */
@media (min-width: 1024px) {
  /* Nav — desktop layout */
  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-1);
    transform: none;
  }

  .nav-list {
    flex-direction: row;
    gap: 0;
  }

  .nav-link {
    padding: var(--sp-1) var(--sp-2);
    font-size: 0.9375rem;
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: var(--sp-2);
    right: var(--sp-2);
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform var(--duration) var(--ease);
  }

  .nav-link:hover::after {
    transform: scaleX(1);
  }

  /* Hero — side by side */
  .hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-8);
    padding: var(--sp-10) var(--sp-5);
  }

  .hero-content {
    flex: 1;
    max-width: 600px;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    min-width: 340px;
    max-width: 400px;
  }

  .hero-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    padding-bottom: var(--sp-2);
    border-bottom: 1px solid var(--border);
  }

  .hero-card-row {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .hero-card-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
  }

  .hero-card-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
  }

  .hero-card-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
  }

  a.hero-card-value:hover {
    color: var(--accent);
  }

  .hero-card-btn {
    margin-top: var(--sp-1);
  }

  /* Services — 3-column grid */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-stats {
    gap: var(--sp-6);
  }

  .footer-top {
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: var(--sp-6);
  }

  .footer-brand-block {
    grid-column: auto;
    max-width: 36ch;
  }
}
