/* ============================================================
   FELDT CUSTOMS — style.css
   Dark background, amber/orange accents, maker aesthetic.
   Desktop-first with mobile breakpoints at 960px and 640px.
============================================================ */


/* ============================================================
   CSS VARIABLES
============================================================ */
:root {
  --bg:        #0d0d0d;   /* near-black page background */
  --surface:   #161616;   /* slightly lighter for alternate sections */
  --surface2:  #1e1e1e;   /* card backgrounds */
  --accent:    #e8a020;   /* amber — headings, borders, highlights */
  --accent-dk: #c47a10;   /* darker amber for hover states */
  --text:      #f0ece4;   /* warm white body text */
  --muted:     #888888;   /* secondary / caption text */
  --border:    #2a2a2a;   /* subtle borders */
  --band-h:    8px;       /* height of colored section dividers */
  --hdr-h:     70px;      /* sticky header height */
  --max-w:     1280px;    /* max content width */
  --ph-bg:     #222222;   /* image placeholder fill */
  --ph-border: #3a3a3a;   /* image placeholder dashed border */
  --radius:    4px;
}


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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
button { font-family: inherit; cursor: pointer; }


/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5vw,   4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw,   1.5rem); }


/* ============================================================
   SHARED UTILITIES
============================================================ */

/* Max-width wrapper used inside most sections */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 40px;
}

/* Centered section heading */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}

/* Amber CTA button */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: #000;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  border: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-dk);
  transform: translateY(-2px);
}

/* Horizontal amber band — placed between sections */
.band {
  height: var(--band-h);
  background: var(--accent);
  width: 100%;
}


/* ============================================================
   PLACEHOLDERS
   Image placeholders: dark gray box with filename centered.
   Text placeholders: italic amber so they stand out clearly.
============================================================ */
.img-placeholder {
  background: var(--ph-bg);
  border: 1px dashed var(--ph-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  text-align: center;
  padding: 8px;
  word-break: break-all;
}

.placeholder-text {
  color: var(--accent) !important;
  font-style: italic;
}


/* ============================================================
   HEADER
   Sticky. Logo left, nav links right.
   Amber bottom border anchors the brand color at the top.
============================================================ */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--hdr-h);
  background: var(--bg);
  border-bottom: 2px solid var(--accent);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link { display: block; flex-shrink: 0; }

.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.25s;
}


/* ============================================================
   HERO
   Left 40%: headline + welcome text + CTA
   Right 60%: 3×3 photo collage
============================================================ */
.hero { background: var(--bg); }

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 40px;
  display: grid;
  grid-template-columns: 2fr 3fr;  /* ~40% / ~60% */
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - var(--hdr-h));
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

/* 3×3 square-cell photo grid */
.hero-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.hero-collage img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


/* ============================================================
   SERVICES — "What I Make"
   Three image cards in a row.
   Card: top image (4:3) + dark body with name + description.
============================================================ */
.services { background: var(--surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s;
}

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

.service-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* When a real <img> replaces the placeholder, keep sizing consistent */
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  padding: 22px 26px 28px;
  flex: 1;
}

.service-card-body h3 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.service-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}


/* ============================================================
   GALLERY — "Recent Work"
   Three sub-sections (Laser / 3D / UV), each a 3-column grid.
============================================================ */
.gallery { background: var(--bg); }

.gallery-sub {
  margin-bottom: 56px;
}

.gallery-sub:last-child { margin-bottom: 0; }

.gallery-sub-title {
  display: inline-block;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Both real photos and placeholder divs get the same sizing */
.gallery-grid img,
.gallery-grid .img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}


/* ============================================================
   POPULAR ITEMS + FEATURED
   Left: list of popular products + blurb
   Right: featured product photo + CTA
============================================================ */
.popular { background: var(--surface); }

.popular-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.popular-left h2 {
  color: var(--accent);
  margin-bottom: 24px;
}

.popular-list {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popular-list li {
  font-size: 1.05rem;
  color: var(--text);
}

.popular-left > p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Featured item (right column) */
.popular-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.featured-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.featured-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.featured-caption {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Hide the featured img element entirely until Cloudinary sets a src */
#featured-img:not([src]),
#featured-img[src=""] {
  display: none;
}


/* ============================================================
   MISSION
   Full-width dark band, centered text.
============================================================ */
.mission { background: #090909; }

.mission-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 40px;
  text-align: center;
}

.mission-inner h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.mission-inner p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.85;
}


/* ============================================================
   FOOTER / CONTACT
   Simple centered band: CTA text, links row, copyright.
============================================================ */
.footer { background: var(--surface); }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-cta {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.footer-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.copyright {
  font-size: 0.8rem;
  color: #444;
  margin-top: 8px;
}


/* ============================================================
   GALLERY LOADING / EMPTY STATES
   Both span all 3 columns so they center properly in the grid.
============================================================ */
.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  padding: 40px 0;
}


/* ============================================================
   RESPONSIVE — 960px (tablet)
   Hero stacks vertically. Services go 2-col. Popular stacks.
============================================================ */
@media (max-width: 960px) {

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 56px 24px;
    gap: 40px;
  }

  .services-grid   { grid-template-columns: repeat(2, 1fr); } /* 4 → 2×2 */
  .popular-inner   { grid-template-columns: 1fr; gap: 48px; }
}


/* ============================================================
   RESPONSIVE — 640px (mobile)
   Single-column everything, hamburger nav.
============================================================ */
@media (max-width: 640px) {

  /* Layout */
  .section-inner { padding: 48px 20px; }
  .header-inner  { padding: 0 20px; }
  .mission-inner { padding: 56px 20px; }
  .footer-inner  { padding: 48px 20px; }

  /* Nav: hide links, show hamburger */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--hdr-h);
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--surface);
    border-bottom: 2px solid var(--accent);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
  }

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

  .nav-links li a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
  }

  .nav-links li:last-child a { border-bottom: none; }
  .nav-links li a:hover { color: var(--accent); }

  .nav-toggle { display: flex; }

  /* Services: single column */
  .services-grid { grid-template-columns: 1fr; }

  /* Gallery: 2 columns on mobile (still readable) */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer links: stack vertically */
  .footer-links {
    flex-direction: column;
    gap: 14px;
    align-items: center;
  }

  .hero-collage { gap: 4px; }
}
