/* ==========================================================================
   [Company Name] Cabinetry — shared styles
   Loaded after Tailwind (CDN) on every page.
   ========================================================================== */

:root {
  --walnut: #2B2320;      /* near-black warm brown — headings, dark sections */
  --walnut-soft: #4A3F38; /* lighter walnut for secondary text on dark bg */
  --greige: #EFEAE2;      /* warm background */
  --greige-dark: #E2DACD; /* card / stripe background */
  --sage: #4A5D45;        /* primary accent — cabinet paint green */
  --sage-dark: #3A4A36;
  --brass: #B08D57;       /* secondary accent — hardware */
  --ink: #26221D;         /* body text */
  --cream: #FBF8F3;       /* lightest surface, on-dark card bg */
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--greige);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Fraunces', Georgia, serif;
}

/* Utility label style — tracked-out small caps used instead of a 3rd typeface */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ==========================================================================
   Shop-drawing callout — signature element.
   A small circular index tag connected by a thin leader line, styled like
   an annotation on a cabinet elevation drawing. Used on hero + gallery.
   ========================================================================== */
.callout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.callout-dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  border: 1px solid var(--cream);
  color: var(--cream);
  background: rgba(43, 35, 32, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.callout-line {
  height: 1px;
  width: 2.5rem;
  background: var(--cream);
  opacity: 0.7;
}

.callout-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(43, 35, 32, 0.55);
  backdrop-filter: blur(2px);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* ==========================================================================
   Image placeholders
   Swap these out: replace the <div class="photo-placeholder"> element with
   a real <img src="..." alt="..."> tag once real photos are ready. The
   diagonal stripe + label is intentional so it's obvious what's placeholder
   content vs. finished.
   ========================================================================== */
.photo-placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  background-color: var(--greige-dark);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(43, 35, 32, 0.06),
    rgba(43, 35, 32, 0.06) 12px,
    transparent 12px,
    transparent 24px
  );
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder span {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--walnut-soft);
  background: rgba(251, 248, 243, 0.85);
  padding: 0.35rem 0.6rem;
  margin: 0.6rem;
  border-radius: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 18rem;
  gap: 1rem;
}

@media (max-width: 767.98px) {
  .gallery-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    grid-auto-rows: 16rem;
  }
}

.gallery-tile {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-tile .photo-placeholder {
  width: 100%;
  height: 100%;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Lightbox (used on gallery.html)
   ========================================================================== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(38, 34, 29, 0.92);
  padding: 2rem;
}

#lightbox.open {
  display: flex;
}

#lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

#lightbox-title,
#lightbox-counter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream);
  text-align: center;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  background: rgba(43, 35, 32, 0.65);
  border-radius: 9999px;
}

#lightbox-title {
  top: 1.5rem;
}

#lightbox-counter {
  bottom: 1.5rem;
}

#lightbox-prev,
#lightbox-next,
#lightbox-close {
  border: none;
  background: rgba(251, 248, 243, 0.08);
  color: var(--cream);
  font-size: 1.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

#lightbox-prev:hover,
#lightbox-next:hover,
#lightbox-close:hover {
  background: rgba(251, 248, 243, 0.18);
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

#lightbox-prev {
  left: 2rem;
}

#lightbox-next {
  right: 2rem;
}

#lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  position: absolute;
  font-size: 2rem;
  padding: 0.5rem 0.85rem;
}

/* ==========================================================================
   Before / after slider (used on before-after.html)
   ========================================================================== */
.ba-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.ba-frame .ba-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.ba-frame .ba-handle-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.ba-frame input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--cream);
  transform: translateX(-1px);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: var(--cream);
  border: 1px solid var(--walnut);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--walnut);
}

.ba-tag {
  position: absolute;
  top: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(43, 35, 32, 0.6);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  pointer-events: none;
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
#mobile-nav {
  display: none;
}
#mobile-nav.open {
  display: block;
}
