/* ============================================================
   localbusinesslistings.com — Storefront Stylesheet
   Design: Deep midnight + warm parchment + signature gold.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --bg:            #0B1220;        /* deep midnight */
  --bg-elevated:   #111A2E;        /* card surface */
  --bg-overlay:    #16223B;        /* hover, focus */
  --fg:            #F8F5EE;        /* warm parchment */
  --fg-muted:      #B7B0A0;        /* secondary text */
  --fg-dim:        #6E6A60;        /* tertiary text */
  --gold:          #C9A961;        /* signature accent */
  --gold-bright:   #E0C078;        /* hover */
  --gold-deep:     #8A7340;        /* pressed */
  --rule:          rgba(248, 245, 238, 0.08);   /* hairlines */
  --rule-strong:   rgba(248, 245, 238, 0.16);

  /* Functional */
  --success:       #4FA37A;
  --danger:        #C97070;
  --focus:         #E0C078;        /* focus ring matches gold-bright */

  /* Type */
  --font-display:  -apple-system, BlinkMacSystemFont, "SF Pro Display",
                   "Inter Tight", "Segoe UI Variable Display", "Segoe UI",
                   system-ui, sans-serif;
  --font-body:     -apple-system, BlinkMacSystemFont, "SF Pro Text",
                   "Inter", "Segoe UI Variable Text", "Segoe UI",
                   system-ui, sans-serif;
  --font-mono:     ui-monospace, "SF Mono", "Cascadia Code", "Menlo",
                   "Consolas", monospace;

  /* Layout */
  --maxw:          1280px;
  --gutter:        clamp(20px, 4vw, 40px);
  --section-y:     clamp(64px, 8vw, 120px);
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     14px;

  /* Motion */
  --ease:          cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur:           240ms;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--gold); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover, a:focus-visible { color: var(--gold-bright); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); letter-spacing: -0.018em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; font-weight: 500; }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 60ch;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
}
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-lg > * + * { margin-top: 2rem; }

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.9375rem;
}
.brand__mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav a {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a:hover, .nav a:focus-visible { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); }

@media (max-width: 640px) {
  .nav { gap: 1rem; }
  .nav a:not(.btn) { display: none; }
}

/* ---------- Site footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-block: 3rem 2rem;
  background: linear-gradient(to bottom, var(--bg), #06090F);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
}
.site-footer h4 {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0.5rem; }
.site-footer a { color: var(--fg-muted); font-size: 0.9375rem; }
.site-footer a:hover { color: var(--fg); }
.site-footer__brand p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  margin-top: 1rem;
  max-width: 36ch;
}
.site-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--fg-dim);
  font-size: 0.8125rem;
}
@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  line-height: 1;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg);
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule-strong);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--fg-muted);
  background: rgba(248, 245, 238, 0.04);
}
.btn--lg { padding: 1.0625rem 1.875rem; font-size: 1rem; }
.btn--sm { padding: 0.625rem 1rem; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Badge / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--fg-muted);
  background: rgba(248, 245, 238, 0.03);
}
.badge--gold {
  border-color: rgba(201, 169, 97, 0.4);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
}
.badge--secure::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(79, 163, 122, 0.18);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px) clamp(64px, 8vw, 120px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(201, 169, 97, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(201, 169, 97, 0.06), transparent 70%),
    linear-gradient(to bottom, #0E1525 0%, var(--bg) 100%);
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(248, 245, 238, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 245, 238, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 80%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__copy h1 {
  margin-bottom: 1.25rem;
}
.hero__copy h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero__copy .lead {
  margin-bottom: 2rem;
}
.hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}
.hero__meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta span::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}
.hero__art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.5),
    0 18px 36px -18px rgba(201, 169, 97, 0.2);
}
.hero__art svg { width: 100%; height: 100%; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; margin-inline: auto; }
}

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.section-head__copy { max-width: 56ch; }
.section-head__copy h2 { margin-bottom: 0.75rem; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  position: relative;
}
.product-card:hover {
  border-color: rgba(201, 169, 97, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.product-card__cover {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}
.product-card__cover svg { width: 100%; height: 100%; }
.product-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.product-card__niche {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.product-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.product-card__blurb {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.product-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}
.price__amount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.price__cents {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* ---------- Featured product (larger editorial card) ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
}
.featured__cover { background: var(--bg); }
.featured__cover svg { width: 100%; height: 100%; min-height: 320px; }
.featured__body {
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}
.featured__title { font-size: clamp(1.75rem, 3vw, 2.5rem); }
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured__cover svg { min-height: 240px; }
}

/* ---------- Trust strip ---------- */
.trust {
  background: rgba(248, 245, 238, 0.02);
  border-block: 1px solid var(--rule);
  padding-block: 1.75rem;
}
.trust__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}
.trust__item strong { color: var(--fg); font-weight: 500; }

/* ---------- Process / steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.step {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: -0.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--fg-muted); font-size: 0.9375rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 0; }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
}
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--fg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin-top: 0.75rem;
  color: var(--fg-muted);
  max-width: 70ch;
}

/* ---------- Product detail page ---------- */
.product-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(56px, 7vw, 96px);
}
.product-hero__cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg-elevated);
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.product-hero__cover svg { width: 100%; height: 100%; }
.product-hero__body {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.product-hero__price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--rule);
}
.product-hero__price .price__amount { font-size: 2rem; }
.product-hero__price .price__cents { font-size: 1rem; }
.product-hero__price del {
  color: var(--fg-dim);
  font-size: 0.875rem;
  margin-left: 0.5rem;
}
.product-hero__includes {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-hero__includes li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--fg);
}
.product-hero__includes li::before {
  content: "→";
  color: var(--gold);
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .product-hero { grid-template-columns: 1fr; }
  .product-hero__body { position: static; }
}

/* ---------- Testimonial slots ---------- */
.testimonial {
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial__quote {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  font-style: italic;
}
.testimonial__by {
  color: var(--fg-muted);
  font-size: 0.875rem;
}
.testimonial--placeholder .testimonial__quote {
  color: var(--fg-dim);
  font-style: normal;
}

/* ---------- Status / thank you pages ---------- */
.status-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}
.status-card__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(79, 163, 122, 0.15);
  color: var(--success);
  display: grid; place-items: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
}
.status-card h1 { margin-bottom: 0.75rem; }
.status-card p { color: var(--fg-muted); margin-bottom: 1.5rem; }

/* ---------- Notice / inline alert ---------- */
.notice {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule-strong);
  background: rgba(248, 245, 238, 0.03);
  font-size: 0.9375rem;
  color: var(--fg-muted);
}
.notice--info { border-color: rgba(201, 169, 97, 0.3); color: var(--fg-muted); }

/* ---------- Prose (for legal pages) ---------- */
.prose {
  max-width: 68ch;
  margin: 0 auto;
}
.prose h1 { margin-bottom: 1rem; }
.prose h2 { margin-top: 3rem; margin-bottom: 0.75rem; font-size: 1.5rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; font-size: 1.125rem; }
.prose p, .prose ul { margin-bottom: 1rem; color: var(--fg-muted); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.25rem; }
.prose a { color: var(--gold); border-bottom: 1px solid var(--rule-strong); }
.prose a:hover { color: var(--gold-bright); border-color: var(--gold-bright); }
.prose strong { color: var(--fg); }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  z-index: 100;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Buy button states ---------- */
.btn[data-buy][data-loading="true"] {
  pointer-events: none;
  opacity: 0.7;
}
.btn[data-buy][data-loading="true"]::after {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.buy-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ---------- Selection ---------- */
::selection { background: var(--gold); color: var(--bg); }