/* ==========================================================================
   North Shore Custom Rifles — single-page site
   Design system adapted from the Northveil site. Accent = rifle chassis green.
   ========================================================================== */

:root {
  --black: #0b0e0b;
  --near-black: #121612;
  --charcoal: #1b211b;
  --cream: #e9e6da;
  --white: #f6f4ec;
  --accent: #6aa056;
  --accent-dark: #4b7a3c;
  --accent-glow: rgba(106, 160, 86, 0.45);
  --steel: #8b948a;
  --line: rgba(233, 230, 218, 0.14);

  --font-display: "Bebas Neue", "Oswald", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 1240px;
}

* { box-sizing: border-box; }

section, #top { scroll-margin-top: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.05;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; }

.btn-primary {
  background: var(--accent);
  color: var(--black);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px var(--accent-glow); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- marquee ---------- */
.marquee {
  background: var(--accent);
  color: var(--black);
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}
.marquee__track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  padding: 10px 0;
}
.marquee__track span::after {
  content: "\2726";
  margin: 0 28px;
  font-size: 0.8rem;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 14, 11, 0.88);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  border-color: var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}
.brand span {
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.85;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .btn { padding: 11px 22px; font-size: 0.85rem; margin-left: 6px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  background:
    radial-gradient(60% 60% at 82% 20%, rgba(106, 160, 86, 0.22), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(106, 160, 86, 0.12), transparent 60%),
    var(--black);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233,230,218,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,230,218,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 70% 30%, black, transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(3rem, 6.5vw, 5.6rem);
  color: var(--white);
}
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-copy .hero-tagline {
  margin: 22px 0 0;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.35rem;
  color: var(--accent);
}
.hero-copy .hero-sub {
  margin: 14px 0 36px;
  max-width: 520px;
  font-size: 1.08rem;
  color: var(--steel);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--white);
}
.hero-stats div span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- logo ---------- */
.logo-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-glow {
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(20px);
  animation: pulse 4s ease-in-out infinite;
}
.logo-img {
  background: #fff;
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---------- section shell ---------- */
section { position: relative; padding: 72px 0; }
section.alt {
  background: var(--near-black);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--white);
  margin-top: 14px;
}
.section-head p {
  margin-top: 18px;
  color: var(--steel);
  font-size: 1.05rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- builds ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-card {
  background: var(--near-black);
  padding: 38px 32px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.feature-card:hover { background: var(--charcoal); transform: translateY(-4px); }
.feature-card .icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(106, 160, 86, 0.15);
  color: var(--accent);
  margin-bottom: 22px;
}
.feature-card .icon svg { width: 24px; height: 24px; }
.feature-card h3 {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}
.feature-card p {
  margin: 10px 0 0;
  font-size: 0.94rem;
  color: var(--steel);
}

/* ---------- competition ---------- */
.match-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.match-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--black);
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.match-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.match-card .tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  padding: 4px 10px;
}
.match-card h4 {
  margin-top: 18px;
  font-size: 2.2rem;
  color: var(--white);
}
.match-card p {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--steel);
}

/* ---------- process / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--white);
  margin-top: 14px;
}
.why-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; }
.why-list li {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.why-list li:last-child { border-bottom: none; }
.why-list .num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  min-width: 34px;
}
.why-list h4 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--white); }
.why-list p { margin: 6px 0 0; color: var(--steel); font-size: 0.94rem; }

.tagline-card {
  background: linear-gradient(155deg, var(--charcoal), var(--near-black));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.tagline-card::before {
  content: "\201C";
  position: absolute;
  top: -30px; left: 20px;
  font-size: 12rem;
  font-family: Georgia, serif;
  color: rgba(106, 160, 86, 0.16);
  line-height: 1;
}
.tagline-card p {
  position: relative;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--white);
  line-height: 1.2;
  margin: 0;
}
.tagline-card span {
  position: relative;
  display: block;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- about ---------- */
.about {
  background: var(--near-black);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about h2 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--white); margin-top: 14px; }
.about p { color: var(--steel); font-size: 1.05rem; margin: 18px 0; }

/* ---------- CTA banner ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--black);
  text-align: center;
  padding: 90px 0;
}
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.4rem); color: var(--black); margin-top: 10px; }
.cta-band p { max-width: 580px; margin: 18px auto 34px; font-size: 1.05rem; color: rgba(11,14,11,0.8); }
.cta-band .eyebrow::before { background: rgba(11,14,11,0.7); }
.cta-band .btn-primary { background: var(--black); color: var(--white); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--near-black); }
.cta-band .btn-ghost { border-color: rgba(11,14,11,0.45); color: var(--black); }
.cta-band .btn-ghost:hover { border-color: var(--black); color: var(--black); }

/* ---------- footer ---------- */
.site-footer { padding: 70px 0 30px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--line);
}
.footer-col h5 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--steel); font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }
.social-row svg { width: 17px; height: 17px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.8rem;
  color: var(--steel);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .logo-stage { order: -1; max-width: 560px; margin: 0 auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .tagline-card { padding: 36px 28px; }
  section { padding: 56px 0; }
}

/* build tiles share the match-card look */
.match-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .match-grid--3 { grid-template-columns: 1fr; } }
.match-card .icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(106, 160, 86, 0.15);
  color: var(--accent);
}
.match-card .icon svg { width: 24px; height: 24px; }

/* services */
.svc-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.svc-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--cream);
}
.svc-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 2px;
  background: var(--accent);
}
.match-grid--3 .match-card { display: flex; flex-direction: column; }
.match-grid--3 .match-card .svc-list { margin-top: auto; }
.match-grid--3 .match-card p { margin-bottom: 18px; }
.ffl-band {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px 36px;
  border: 1px solid var(--accent-dark);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(106,160,86,0.14), rgba(106,160,86,0.04));
}
.ffl-band h4 { font-size: 1.8rem; color: var(--white); }
.ffl-band p { margin: 8px 0 0; max-width: 620px; color: var(--steel); font-size: 0.95rem; }

/* header logo */
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo img {
  height: 52px;
  width: auto;
  max-width: none;
  transition: height 0.3s ease;
}
.site-header.is-scrolled .brand-logo img { height: 38px; }
@media (max-width: 720px) {
  .brand-logo img { height: 44px; }
  .site-header.is-scrolled .brand-logo img { height: 34px; }
}

/* header wordmark */
.brand-logo { gap: 12px; }
.brand-name {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.brand-name span {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--accent);
}
@media (max-width: 720px) {
  .brand-logo { gap: 10px; }
  .brand-name { font-size: 1.45rem; }
  .brand-name span { font-size: 0.78rem; }
}

/* ---------- shop pricing ---------- */
.price-list { margin-top: 32px; }
.price-list h3 { font-size: 2rem; color: var(--white); margin-bottom: 8px; }
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.price-row h4 { font-size: 1.5rem; color: var(--white); }
.price-row p { margin: 6px 0 0; max-width: 640px; color: var(--steel); font-size: 0.92rem; }
.price { text-align: right; font-family: var(--font-display); font-size: 2rem; color: var(--accent); white-space: nowrap; }
.price small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
@media (max-width: 600px) {
  .price-row { grid-template-columns: 1fr; gap: 8px; }
  .price { text-align: left; }
}

/* ---------- gallery ---------- */
.gallery-cat { display: flex; align-items: center; gap: 18px; margin: 40px 0 16px; }
.gallery-cat:first-child { margin-top: 0; }
.gallery-cat::before, .gallery-cat::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gallery-cat span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}
.gallery-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--black);
  transition: border-color 0.25s ease;
}
.gallery-item:hover { border-color: var(--accent); }
.gallery-item img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item.gi-wide { grid-column: span 2; }
.gallery-item.gi-wide img { height: 340px; }
.gallery-item.gi-contain img { object-fit: contain; }
@media (max-width: 980px) {
  .gallery-row { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.gi-wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .gallery-row { grid-template-columns: 1fr; }
  .gallery-item.gi-wide { grid-column: auto; }
  .gallery-item img, .gallery-item.gi-wide img { height: 220px; }
}

/* ---------- about layout ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 10px 0 20px; }
.about-grid p { color: var(--steel); }
.about-photo { margin: 0; position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: 520px; object-fit: cover; }
.about-photo figcaption {
  position: absolute; left: 20px; bottom: 18px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--white);
}
.spec-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-list span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); }
.spec-list strong { color: var(--white); font-weight: 600; text-align: right; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo img { height: 380px; }
}


/* ---------- barrel strip ---------- */
.barrel-strip { position: relative; height: 220px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.barrel-strip img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: brightness(0.5); }
.barrel-strip span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center;
  font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: 0.06em; text-transform: uppercase; color: var(--white);
}

/* header: keep 7 nav items from overflowing on small desktops */
@media (max-width: 1180px) { .header-cta .icon-btn { display: none; } }

/* photo was shot upside down */
.gallery-item.gi-flip img { transform: rotate(180deg); }
.gallery-item.gi-flip:hover img { transform: rotate(180deg) scale(1.04); }

/* ---------- leaderboard photos ---------- */
.leaderboard-cat { margin-top: 56px; }
.leaderboard-row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 16px; }
.leaderboard-row .gallery-item { position: relative; }
.leaderboard-row .gallery-item img { height: 460px; }
.leaderboard-row .gallery-item img.pos-podium { object-position: center 58%; }
.leaderboard-row figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px;
  background: linear-gradient(to top, rgba(11,14,11,0.88), transparent);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white);
}
@media (max-width: 900px) {
  .leaderboard-row { grid-template-columns: 1fr; }
  .leaderboard-row .gallery-item img { height: 360px; }
}

/* ---------- uniform photo tiles + lightbox ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid .gallery-row { display: contents; }
.gallery-grid .gallery-cat { grid-column: 1 / -1; }
.gallery-grid .gallery-cat:first-child { margin-top: 0; }
.gallery-grid .gallery-cat { margin: 24px 0 0; }
.gallery-item, .leaderboard-row .gallery-item { cursor: zoom-in; }
.gallery-item img, .leaderboard-row .gallery-item img { width: 100%; height: 260px; object-fit: cover; object-position: center; }
.leaderboard-row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .gallery-grid, .leaderboard-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .gallery-grid, .leaderboard-row { grid-template-columns: 1fr; }
  .gallery-item img, .leaderboard-row .gallery-item img { height: 220px; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 32px;
  background: rgba(11, 14, 11, 0.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; text-align: center; }
.lightbox img {
  max-width: min(94vw, 1400px); max-height: 84vh; width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  margin: 0 auto;
}
.lightbox img.is-flipped { transform: rotate(180deg); }
.lightbox figcaption { margin-top: 14px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); }
.lightbox__close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(11, 14, 11, 0.7);
  color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { border-color: var(--accent); }
body.lightbox-open { overflow: hidden; }

/* ---------- photo sections: two rows + More/Less ---------- */
.gallery-grid { display: block; }
.gallery-grid .gallery-cat { margin: 40px 0 16px; }
.gallery-grid .gallery-cat:first-child { margin-top: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .photo-grid { grid-template-columns: 1fr; } }
.gallery-item.is-extra { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: 20px; }
.more-wrap[hidden] { display: none; }
.more-btn { min-width: 120px; justify-content: center; }

/* header: tighten on narrow desktops/tablets so the CTA stays on screen */
@media (max-width: 980px) {
  .nav-links { gap: 16px; }
  .header-cta .btn { padding: 10px 14px; margin-left: 0; }
  .brand-name { display: none; }
}

.photo-grid[hidden], .gallery-cat[hidden] { display: none; }

/* lightbox: fit inside the padded overlay on phones (94vw + padding overflowed) */
.lightbox { padding: 16px; box-sizing: border-box; }
.lightbox figure { width: 100%; max-width: 1400px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); }

/* match cards moved under "How a build works" */
.process-matches { margin-top: 64px; }

/* spec list: single phrase per row */
.spec-list li { justify-content: flex-start; }
.spec-list strong { text-align: left; }

.process-matches-head { margin-top: 72px; margin-bottom: 32px; }
.process-matches-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.process-matches { margin-top: 0; }

/* spec list as pills */
.spec-list { display: flex; flex-wrap: wrap; gap: 10px; border-top: 0; padding: 0; margin-top: 28px; }
.spec-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border: 1px solid var(--accent-dark); border-radius: 999px;
  background: rgba(106, 160, 86, 0.10);
}
.spec-list li::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b0e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.spec-list strong { font-size: 0.85rem; letter-spacing: 0.02em; color: var(--white); }
