/* ============================================================
   BCD INDUSTRIES — Design Tokens
   Palette derived from the brand badge: charcoal steel + honey gold
   ============================================================ */

:root {
  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 7vw, 7.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius — mostly square, chamfered industrial feel */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1220px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Tanker', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'General Sans', 'Inter', 'Helvetica Neue', sans-serif;

  /* Brand constants (fixed regardless of theme) */
  --brand-honey: #f0a81e;
  --brand-honey-bright: #ffc24d;
  --brand-burnt: #b9740f;
  --brand-burnt-deep: #8a570a;
  --brand-steel-100: #e7e4de;
  --brand-steel-300: #c9c6c0;
  --brand-steel-500: #9a9690;
  --brand-steel-700: #5f5b56;
  --brand-charcoal-950: #14130f;
  --brand-charcoal-900: #1a1815;
  --brand-cream: #f8f0e8;
}

/* ============================================================
   LIGHT MODE
   ============================================================ */
:root,
[data-theme='light'] {
  --color-bg: #f8f0e8;
  --color-surface: #fbf6ef;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f0e6d8;
  --color-surface-offset-2: #e7dbc8;
  --color-surface-dynamic: #ddceb8;
  --color-divider: #ddceb8;
  --color-border: #cdbb9d;

  --color-text: #201c17;
  --color-text-muted: #5f574c;
  --color-text-faint: #9c8f7c;
  --color-text-inverse: #f8f0e8;

  --color-primary: #a86a0f;
  --color-primary-hover: #8a560c;
  --color-primary-active: #6e4409;
  --color-primary-highlight: #eeddb9;

  --color-steel: #6c655a;
  --color-steel-strong: #46403a;

  --color-success: #4c6b2f;
  --color-error: #a3341f;

  --shadow-sm: 0 1px 2px rgb(20 19 15 / 0.08);
  --shadow-md: 0 4px 16px rgb(20 19 15 / 0.1);
  --shadow-lg: 0 16px 40px rgb(20 19 15 / 0.16);

  --hero-overlay: linear-gradient(
    180deg,
    rgb(20 19 15 / 0.55) 0%,
    rgb(20 19 15 / 0.75) 100%
  );
}

/* ============================================================
   DARK MODE (primary industrial mood)
   ============================================================ */
[data-theme='dark'] {
  --color-bg: #14130f;
  --color-surface: #1a1815;
  --color-surface-2: #201e1a;
  --color-surface-offset: #221f1a;
  --color-surface-offset-2: #2a2621;
  --color-surface-dynamic: #34302a;
  --color-divider: #2c2822;
  --color-border: #3a352d;

  --color-text: #ede4d6;
  --color-text-muted: #ab9f8e;
  --color-text-faint: #766c5e;
  --color-text-inverse: #1a1815;

  --color-primary: #f0a81e;
  --color-primary-hover: #ffc24d;
  --color-primary-active: #ffd37a;
  --color-primary-highlight: #3d2f1a;

  --color-steel: #b6b0a5;
  --color-steel-strong: #ddd8cf;

  --color-success: #8fb86b;
  --color-error: #e2665a;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.55);

  --hero-overlay: linear-gradient(
    180deg,
    rgb(10 9 7 / 0.35) 0%,
    rgb(10 9 7 / 0.85) 100%
  );
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14130f;
    --color-surface: #1a1815;
    --color-surface-2: #201e1a;
    --color-surface-offset: #221f1a;
    --color-surface-offset-2: #2a2621;
    --color-surface-dynamic: #34302a;
    --color-divider: #2c2822;
    --color-border: #3a352d;
    --color-text: #ede4d6;
    --color-text-muted: #ab9f8e;
    --color-text-faint: #766c5e;
    --color-text-inverse: #1a1815;
    --color-primary: #f0a81e;
    --color-primary-hover: #ffc24d;
    --color-primary-active: #ffd37a;
    --color-primary-highlight: #3d2f1a;
    --color-steel: #b6b0a5;
    --color-steel-strong: #ddd8cf;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.55);
    --hero-overlay: linear-gradient(180deg, rgb(10 9 7 / 0.35) 0%, rgb(10 9 7 / 0.85) 100%);
  }
}

/* ============================================================
   Global
   ============================================================ */

body {
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--narrow {
  max-width: var(--content-narrow);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  display: inline-block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-12);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

p {
  color: var(--color-text-muted);
}

.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--brand-charcoal-950);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--brand-charcoal-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================================
   Header / Nav
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-transform: uppercase;
}

.nav-brand:hover {
  color: var(--color-text);
}

.nav-brand img {
  height: 40px;
  width: auto;
}

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

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.icon-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
}

.nav-mobile-panel {
  display: none;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    height: calc(100dvh - 64px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-6);
    background: var(--color-bg);
    border-top: 1px solid var(--color-divider);
    transform: translateX(100%);
    transition: transform var(--transition-interactive);
  }

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

  .nav-links a {
    font-size: var(--text-lg);
  }

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

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  background: var(--brand-charcoal-950);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgb(240 168 30 / 0.05) 0px,
      rgb(240 168 30 / 0.05) 1px,
      transparent 1px,
      transparent 64px
    ),
    radial-gradient(circle at 78% 18%, rgb(240 168 30 / 0.18), transparent 55%);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-copy .eyebrow {
  color: var(--brand-honey);
}

.hero-copy h1 {
  font-size: var(--text-hero);
  color: var(--brand-cream);
  line-height: 1.02;
  margin-bottom: var(--space-6);
}

.hero-copy h1 span {
  color: var(--brand-honey);
}

.hero-copy .lede {
  color: var(--brand-steel-300);
  font-family: var(--font-body);
  max-width: 42rem;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-actions .btn-outline {
  color: var(--brand-cream);
  border-color: var(--brand-steel-700);
}

.hero-actions .btn-outline:hover {
  border-color: var(--brand-honey);
  color: var(--brand-honey);
}

.hero-badge {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-badge::before {
  content: '';
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(240 168 30 / 0.22), transparent 70%);
  filter: blur(4px);
}

.hero-badge img {
  position: relative;
  width: min(100%, 400px);
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 0.55));
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy .lede {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-badge img {
    width: min(70%, 320px);
  }
}

/* ============================================================
   About
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-16);
  align-items: center;
}

.about-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.about-photo::after {
  content: '';
  position: absolute;
  inset: var(--space-3);
  border: 1px solid var(--brand-cream);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

.about-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--space-6);
}

.about-photo-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
}

.about-photo-placeholder span {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-muted);
}

.stat-chip svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 360px;
    margin-inline: auto;
  }
}

/* ============================================================
   Craft pillars
   ============================================================ */

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

.craft-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.craft-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.craft-icon svg {
  width: 28px;
  height: 28px;
}

.craft-card h3 {
  font-size: var(--text-lg);
}

@media (max-width: 860px) {
  .craft-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Gallery
   ============================================================ */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.filter-btn {
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--brand-charcoal-950);
}

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

.gallery-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
  transition: transform var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-interactive);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card .gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: linear-gradient(to top, color-mix(in oklab, var(--brand-charcoal-950) 92%, transparent) 0%, color-mix(in oklab, var(--brand-charcoal-950) 55%, transparent) 55%, transparent 100%);
  color: var(--brand-cream);
}

.gallery-card .gallery-caption strong {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-cream);
}

.gallery-card .gallery-caption small {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-honey);
  font-weight: 600;
}

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

.gallery-note {
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  text-align: center;
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Contact
   ============================================================ */

.contact-section {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-16);
}

.contact-info h2 {
  font-size: var(--text-2xl);
}

.contact-direct {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.contact-direct .label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

.contact-direct a {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

.contact-direct a:hover {
  color: var(--color-primary);
}

.contact-form {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

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

.field {
  margin-bottom: var(--space-5);
}

.field label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--text-base);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
}

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

.form-note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.form-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  display: none;
}

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

.form-status.is-success {
  color: var(--color-success);
}

.form-status.is-error {
  color: var(--color-error);
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--brand-charcoal-950);
  color: var(--brand-steel-300);
  padding-block: var(--space-16) var(--space-8);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-10);
  flex-wrap: wrap;
  padding-bottom: var(--space-10);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  margin-bottom: var(--space-6);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-brand img {
  height: 44px;
}

.footer-brand-text .name {
  font-family: var(--font-display);
  color: var(--brand-cream);
  font-size: var(--text-lg);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer-brand-text .tag {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-honey);
}

.footer-links {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--brand-steel-300);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links a:hover {
  color: var(--brand-honey);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--brand-steel-700);
}

/* ============================================================
   Utility
   ============================================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--color-primary);
  color: var(--brand-charcoal-950);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
