/**
 * Factory Design System v1 - shared mobile-first chrome
 * Nearfront agency wrap. Client identity is a slot only.
 */

@import url("./tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--nf-gold-600);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* --- Masthead (Nearfront chrome, not client ad) --- */
.nf-masthead {
  background: var(--masthead);
  color: var(--on-masthead);
  border-bottom: 3px solid var(--masthead-rule);
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nf-masthead__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.nf-masthead__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--on-masthead);
}

.nf-masthead__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nf-masthead__word {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nf-masthead__tag {
  font-size: var(--fs-caption);
  color: var(--on-masthead-2);
  display: none;
}

@media (min-width: 560px) {
  .nf-masthead__tag {
    display: block;
  }
}

/* --- Age / 21+ strip (quiet, top) --- */
.age-strip {
  background: var(--nf-stone-100);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.age-strip strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Page shell --- */
.page {
  padding-bottom: calc(var(--sticky-bar-h) + var(--space-8));
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.wrap--prose {
  max-width: var(--maxw-reading);
}

.section {
  margin-top: var(--section-gap);
}

.section:first-of-type {
  margin-top: 0;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  color: var(--text);
}

.section__lede {
  margin: 0 0 var(--space-5);
  color: var(--text-muted);
  max-width: var(--maxw-prose);
}

/* --- Brand-first hero --- */
.hero {
  background:
    linear-gradient(160deg, var(--nf-teal-850) 0%, var(--nf-teal-950) 55%, var(--nf-teal-900) 100%);
  color: var(--nf-cream-100);
  padding: var(--space-10) 0 var(--space-12);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--nf-gold-500);
}

.hero__inner {
  max-width: var(--maxw-hero);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  gap: var(--space-6);
}

.hero__brand-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hero__logo-slot {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(195, 162, 93, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.hero__logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__logo-placeholder {
  font-size: 10px;
  text-align: center;
  line-height: 1.25;
  color: var(--nf-gold-500);
  padding: var(--space-2);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero__eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nf-gold-500);
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  color: #fff;
  max-width: 18ch;
}

.hero__lede {
  margin: 0 0 var(--space-6);
  font-size: var(--fs-lead);
  color: var(--on-masthead-2);
  max-width: 42ch;
  line-height: 1.5;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (min-width: 720px) {
  .hero {
    padding: var(--space-16) 0 var(--space-20);
  }

  .hero__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .hero__logo-slot {
    width: 80px;
    height: 80px;
  }
}

/* Photo hero: image on ::before (CSS var url() is unreliable in multi-layer background).
   Overlay on the section itself. Set --hero-photo: url(...) on the section. */
.hero.hero--photo {
  position: relative;
  isolation: isolate;
  background-color: var(--nf-teal-950);
  background-image: linear-gradient(
    160deg,
    rgba(15, 31, 34, 0.52) 0%,
    rgba(22, 44, 48, 0.42) 45%,
    rgba(15, 31, 34, 0.58) 100%
  );
  overflow: hidden;
}

.hero.hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--hero-photo, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero.hero--photo .hero__title,
.hero.hero--photo .hero__lede {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
}


.hero--photo .hero__inner {
  position: relative;
  z-index: 1;
}

.hero--photo .hero__logo-slot {
  width: auto;
  min-width: 64px;
  height: 48px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: var(--radius-lg, 12px);
}

@media (min-width: 720px) {
  .hero--photo .hero__logo-slot {
    height: 56px;
    min-width: 80px;
  }
}

/* --- Buttons / CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

/* Gold = ONE primary action per layout */
.btn--primary {
  background: var(--nf-gold-500);
  color: var(--on-accent);
  border-color: var(--nf-gold-500);
}

.btn--primary:hover {
  background: var(--nf-gold-300);
  border-color: var(--nf-gold-300);
  color: var(--on-accent);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--secondary-light {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn--secondary-light:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn--tertiary {
  background: transparent;
  color: var(--accent-text);
  border: none;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn--tertiary:hover {
  color: var(--nf-gold-600);
}

.btn--block {
  width: 100%;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

/* --- Trust / license strip --- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: var(--space-6) 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.3;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
}

.chip--gold {
  background: rgba(195, 162, 93, 0.14);
  color: var(--accent-text);
  border-color: rgba(195, 162, 93, 0.35);
}

.chip--on-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nf-cream-100);
  border-color: rgba(255, 255, 255, 0.18);
}

.chip--on-dark.chip--gold {
  background: rgba(195, 162, 93, 0.2);
  color: var(--nf-gold-300);
  border-color: rgba(195, 162, 93, 0.45);
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.card--lift {
  box-shadow: var(--shadow-form);
}

/* --- NAP trust card --- */
.nap-card {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 720px) {
  .nap-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.nap-card__address {
  margin: 0;
}

.nap-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--space-3);
}

.nap-card__line {
  margin: 0 0 var(--space-2);
  color: var(--text-2);
  font-size: var(--fs-body);
}

.nap-card__line a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.nap-card__line a:hover {
  text-decoration: underline;
}

.nap-card__meta {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.hours-table caption {
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.hours-table th,
.hours-table td {
  text-align: left;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  color: var(--text-2);
}

.hours-table th {
  width: 42%;
  color: var(--text);
  font-weight: 600;
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: none;
}

.hours-note {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* --- Category TILE grid (not pills) --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 560px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.cat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-card);
}

.cat-tile__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--nf-stone-100);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent-text);
  font-weight: 700;
  font-family: var(--font-display);
}

.cat-tile__label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text);
}

/* --- Nearby / neighborhood chips --- */
.nearby {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

/* --- FAQ accordion --- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  margin: 0 0 var(--space-3);
  box-shadow: var(--shadow-card);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-body);
  padding: var(--space-5) var(--space-6);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent-text);
  flex-shrink: 0;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "-";
}

.faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq details p {
  margin: 0;
  padding: var(--space-4) var(--space-6) var(--space-5);
  color: var(--text-2);
  max-width: var(--maxw-prose);
}

/* --- Internal links --- */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.link-list a {
  display: block;
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: background 150ms ease;
}

.link-list a:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* --- Quiet compliance footer --- */
.compliance-footer {
  margin-top: var(--section-gap-lg);
  padding: var(--space-8) 0 var(--space-6);
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-align: center;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.compliance-footer p {
  margin: 0 0 var(--space-2);
}

.compliance-footer p:last-child {
  margin-bottom: 0;
}

/* --- Published-by Nearfront chrome footer --- */
.nf-chrome-footer {
  background: var(--nf-teal-950);
  color: var(--nf-sage-400);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  font-size: var(--fs-caption);
}

.nf-chrome-footer a {
  color: var(--nf-gold-500);
  text-decoration: none;
}

.nf-chrome-footer a:hover {
  color: var(--nf-gold-300);
}

.nf-chrome-footer__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--nf-cream-100);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--fs-caption);
}

.nf-chrome-footer__mark img {
  width: 20px;
  height: 20px;
}

/* --- Sticky mobile CTA bar --- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 31, 34, 0.96);
  border-top: 1px solid var(--nf-teal-750);
  backdrop-filter: blur(8px);
}

.sticky-cta .btn {
  flex: 1;
  min-height: 44px;
}

@media (min-width: 900px) {
  .sticky-cta {
    display: none;
  }

  .page {
    padding-bottom: var(--space-12);
  }
}

/* --- GBP pack extras --- */
.gbp-map-slot {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-small);
  text-align: center;
  padding: var(--space-6);
}

.review-slot {
  border-left: 3px solid var(--nf-gold-500);
  padding-left: var(--space-4);
  color: var(--text-2);
  font-style: italic;
}

/* --- Best-of / listicle --- */
.listicle-header {
  background: var(--nf-teal-850);
  color: #fff;
  padding: var(--space-12) 0 var(--space-10);
  border-bottom: 3px solid var(--nf-gold-500);
}

.listicle-header h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  margin: 0 0 var(--space-3);
  max-width: 22ch;
}

.listicle-header .lede {
  color: var(--on-masthead-2);
  max-width: 48ch;
  margin: 0;
}

.rank-card {
  display: grid;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .rank-card {
    grid-template-columns: 56px 1fr auto;
    align-items: start;
  }
}

.rank-card__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-text);
  line-height: 1;
}

.rank-card__photo {
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  min-height: 120px;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.disclaimer-box {
  background: var(--nf-stone-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* --- Index / kit preview pages --- */
.kit-index {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4);
}

.kit-index h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  margin: 0 0 var(--space-3);
}

.kit-index ul {
  padding-left: 1.2rem;
}

.kit-index li {
  margin-bottom: var(--space-2);
}

/* Hide factory ops metadata from public pages */
.ops-only,
[data-ops] {
  display: none !important;
}
