/* =========================================================
   Gavel — estate-sale-at-golden-hour landing
   Palette and type pulled from Gavel/Theme/ThemePalette.swift
   ========================================================= */

@import url('https://api.fontshare.com/v2/css?f[]=fraunces@400,500,600,700&f[]=cabinet-grotesk@400,500,700&display=swap');

:root {
  --brand:        #C14A2A;
  --brand-light:  #F2D4BE;
  --brand-deep:   #6E2A14;

  --bg-primary:   #F4EEE3;
  --bg-secondary: #EAE2D2;
  --bg-card:      #FBF7EE;
  --bg-hero:      #1A1410;

  --text-primary:   #1A1410;
  --text-secondary: #5A4A3C;
  --text-muted:     #6E5A4A;   /* darkened from #9A8776 for WCAG AA (~5.1:1) */
  --text-faint:     #9A8776;   /* decorative only — brackets, dividers, ornament */
  --text-on-hero:   #F4EEE3;

  --divider: #D8CCB8;

  --serif: "Fraunces", "Hoefler Text", "Iowan Old Style", Cambria, serif;
  --sans:  "Cabinet Grotesk", "Inter", system-ui, sans-serif;

  --max: 1120px;
  --radius-sm: 2px;
}

/* ============================ Reset ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 17px; }

body {
  font-family: var(--serif);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.55;
  min-height: 100vh;
  /* Subtle grain — no fixed attachment (it breaks rendering) */
  background-image:
    radial-gradient(rgba(110, 42, 20, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(26, 20, 16, 0.025) 1.5px, transparent 2px);
  background-size: 3px 3px, 11px 11px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--brand); color: var(--bg-primary); }

/* Keyboard focus — visible for keyboard users, invisible for mouse */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip to content — revealed on focus */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--bg-hero);
  color: var(--text-on-hero);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-110%);
  transition: transform 160ms ease;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

/* ============================ Container ============================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
}

/* ============================ Header / Nav ============================ */
.site-header {
  padding: 1.4rem 0 1.1rem;
  border-bottom: 0.5px solid var(--divider);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(26, 20, 16, 0.25);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 0.25rem;
  border-bottom: 0.5px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.nav-links a:hover {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
}

@media (max-width: 640px) {
  .nav-links { gap: 1.1rem; font-size: 0.7rem; }
}

/* ============================ Hero ============================ */
.hero {
  padding: 4.5rem 0 4rem;
  border-bottom: 0.5px solid var(--divider);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Catalog-style eyebrow — bracketed caps, no chip */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 1.4rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: var(--brand);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.5vw + 0.5rem, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--brand);
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 0.8vw + 0.8rem, 1.25rem);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 30rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-proof {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  max-width: 22rem;
  line-height: 1.45;
}

.hero-proof em { font-style: italic; color: var(--text-primary); }

/* ============================ Scanner visual ============================ */
.scanner {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-hero);
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(26, 20, 16, 0.4),
    0 10px 20px -8px rgba(26, 20, 16, 0.22);
}

.scanner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner__brackets {
  position: absolute;
  inset: 7%;
  pointer-events: none;
}

.scanner__bracket {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--bg-primary);
  opacity: 0.85;
}

.scanner__bracket--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.scanner__bracket--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.scanner__bracket--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.scanner__bracket--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.scanner__card {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 6%;
  background: var(--bg-primary);
  padding: 0.95rem 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.scanner__lot {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--brand-deep);
  text-transform: uppercase;
  padding-bottom: 0.4rem;
  border-bottom: 0.5px solid var(--divider);
  margin-bottom: 0.4rem;
}

.scanner__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.scanner__meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
}

.scanner__price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.45rem;
  border-top: 0.5px solid var(--divider);
}

.scanner__price-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scanner__price-value {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--brand);
}

/* ============================ App Store badge (SVG) ============================ */
.app-store-badge {
  display: inline-block;
  height: 48px;
  transition: transform 140ms ease, filter 140ms ease;
}

.app-store-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* ============================ Outcome sections ============================ */
.outcomes {
  padding: 5rem 0 2rem;
}

.outcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 0.5px solid var(--divider);
}

.outcome:first-child { border-top: 0; }

.outcome--reverse .outcome-text { order: 2; }

.outcome__eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.outcome__eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--brand);
}

.outcome-text h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 2.5vw + 0.6rem, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

.outcome-text h2 em { font-style: italic; color: var(--brand); font-weight: 500; }

.outcome-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 28rem;
}

/* Outcome visual — ledger card */
.ledger-card {
  background: var(--bg-card);
  border: 0.5px solid var(--divider);
  border-radius: 3px;
  padding: 1.75rem 2rem 2rem;
  box-shadow:
    0 1px 0 rgba(26, 20, 16, 0.05),
    0 16px 40px -20px rgba(26, 20, 16, 0.18);
}

.ledger-card__title {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--text-primary);
  margin-bottom: 0.4rem;
}

.ledger-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 0.5px solid var(--divider);
  gap: 1rem;
}

.ledger-card__row:last-of-type { border-bottom: 1.5px solid var(--text-primary); }

.ledger-card__row dt {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-deep);
  font-weight: 500;
  white-space: nowrap;
}

.ledger-card__row dd {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.3;
}

.ledger-card__row dd em { font-style: italic; color: var(--text-secondary); }

.ledger-card__estimate {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ledger-card__estimate-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-deep);
  font-weight: 500;
}

.ledger-card__estimate-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--brand);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Outcome visual — collection grid */
.collection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.collection__lot {
  background: var(--bg-card);
  border: 0.5px solid var(--divider);
  border-radius: 3px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 0 rgba(26, 20, 16, 0.04);
}

.collection__lot-no {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.collection__lot-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.collection__lot-price {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand);
}

/* Outcome visual — comp list */
.comps {
  background: var(--bg-card);
  border: 0.5px solid var(--divider);
  border-radius: 3px;
  padding: 1.5rem 1.75rem;
}

.comps__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 0.5px solid var(--divider);
  align-items: baseline;
}

.comps__row:last-child { border-bottom: 0; }

.comps__place {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.comps__place em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.1rem;
  letter-spacing: 0.02em;
}

.comps__price {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--brand);
  white-space: nowrap;
}

/* ============================ CTA band ============================ */
.cta {
  background: var(--bg-hero);
  color: var(--text-on-hero);
  padding: 5.5rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(242, 212, 190, 0.12);
  border-bottom: 1px solid rgba(242, 212, 190, 0.12);
}

/* Single warm ember bloom from the top — no SaaS-mesh gradient at the bottom */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 50% at 50% -5%, rgba(193, 74, 42, 0.14), transparent 70%);
  pointer-events: none;
}

/* Catalog flourish above the CTA headline */
.cta__flourish {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--brand);
  opacity: 0.75;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
  font-weight: 500;
}

.cta .container { position: relative; }

.cta h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw + 0.6rem, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.cta h2 em { font-style: italic; color: var(--brand); font-weight: 500; }

.cta p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(244, 238, 227, 0.7);
  margin-bottom: 2rem;
}

/* ============================ Footer ============================ */
.site-footer {
  border-top: 0.5px solid var(--divider);
  padding: 2.25rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.footer-copy { white-space: nowrap; }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 0.5px solid transparent;
  padding-bottom: 2px;
  transition: color 140ms ease, border-color 140ms ease;
}

.footer-links a:hover {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
}

/* ============================ Legal / Support page ============================ */
.legal-page {
  padding: 3.5rem 0 5rem;
}

.legal-card {
  max-width: 38rem;
  margin: 0 auto;
}

.legal-card h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 3vw + 0.6rem, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.legal-card > p:first-of-type {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--text-primary);
}

.legal-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.75rem;
}

.legal-card p, .legal-card li {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.legal-card p + p { margin-top: 1rem; }

.legal-card ul, .legal-card ol {
  margin: 0.75rem 0 1rem 1.35rem;
}

.legal-card li + li { margin-top: 0.5rem; }

.legal-card a {
  color: var(--brand-deep);
  text-decoration: none;
  border-bottom: 0.5px solid var(--brand-light);
  transition: border-color 140ms ease;
}

.legal-card a:hover { border-bottom-color: var(--brand); }

/* Pull-out TL;DR callout */
.legal-lede {
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  border-left: 2px solid var(--brand);
  border-radius: 0 2px 2px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.legal-footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 0.5px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ============================ Responsive ============================ */
@media (max-width: 820px) {
  .hero { padding: 3rem 0 3rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .scanner { max-width: 20rem; margin: 0 auto; }

  .outcome { grid-template-columns: 1fr; gap: 2.25rem; padding: 2.5rem 0; }
  .outcome--reverse .outcome-text { order: 0; }
  .outcomes { padding: 3rem 0 1rem; }

  .cta { padding: 4rem 0 3.5rem; }

  .footer-inner { flex-direction: column; text-align: center; gap: 1rem; }
  .legal-footer { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
