/* ==========================================================================
   Briggs Brothers Lighting — shared design system
   Central premise: this is a lighting company, so gold behaves like emitted
   light (bloom, spill, falloff) rather than flat paint.
   ========================================================================== */

:root {
  --navy-deep: #0A0A0A;
  --ink: #0d0d0d;
  --panel: #121110;
  --gold: #C9A24B;
  --gold-warm: #E0BE72;
  --cream: #F2E9D8;

  /* light system */
  --glow-sm: 0 0 12px rgba(201,162,75,0.35);
  --glow-md: 0 0 24px rgba(201,162,75,0.30), 0 0 48px rgba(201,162,75,0.14);
  --glow-lg: 0 0 40px rgba(201,162,75,0.32), 0 0 90px rgba(201,162,75,0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --edge: rgba(201,162,75,0.22);
  --edge-hot: rgba(201,162,75,0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* --- Film grain: kills the flat digital black -------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* keep real content above the grain */
header, main, section, footer, .hero-wrap, .cta-strip, .mobile-call, .lightbox { position: relative; z-index: 2; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Header
   ========================================================================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,162,75,0.18);
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand-logo { height: clamp(42px, 5.5vw, 62px); width: auto; display: block; }

/* 1.5x logo, but only where the nav still fits beside it. The nav is ~640-690px
   wide, so below ~1240px a 93px logo pushes it onto a second line and doubles the
   sticky header height. */
@media (min-width: 1240px) { .brand-logo { height: 93px; } }

nav { display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); flex-wrap: wrap; align-items: center; }
nav a {
  color: var(--cream);
  opacity: 0.82;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}
/* underline grows from centre, lit */
nav a:not(.nav-call)::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -5px;
  width: 0; height: 1px;
  background: var(--gold);
  box-shadow: var(--glow-sm);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}
nav a:not(.nav-call):hover::after,
nav a:not(.nav-call).current::after { width: 100%; }
nav a:hover, nav a.current { opacity: 1; color: var(--gold); }

nav a.nav-call {
  color: var(--gold);
  border: 1px solid var(--edge-hot);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  opacity: 1;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
nav a.nav-call:hover {
  background: var(--gold);
  color: #0A0A0A;
  box-shadow: var(--glow-md);
}

@media (max-width: 640px) {
  header { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.7rem 1rem; position: static; }
  .brand-logo { height: 51px; }
  nav a { font-size: 0.7rem; }
  nav a.nav-call { display: none; }
}

/* ==========================================================================
   Section furniture
   ========================================================================== */
.section { padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); position: relative; }
/* warm light falling from above the heading */
.section-head::before {
  content: "";
  position: absolute;
  top: -60px; left: 50%;
  width: 420px; height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(201,162,75,0.10), transparent 68%);
  pointer-events: none;
}
.section-head .eyebrow,
.page-hero .eyebrow {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold); margin: 0 0 0.6rem;
}
.section-head h2 {
  font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 0.03em;
  font-size: clamp(1.4rem, 3vw, 2.1rem); color: #fff; margin: 0 0 0.7rem;
}
.section-head p {
  color: var(--cream); opacity: 0.72; max-width: 56ch; margin: 0 auto;
  font-size: 0.95rem; line-height: 1.65;
}

/* Bulb divider — the logo's filament bulb as a recurring mark */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  max-width: 460px; margin: clamp(2rem, 5vw, 3rem) auto;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge));
}
.divider::after { background: linear-gradient(270deg, transparent, var(--edge)); }
.divider svg { width: 16px; height: 22px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(201,162,75,0.5)); }

/* ==========================================================================
   Cards — lit surfaces
   ========================================================================== */
.service-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background:
    radial-gradient(680px circle at 0% 0%, rgba(201,162,75,0.075), transparent 42%),
    linear-gradient(165deg, rgba(201,162,75,0.035), rgba(201,162,75,0.008));
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* the light "comes up" on hover */
.service-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(520px circle at 12% 8%, rgba(201,162,75,0.14), transparent 48%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.service-card:hover { border-color: var(--edge-hot); transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,0.5); }
.service-card:hover::after { opacity: 1; }

.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
}

.service-icon {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--edge-hot);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.15rem;
  position: relative;
  transition: box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}
.service-card:hover .service-icon { box-shadow: var(--glow-md); border-color: var(--gold); }
.service-icon svg { width: 26px; height: 26px; }
/* icon line work */
.service-icon svg .ln { stroke: var(--cream); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
/* the filament — lifted from the logo, warms on hover */
.service-icon svg .fil { stroke: var(--gold); fill: none; stroke-width: 1.5; stroke-linecap: round; transition: filter 0.45s var(--ease); }
.service-icon svg .bulb { fill: var(--gold); opacity: 0.9; transition: filter 0.45s var(--ease); }
.service-card:hover .service-icon svg .fil,
.service-card:hover .service-icon svg .bulb { filter: drop-shadow(0 0 4px rgba(224,190,114,0.9)); }

.service-card h3 {
  font-family: 'Cinzel', serif; font-weight: 600; letter-spacing: 0.02em;
  font-size: 1.15rem; color: #fff; margin: 0 0 0.7rem; position: relative;
}
.service-card p { color: var(--cream); opacity: 0.78; font-size: 0.92rem; line-height: 1.65; margin: 0 0 0.9rem; position: relative; }

.service-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; position: relative; }
.service-meta span {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gold); border: 1px solid rgba(201,162,75,0.3);
  border-radius: 999px; padding: 0.25rem 0.7rem; opacity: 0.9;
}

/* ==========================================================================
   Buttons — emit rather than fill
   ========================================================================== */
.cta-btn {
  display: inline-block; background: var(--gold); color: #0A0A0A;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 0.85rem; text-decoration: none;
  padding: 0.9rem 2.1rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(201,162,75,0.18);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}
.cta-btn:hover {
  transform: translateY(-3px);
  background: var(--gold-warm);
  box-shadow: 0 12px 28px rgba(201,162,75,0.32), var(--glow-md);
}
.cta-btn.ghost { background: none; color: var(--gold); border: 1px solid var(--edge-hot); box-shadow: none; }
.cta-btn.ghost:hover { background: rgba(201,162,75,0.1); box-shadow: var(--glow-sm); }

.cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

.cta-strip { text-align: center; padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem); }
.cta-strip h2 { font-family: 'Cinzel', serif; font-size: clamp(1.3rem, 2.8vw, 1.9rem); color: #fff; margin: 0 0 0.7rem; letter-spacing: 0.03em; }
.cta-strip p { color: var(--cream); opacity: 0.72; margin: 0 0 1.5rem; font-size: 0.95rem; }

/* ==========================================================================
   Gallery — an actual lighting gallery: it lights up
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; grid-auto-flow: dense; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

/* editorial rhythm — two features per set break the uniform grid */
@media (min-width: 901px) {
  .gallery-grid > .gallery-item:nth-child(6n+1) { grid-column: span 2; }
  .gallery-grid > .gallery-item:nth-child(6n+1) { aspect-ratio: 3 / 1.32; }
}

.gallery-item {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 3 / 2; border: 1px solid rgba(201,162,75,0.16);
  cursor: zoom-in;
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ease), filter 0.55s var(--ease);
  filter: brightness(0.86) saturate(0.92);
}
.gallery-item:hover {
  border-color: var(--edge-hot);
  box-shadow: 0 22px 50px rgba(0,0,0,0.6), 0 0 30px rgba(201,162,75,0.10);
}
/* the lights come up */
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.06) saturate(1.06); }

.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 0.9rem 0.7rem;
  font-size: 0.74rem; letter-spacing: 0.04em; color: var(--cream);
  background: linear-gradient(0deg, rgba(0,0,0,0.88), transparent);
  transform: translateY(4px); opacity: 0.9;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.gallery-item:hover .cap { transform: translateY(0); opacity: 1; }

.gallery-header { text-align: center; margin-bottom: clamp(1.5rem, 3vw, 2.2rem); position: relative; }
.gallery-header h2 { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 0.03em; font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; margin: 0 0 0.6rem; }
.gallery-header p { color: var(--cream); opacity: 0.65; font-size: 0.85rem; max-width: 52ch; margin: 0 auto; line-height: 1.6; }
.gallery-header .badge {
  display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold); border: 1px solid rgba(201,162,75,0.4);
  border-radius: 999px; padding: 0.3rem 0.9rem; margin-bottom: 0.9rem;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,5,5,0.94);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 82vh; border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 60px rgba(201,162,75,0.10);
}
.lightbox .lb-cap {
  position: absolute; bottom: clamp(1rem, 4vh, 2.4rem); left: 0; right: 0;
  text-align: center; color: var(--cream); font-size: 0.85rem; letter-spacing: 0.04em; opacity: 0.85;
}
.lightbox button {
  position: absolute; background: none; border: 1px solid var(--edge);
  color: var(--cream); width: 46px; height: 46px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer; line-height: 1;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.lightbox button:hover { border-color: var(--gold); color: var(--gold); box-shadow: var(--glow-sm); }
.lb-close { top: clamp(1rem, 3vh, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lb-prev { left: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lb-prev, .lb-next { display: none; } }

/* ==========================================================================
   Before / After slider
   ========================================================================== */
.ba-wrap {
  position: relative; width: 100%; aspect-ratio: 2 / 1;
  overflow: hidden; border-radius: 14px;
  border: 1px solid var(--edge);
  cursor: ew-resize;
  user-select: none; -webkit-user-select: none;
  /* we own the horizontal gesture — without this the browser scrolls instead
     of letting the drag through on touch devices */
  touch-action: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.ba-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  /* images must not swallow the pointer or kick off a native image-drag */
  pointer-events: none;
  user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none;
}
.ba-wrap .ba-after { clip-path: inset(0 0 0 var(--split, 50%)); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%);
  width: 2px; background: var(--gold);
  box-shadow: 0 0 18px rgba(201,162,75,0.75);
  transform: translateX(-1px); pointer-events: none;
}
.ba-handle::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(4px);
  box-shadow: var(--glow-md);
}
.ba-handle::before {
  content: "‹ ›";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  color: var(--gold); font-size: 1rem; letter-spacing: 2px;
  z-index: 2; white-space: nowrap;
}
.ba-tag {
  position: absolute; bottom: 0.9rem; z-index: 3;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cream); background: rgba(10,10,10,0.6);
  border: 1px solid var(--edge); border-radius: 999px; padding: 0.3rem 0.8rem;
  backdrop-filter: blur(4px); pointer-events: none;
}
.ba-tag.left { left: 0.9rem; }
.ba-tag.right { right: 0.9rem; }

/* ==========================================================================
   Page hero (interior pages) — with parallax layer
   ========================================================================== */
.page-hero-wrap { position: relative; overflow: hidden; }
.page-hero-wrap .bg-image {
  position: absolute; inset: -12% 0 0 0;
  width: 100%; height: 124%;
  object-fit: cover; z-index: 0;
  will-change: transform;
}
.page-hero-wrap::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,10,0.52) 0%, rgba(10,10,10,0.86) 55%, #0A0A0A 100%);
}
.page-hero { position: relative; z-index: 2; padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 4rem) clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.page-hero h1 {
  font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 0.03em;
  font-size: clamp(1.7rem, 4.2vw, 2.8rem); color: #fff; margin: 0 0 0.8rem;
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
.page-hero p { max-width: 58ch; margin: 0 auto; color: var(--cream); opacity: 0.78; font-size: clamp(0.9rem, 1.6vw, 1.02rem); line-height: 1.65; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ==========================================================================
   Footer + sticky mobile call
   ========================================================================== */
footer {
  text-align: center; padding: 2rem 1.25rem 5rem;
  /* muted via colour alpha, not opacity — a parent opacity would cap the
     social icons at 60% and children can never exceed it */
  font-size: 0.8rem; color: rgba(242,233,216,0.6);
  border-top: 1px solid rgba(201,162,75,0.15);
}
footer a { color: rgba(201,162,75,0.6); text-decoration: none; }  /* was gold under a 0.6 parent opacity; alpha keeps it identical */
footer a:hover { text-shadow: var(--glow-sm); }

.mobile-call {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--gold); color: #0A0A0A; text-align: center; padding: 0.9rem;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem;
  text-decoration: none; box-shadow: 0 -6px 22px rgba(0,0,0,0.5);
}
@media (max-width: 760px) { .mobile-call { display: block; } }

/* ==========================================================================
   Motion off
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .page-hero-wrap .bg-image { transform: none !important; }
}

/* social row — verified BBL channels, footer of every page */
.social {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.7rem; margin-top: 1.2rem;
}
.social a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; color: var(--gold);
  border: 1px solid rgba(201,162,75,0.3);
  transition: color 0.3s var(--ease), background 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.social a svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.social a:hover {
  color: #0A0A0A; background: var(--gold); border-color: var(--gold);
  transform: translateY(-2px); box-shadow: 0 6px 18px rgba(201,162,75,0.3);
  text-shadow: none;
}
@media (max-width: 420px) { .social { gap: 0.55rem; } .social a { width: 34px; height: 34px; } }

/* copyright + build credit, quieter than the rest of the footer */
.legal { margin: 1.3rem auto 0; max-width: 60ch; font-size: 0.72rem; line-height: 1.6; color: rgba(242,233,216,0.42); }
.legal a { color: rgba(201,162,75,0.72); text-decoration: none; letter-spacing: 0.04em; transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease); }
.legal a:hover { color: var(--gold); text-shadow: var(--glow-sm); }
