/* BuySEOWebsites.com - Fine Wine / Aged Digital Assets theme */

/* ── Design tokens (overridden by PHP-generated :root from design-tokens.json) */
:root {
  --black: #080604;
  --charcoal: #14100c;
  --cream: #f5ecdd;
  --paper: #fff8ed;
  --gold: #b99453;
  --copper: #8e4c28;
  --wine: #5b0717;
  --text: #1b1712;
  --muted: #756958;
  --border: rgba(185,148,83,.35);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 80px;
  --max-width: 1340px;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--black);
  font-family: var(--sans);
  line-height: 1.6;
  padding-top: var(--header-height);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.6rem, 7vw, 6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.6rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout utility ──────────────────────────────────────────────────────────── */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 7vw; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Fixed header ────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7vw;
  background: rgba(8,6,4,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 1.1rem;
  line-height: 1.1;
  color: #fff;
}
.brand-mark { color: var(--gold); font-size: 1.6rem; line-height: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.82);
}
.site-nav a:hover { color: var(--gold); }
.nav-cta {
  border: 1px solid rgba(255,255,255,.55);
  padding: 10px 18px;
  color: #fff;
}
.nav-cta:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
  padding: 8px 12px;
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--header-height));
  position: relative;
  display: flex;
  align-items: center;
  padding: 90px 7vw 80px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.50) 55%, rgba(0,0,0,.2) 100%),
    radial-gradient(circle at 72% 52%, rgba(185,148,83,.26), transparent 30%),
    var(--black);
  background-color: #170f0a;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(185,148,83,.06) 0,
    rgba(185,148,83,.06) 1px,
    transparent 1px,
    transparent 42px
  );
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
  margin: 0 0 20px;
}
.hero-copy {
  max-width: 580px;
  font-size: 1.18rem;
  color: rgba(255,255,255,.84);
  margin: 26px 0 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.button.primary { background: var(--wine); border-color: var(--wine); color: #fff; }
.button.primary:hover { background: #7a0920; border-color: #7a0920; }
.button.secondary { color: rgba(255,255,255,.88); background: transparent; }
.button.secondary:hover { color: var(--gold); border-color: var(--gold); }
.button.gold { background: var(--gold); border-color: var(--gold); color: var(--black); }
.button.gold:hover { background: #a8833e; border-color: #a8833e; }

/* ── Sections ────────────────────────────────────────────────────────────────── */
.cream-section { background: var(--cream); padding: 80px 7vw; color: var(--text); }
.dark-section { background: var(--black); padding: 88px 7vw; color: #fff; }
.paper-section { background: var(--paper); padding: 80px 7vw; color: var(--text); }

/* ── Intro grid ──────────────────────────────────────────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.intro-grid p { font-size: 1.08rem; color: var(--muted); }

/* ── Icon band ───────────────────────────────────────────────────────────────── */
.icon-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width);
  margin: 40px auto 0;
}
.icon-band article {
  padding: 36px 32px;
  border-left: 1px solid var(--border);
  text-align: center;
}
.icon-band article:first-child { border-left: 0; }
.line-icon {
  display: block;
  color: var(--copper);
  font-size: 2.2rem;
  margin-bottom: 14px;
  line-height: 1;
}
.icon-band h3 { margin-bottom: 8px; }
.icon-band p { color: var(--muted); font-size: .92rem; }

/* ── Section header ──────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ── Asset cards (featured portfolio) ────────────────────────────────────────── */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.asset-card {
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.asset-image {
  min-height: 200px;
  background-size: cover;
  background-position: center;
}
.asset-image.tier-seed     { background: linear-gradient(135deg, #2a1a0e, #8a5c2a); }
.asset-image.tier-aged     { background: linear-gradient(135deg, #1a0f08, #5c3016); }
.asset-image.tier-established { background: linear-gradient(135deg, #0e0a05, #3d1e0b); }
.asset-image.tier-vintage  { background: linear-gradient(135deg, #360510, #b99453); }
.asset-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.asset-type {
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .67rem;
  font-weight: 800;
}
.asset-body h3 { font-size: 1.05rem; }
.asset-body p { color: var(--muted); font-size: .92rem; flex: 1; }
.asset-body .asset-cta { margin-top: auto; font-size: .78rem; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

/* ── Stats bar ───────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--charcoal);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 7vw;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.stat-item { padding: 12px 24px; border-left: 1px solid var(--border); }
.stat-item:first-child { border-left: 0; }
.stat-number {
  display: block;
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.55); }

/* ── Market position ladder ──────────────────────────────────────────────────── */
.ladder-section { text-align: center; }
.ladder-section h2 { margin-bottom: 10px; }
.ladder-section .section-eyebrow { margin-bottom: 8px; }
.ladder-section > p { max-width: 600px; margin: 0 auto 36px; color: var(--muted); }
.ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.ladder article {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 32px 28px;
  text-align: left;
}
.ladder-num {
  display: block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}
.ladder article h3 { margin-bottom: 8px; }
.ladder article p { color: var(--muted); font-size: .92rem; }
.ladder .featured-rung { outline: 2px solid var(--gold); outline-offset: -1px; }

/* ── Directory grid (portfolio tiers) ────────────────────────────────────────── */
.portfolio-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.tier-card {
  border: 1px solid var(--border);
  padding: 28px 24px;
  background: rgba(255,255,255,.03);
  transition: border-color .15s, background .15s;
}
.tier-card:hover { border-color: var(--gold); background: rgba(185,148,83,.06); }
.tier-card .tier-num { color: var(--gold); font-family: var(--serif); font-size: 1.6rem; display: block; margin-bottom: 10px; }
.tier-card h3 { margin-bottom: 8px; color: #fff; }
.tier-card p { color: rgba(255,255,255,.65); font-size: .92rem; }

/* ── CTA section ─────────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(90deg, var(--wine), #160907);
  color: #fff;
  padding: 80px 7vw;
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.cta-section h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); margin-bottom: 10px; }
.cta-section .eyebrow { color: rgba(255,255,255,.65); }
.subscribe-form { display: flex; gap: 0; }
.subscribe-form input[type="email"] {
  flex: 1;
  min-height: 56px;
  border: 1px solid rgba(255,255,255,.35);
  border-right: none;
  background: rgba(0,0,0,.18);
  color: #fff;
  padding: 0 18px;
  font-family: var(--sans);
  font-size: 1rem;
  outline: none;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,.45); }
.subscribe-form input[type="email"]:focus { border-color: var(--gold); }
.subscribe-form button {
  min-height: 56px;
  padding: 0 24px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--black);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
}
.subscribe-form button:hover { background: #a8833e; border-color: #a8833e; }
.form-note { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: 10px; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.55);
  padding: 28px 7vw;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: .82rem;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--gold); }

/* ── Breadcrumbs ─────────────────────────────────────────────────────────────── */
.breadcrumbs {
  background: var(--charcoal);
  border-bottom: 1px solid var(--border);
  padding: 12px 7vw;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
}
.breadcrumbs-inner { max-width: var(--max-width); margin: 0 auto; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.breadcrumbs li + li::before { content: '/'; margin-right: 8px; opacity: .4; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs [aria-current="page"] { color: rgba(255,255,255,.75); }

/* ── Portfolio / directory pages ─────────────────────────────────────────────── */
.portfolio-page { background: var(--black); min-height: 80vh; padding: 60px 7vw 80px; }
.portfolio-page-inner { max-width: var(--max-width); margin: 0 auto; }
.portfolio-page-header { margin-bottom: 48px; color: #fff; }
.portfolio-page-header h1 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 14px; }
.portfolio-page-header p { color: rgba(255,255,255,.65); font-size: 1.08rem; max-width: 700px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.category-card {
  border: 1px solid var(--border);
  padding: 28px 24px;
  background: rgba(255,255,255,.03);
  color: #fff;
  transition: border-color .15s, background .15s;
}
.category-card:hover { border-color: var(--gold); background: rgba(185,148,83,.05); }
.category-card .cat-num { color: var(--gold); font-family: var(--serif); font-size: 1.4rem; display: block; margin-bottom: 10px; }
.category-card h3 { margin-bottom: 8px; font-size: 1rem; }
.category-card p { color: rgba(255,255,255,.6); font-size: .88rem; margin-bottom: 0; }

/* ── Listing detail ──────────────────────────────────────────────────────────── */
.listing-header {
  background: linear-gradient(to bottom, var(--charcoal), var(--black));
  padding: 60px 7vw 48px;
  color: #fff;
  border-bottom: 1px solid var(--border);
}
.listing-header-inner { max-width: var(--max-width); margin: 0 auto; }
.listing-type-badge {
  display: inline-block;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.listing-header h1 { font-size: clamp(1.8rem, 4vw, 3.4rem); margin-bottom: 18px; }
.listing-header .excerpt { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 700px; }

.listing-body {
  padding: 56px 7vw;
  background: var(--paper);
  color: var(--text);
}
.listing-body-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

.fields-table { width: 100%; border-collapse: collapse; }
.fields-table th, .fields-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.fields-table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  width: 38%;
}
.fields-table tr:last-child th,
.fields-table tr:last-child td { border-bottom: 0; }

.listing-sidebar-card {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 28px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.listing-sidebar-card h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 16px;
}
.listing-sidebar-card .website-link {
  display: block;
  color: var(--copper);
  font-weight: 700;
  margin-bottom: 16px;
  word-break: break-all;
}
.listing-sidebar-card .tier-badge {
  display: inline-block;
  background: var(--black);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 5px 12px;
  margin-bottom: 20px;
}
.inquire-cta {
  display: block;
  text-align: center;
  background: var(--wine);
  color: #fff;
  padding: 14px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  margin-top: 8px;
}
.inquire-cta:hover { background: #7a0920; }

/* ── Error / 404 ─────────────────────────────────────────────────────────────── */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 7vw;
  color: #fff;
  text-align: center;
}
.error-page h1 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 16px; color: var(--gold); }
.error-page p { color: rgba(255,255,255,.65); font-size: 1.08rem; margin-bottom: 28px; }

/* ── Thank you page ──────────────────────────────────────────────────────────── */
.thankyou-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 7vw;
  color: #fff;
  text-align: center;
}
.thankyou-page h1 { color: var(--gold); margin-bottom: 16px; }
.thankyou-page p { color: rgba(255,255,255,.7); max-width: 520px; margin: 0 auto 28px; }

/* ── Mobile nav overlay ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px 7vw;
    background: rgba(8,6,4,.97);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow-y: auto;
    z-index: 90;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); width: 100%; font-size: .9rem; }
  .nav-cta { border: 0; padding: 14px 0; }
  .intro-grid, .cta-inner { grid-template-columns: 1fr; gap: 36px; }
  .icon-band { grid-template-columns: 1fr 1fr; }
  .icon-band article { border-left: 0; border-top: 1px solid var(--border); }
  .asset-grid, .portfolio-tiers-grid, .category-grid { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; max-width: 480px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2n+1) { border-left: 0; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .subscribe-form { flex-direction: column; gap: 0; }
  .subscribe-form input[type="email"] { border-right: 1px solid rgba(255,255,255,.35); border-bottom: none; }
  .subscribe-form button { width: 100%; border-top: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .listing-body-inner { grid-template-columns: 1fr; }
  .listing-sidebar-card { position: static; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .hero { min-height: 520px; padding: 60px 6vw 60px; }
  .cream-section, .dark-section, .paper-section { padding: 56px 6vw; }
  .icon-band { grid-template-columns: 1fr; }
  .icon-band article:first-child { border-top: 0; }
}
