/* ==========================================================================
   Latitude Metals — Industrial, clean, responsive styles
   ========================================================================== */

:root {
  /* Metallic palette tuned to the LM logo plate (~#cfcfcf–#d8d8d8) */
  --color-slate: #3a3a3a;
  --color-slate-deep: #242424;
  --color-slate-mid: #5a5a5a;
  --color-silver: #9a9a9a;
  --color-silver-light: #c8c8c8;
  --color-metal: #d4d4d4;
  --color-white: #ffffff;
  --color-off-white: #e8e8e8;
  --color-surface: #d6d6d6;
  --color-amber: #ea580c;
  --color-amber-hover: #c2410c;
  --color-amber-soft: #fff7ed;
  --color-success: #15803d;
  --color-error: #b91c1c;
  --color-border: #bdbdbd;
  --brushed-metal: linear-gradient(
    180deg,
    #e4e4e4 0%,
    #d6d6d6 45%,
    #cfcfcf 100%
  );

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;

  --radius: 4px;
  --shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.08);
  --header-h: 4.25rem;
  --max-width: 1120px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-slate-deep);
  background: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 var(--space-md);
  color: var(--color-slate-deep);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  text-transform: uppercase;
}

h3 {
  font-size: 1.35rem;
  text-transform: uppercase;
}

p {
  margin: 0 0 var(--space-md);
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--brushed-metal);
  border-bottom: 1px solid #b8b8b8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.logo img {
  height: 2.75rem;
  width: auto;
  display: block;
  border: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-slate-mid);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--color-slate-deep);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-slate-mid);
  color: var(--color-slate-deep);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--color-amber);
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-amber-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(226, 232, 240, 0.45);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

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

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  color: var(--color-white);
  overflow: hidden;
  background:
    linear-gradient(
      115deg,
      rgba(36, 36, 36, 0.88) 0%,
      rgba(58, 58, 58, 0.62) 48%,
      rgba(36, 36, 36, 0.42) 100%
    ),
    url("assets/hero-sheet-metal.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(148, 163, 184, 0.04) 12px,
    rgba(148, 163, 184, 0.04) 13px
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: var(--space-2xl) 0;
  animation: heroRise 0.9s ease both;
}

.hero-logo {
  height: clamp(4.5rem, 12vw, 7rem);
  width: auto;
  display: block;
  border: 0;
  margin-bottom: var(--space-md);
}

.hero h1 {
  color: var(--color-white);
  max-width: 28ch;
  margin-bottom: var(--space-sm);
}

.hero p {
  max-width: 56ch;
  color: var(--color-silver-light);
  font-size: 1.15rem;
  margin-bottom: var(--space-lg);
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--space-2xl) 0;
}

.section-header {
  max-width: 40rem;
  margin-bottom: var(--space-xl);
}

.section-header--wide {
  max-width: 56rem;
}

.section-header p {
  color: var(--color-slate-mid);
}

.container--wide {
  width: min(100% - 2rem, 1400px);
}

.section-alt {
  background:
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-block: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Specs / Capabilities
   -------------------------------------------------------------------------- */

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
}

.spec-item {
  padding: var(--space-lg) var(--space-lg);
  border-left: 3px solid var(--color-amber);
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-soft);
  animation: fadeUp 0.7s ease both;
}

.spec-item:nth-child(2) {
  animation-delay: 0.08s;
}

.spec-item:nth-child(3) {
  animation-delay: 0.16s;
}

.spec-item:nth-child(4) {
  animation-delay: 0.24s;
}

.spec-item h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-slate);
}

.spec-item ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-item li {
  padding: 0.3rem 0;
  color: var(--color-slate-mid);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.spec-item li:last-child {
  border-bottom: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Value strip
   -------------------------------------------------------------------------- */

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.value-strip article {
  text-align: left;
}

.value-strip h3 {
  color: var(--color-amber);
  margin-bottom: var(--space-xs);
}

.value-strip p {
  margin: 0;
  color: var(--color-silver-light);
}

.value-band {
  background:
    linear-gradient(135deg, var(--color-slate-deep) 0%, var(--color-slate) 55%, #273549 100%);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Quote Form
   -------------------------------------------------------------------------- */

.quote-section {
  background:
    radial-gradient(ellipse at top right, rgba(234, 88, 12, 0.08), transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

#vtiger-form-container {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 760px;
}

.quote-form {
  display: grid;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

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

.form-field label {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--color-slate);
}

.form-field .required {
  color: var(--color-amber);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-off-white);
  color: var(--color-slate-deep);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-amber);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
  background: var(--color-white);
}

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

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-slate-mid);
}

.form-status {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius);
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: var(--color-success);
}

.form-status.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-error);
}

.form-status h3 {
  color: inherit;
  margin-bottom: var(--space-xs);
  text-transform: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
}

.form-status ul {
  margin: var(--space-sm) 0 0;
  padding-left: 1.1rem;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

.btn.is-loading .btn-label {
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.page-hero {
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.8)),
    url("https://images.unsplash.com/photo-1581094794329-c8112c4e5190?auto=format&fit=crop&w=1600&q=80")
      center / cover no-repeat;
  color: var(--color-white);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  max-width: 42ch;
  color: var(--color-silver-light);
  margin: 0;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-lg);
}

.filter-btn {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-slate-mid);
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn.is-active {
  background: var(--color-slate);
  border-color: var(--color-slate);
  color: var(--color-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--color-slate);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: left;
  animation: fadeUp 0.6s ease both;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.06);
}

.gallery-item figcaption,
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.88));
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery-item.is-hidden {
  display: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-inner {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 90vh;
}

.lightbox-inner img {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  color: var(--color-silver-light);
  text-align: center;
  margin-top: var(--space-md);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--color-amber);
}

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

.site-footer {
  background: var(--color-slate-deep);
  color: var(--color-silver);
  padding: var(--space-xl) 0;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
}

.footer-logo {
  height: 2.15rem;
  width: auto;
  display: block;
  border: 0;
  margin-bottom: var(--space-sm);
}

.site-footer a {
  color: var(--color-silver-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--color-white);
}

.footer-meta {
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .specs-grid,
  .gallery-grid,
  .value-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .logo img {
    height: 2.25rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(90, 90, 90, 0.15);
  }

  .form-row,
  .specs-grid,
  .gallery-grid,
  .value-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: center;
    min-height: 85vh;
  }

  .hero-content {
    padding-block: var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
