/* ==========================================================================
   GoldBuyer Chicago (goldbuyer-chicago.com) — styles.css
   Goal: Fast, mobile-first styling with strong accessibility + SEO UX.
   Notes:
   - Breakpoints: 768px, 1024px+
   - Colors: Gold #D4AF37, Navy #001F3F
   - Keep CSS lean for Lighthouse (minify for production build).
   ========================================================================== */

/* ---- Design tokens (CSS variables) -------------------------------------- */
:root{
  --navy:#001F3F;
  --gold:#D4AF37;
  --ink:#0b1020;
  --muted:#52616b;
  --bg:#ffffff;
  --bg-alt:#f7f8fb;
  --card:#ffffff;
  --border:rgba(0,0,0,.10);
  --shadow:0 10px 24px rgba(0,0,0,.08);
  --radius:14px;
  --radius-sm:10px;
  --focus: 3px solid rgba(212,175,55,.55);
  --max:1100px;
}

/* ---- Base reset + typography -------------------------------------------- */
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  line-height:1.55;
  color:var(--ink);
  background:var(--bg);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;height:auto;display:block;}
a{color:inherit;text-decoration:none;}
a:hover{text-decoration:underline;}
p{margin:0 0 1rem;}
ul,ol{margin:0 0 1rem;padding-left:1.2rem;}
li{margin:.35rem 0;}
h1,h2,h3{line-height:1.15;margin:0 0 .75rem;}
h1{font-size:1.9rem;letter-spacing:-.02em;}
h2{font-size:1.45rem;letter-spacing:-.015em;}
h3{font-size:1.1rem;}
small,.fineprint{color:var(--muted);font-size:.92rem;}
.fineprint{margin-top:.75rem}

/* Screen-reader only text (accessible labels) */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* ---- Layout helpers ------------------------------------------------------ */
.container{
  width:min(var(--max), 100% - 2rem);
  margin-inline:auto;
}

.section{padding:3rem 0;}
.section.alt{background:var(--bg-alt);}
.grid{display:grid;gap:1rem;}
.grid-2{grid-template-columns:1fr;}
.grid-3{grid-template-columns:1fr;}
@media (min-width:768px){
  h1{font-size:2.35rem;}
  h2{font-size:1.7rem;}
  .section{padding:4rem 0;}
  .grid-2{grid-template-columns:repeat(2,1fr);}
  .grid-3{grid-template-columns:repeat(3,1fr);}
}
@media (min-width:1024px){
  h1{font-size:2.7rem;}
}

/* ---- Skip link (keyboard users) ----------------------------------------- */
.skip-link{
  position:absolute;
  left:-999px; top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:1rem; top:1rem;
  width:auto;height:auto;
  padding:.75rem 1rem;
  background:var(--navy);
  color:#fff;
  border-radius:999px;
  z-index:999;
}

/* ---- Header + nav -------------------------------------------------------- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.75rem 0;
  flex-wrap:wrap; /* allows mobile nav to drop to a new line */
}
.brand{
  display:flex;
  align-items:center;
  gap:.65rem;
  font-weight:800;
  letter-spacing:-.015em;
}
.brand-mark{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(212,175,55,.22), rgba(0,31,63,.12));
  border:1px solid rgba(212,175,55,.35);
}
.brand-text strong{color:var(--navy);}

.site-nav{
  /* Desktop styles will override. Mobile uses .is-open. */
  display:none;
  flex-direction:column;
  gap:.75rem;
  width:100%;
  flex-basis:100%; /* full-width row under the header on mobile */
  padding:0 0 1rem;
}
.site-nav a{
  padding:.55rem .75rem;
  border-radius:10px;
}
.site-nav a:focus-visible{outline:var(--focus);outline-offset:2px;}
.site-nav .nav-cta{
  background:var(--gold);
  color:var(--navy);
  font-weight:800;
  text-align:center;
}
.site-nav .nav-cta:hover{text-decoration:none;filter:brightness(0.98);}
.phone-link{
  font-weight:800;
  color:var(--navy);
}

.nav-toggle{
  background:transparent;
  border:1px solid rgba(0,0,0,.20);
  border-radius:12px;
  padding:.55rem .65rem;
  display:grid;
  place-items:center;
}
.nav-toggle:focus-visible{outline:var(--focus);outline-offset:2px;}
.nav-toggle svg{width:22px;height:22px;}

.site-nav.is-open{
  display:flex;
}
@media (min-width:768px){
  .site-nav{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    width:auto;
    padding:0;
    gap:.25rem;
    flex-basis:auto;
  }
  .site-nav a{padding:.5rem .75rem;}
  .nav-toggle{display:none;}
}

/* ---- Buttons ------------------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.85rem 1rem;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:800;
  cursor:pointer;
  text-decoration:none!important;
  min-height:44px; /* touch target */
}
.btn-primary{
  background:var(--gold);
  color:var(--navy);
}
.btn-primary:hover{filter:brightness(0.98);}
.btn-ghost{
  background:transparent;
  border-color:rgba(0,0,0,.20);
}
.btn-ghost:hover{background:rgba(0,0,0,.03);}
.btn:focus-visible{outline:var(--focus);outline-offset:2px;}

.hero-cta{display:flex;flex-wrap:wrap;gap:.75rem;margin:1rem 0 0;}


/* ---- Mobile thumb-zone CTA (fixed bottom bar) ---------------------------- */
.mobile-cta{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:60;
  padding:.65rem .9rem calc(.65rem + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96);
  border-top:1px solid rgba(0,0,0,.10);
  backdrop-filter:saturate(180%) blur(10px);
  display:flex;
  gap:.6rem;
}
.mobile-cta .btn{flex:1;}
@media (min-width:768px){
  .mobile-cta{display:none;}
}
@media (max-width:767px){
  body{padding-bottom:88px;} /* ensures content isn't hidden behind the CTA bar */
}
@media print{
  .mobile-cta{display:none!important;}
}
/* ---- Hero ---------------------------------------------------------------- */
.hero{
  padding:2.5rem 0 1.5rem;
  background:
    radial-gradient(1200px 420px at 10% 10%, rgba(212,175,55,.18), transparent 60%),
    radial-gradient(900px 320px at 90% 0%, rgba(0,31,63,.12), transparent 60%);
}
.hero-small{padding:2.25rem 0 1.25rem;}
.hero-grid{
  display:grid;
  gap:1.5rem;
}
.hero-copy p{max-width:60ch;}
.hero-media{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.hero-media img{width:100%;height:auto;}
.urgency{
  margin-top:1rem;
  padding:1rem;
  border-radius:var(--radius);
  background:rgba(0,31,63,.06);
  border:1px dashed rgba(0,31,63,.18);
}
.trust-row{
  list-style:none;
  padding:0;
  margin:1.25rem 0 0;
  display:grid;
  gap:.5rem;
  color:var(--muted);
}
.trust-row strong{color:var(--ink);}
@media (min-width:768px){
  .hero-grid{grid-template-columns:1.2fr .8fr;align-items:center;}
  .trust-row{grid-template-columns:repeat(2, minmax(0,1fr));}
}

/* ---- Cards ---------------------------------------------------------------- */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.1rem;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.card h3{margin-bottom:.5rem;}
.card p:last-child{margin-bottom:0;}
.media-split{
  margin:1.25rem 0 0;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--card);
}
.media-split figcaption{
  padding:.75rem 1rem;
  color:var(--muted);
  font-size:.95rem;
}


/* ---- Timeline (About page) ---------------------------------------------- */
.timeline{display:grid;gap:1rem;margin-top:1rem;}
.timeline-item{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1rem 1.1rem;
}
@media (min-width:768px){
  .timeline{grid-template-columns:repeat(2,1fr);}
}

/* ---- Map link (Contact page) -------------------------------------------- */
.map-link img{
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}

/* ---- Steps ---------------------------------------------------------------- */
.steps{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:1rem;
}
.steps li{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1rem 1.1rem;
}
.steps h3{margin:0 0 .5rem;}
@media (min-width:768px){
  .steps{grid-template-columns:repeat(3,1fr);}
}

/* ---- CTA band ------------------------------------------------------------- */
.cta-band{
  margin-top:1.5rem;
  display:flex;
  flex-direction:column;
  gap:1rem;
  align-items:flex-start;
  padding:1.1rem;
  border-radius:var(--radius);
  border:1px solid rgba(212,175,55,.35);
  background:linear-gradient(135deg, rgba(212,175,55,.16), rgba(0,31,63,.06));
}
@media (min-width:768px){
  .cta-band{flex-direction:row;justify-content:space-between;align-items:center;}
}

/* ---- Forms ---------------------------------------------------------------- */
.form{display:grid;gap:.85rem;}
label{display:grid;gap:.35rem;font-weight:700;}
input,select,textarea{
  width:100%;
  padding:.85rem .9rem;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  font:inherit;
  background:#fff;
}
textarea{resize:vertical;}
input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:var(--focus);
  outline-offset:2px;
}
.help{display:block;font-weight:600;color:var(--muted);font-size:.92rem;margin-top:.25rem;}
.form-note{margin:0;color:var(--muted);min-height:1.2em;}
.field-error{border-color:rgba(190,18,60,.55);}
.error-text{color:rgb(190,18,60);font-weight:700;font-size:.95rem;margin-top:.25rem;}

.preview-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:.5rem;
}
.preview-grid img{
  border-radius:10px;
  border:1px solid var(--border);
  aspect-ratio:1/1;
  object-fit:cover;
}

/* Range input */
.range-readout{display:inline-block;margin-left:.5rem;color:var(--muted);font-weight:800;}
input[type="range"]{padding:0;height:44px;}

/* Big number (valuation output) */
.big-number{
  font-size:2.2rem;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--navy);
}

/* ---- Accordion ------------------------------------------------------------ */
.accordion{display:grid;gap:.75rem;margin-top:1rem;}
.accordion-item{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card);
  overflow:hidden;
}
.accordion-trigger{
  width:100%;
  text-align:left;
  padding:1rem 1.1rem;
  font:inherit;
  font-weight:900;
  background:transparent;
  border:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.accordion-trigger::after{
  content:"+";
  font-size:1.25rem;
  color:var(--navy);
}
.accordion-trigger[aria-expanded="true"]::after{content:"–";}
.accordion-trigger:focus-visible{outline:var(--focus);outline-offset:2px;}
.accordion-panel{padding:0 1.1rem 1.05rem;}
.accordion-panel p{margin:0;}

/* Star rating text (used in testimonials) */
.stars{color:var(--gold);letter-spacing:.04em;}

/* ---- Carousel ------------------------------------------------------------- */
.carousel{
  position:relative;
  margin-top:1rem;
}
.carousel-viewport{
  overflow:hidden;
  border-radius:var(--radius);
}
.carousel-track{
  display:flex;
  transition:transform .45s ease;
  will-change:transform;
}
.carousel-slide{
  flex:0 0 100%;
  padding:.5rem;
}
.carousel-controls{
  display:flex;
  gap:.5rem;
  justify-content:flex-end;
  margin-top:.75rem;
}
.carousel-btn{
  min-height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);
  padding:.6rem .9rem;
  background:#fff;
  cursor:pointer;
  font-weight:900;
}
.carousel-btn:focus-visible{outline:var(--focus);outline-offset:2px;}
@media (min-width:768px){
  .carousel-slide{flex-basis:33.333%;}
  .carousel-viewport{border:1px solid var(--border);background:#fff;}
}

/* Skeleton (simple loading placeholders) */
.carousel-skeleton{display:grid;gap:1rem;}
.skeleton-card{
  height:140px;
  border-radius:var(--radius);
  background:linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.02), rgba(0,0,0,.06));
  background-size:200% 100%;
  animation:sheen 1.2s infinite linear;
  border:1px solid rgba(0,0,0,.06);
}
@keyframes sheen{
  0%{background-position:0% 0%;}
  100%{background-position:200% 0%;}
}
@media (prefers-reduced-motion: reduce){
  .carousel-track{transition:none;}
  .skeleton-card{animation:none;}
}

/* ---- Scroll animations ---------------------------------------------------- */
[data-animate]{
  opacity:0;
  transform:translateY(12px);
  transition:opacity .55s ease, transform .55s ease;
}
.in-view{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion: reduce){
  [data-animate]{opacity:1;transform:none;transition:none;}
}

/* ---- Footer --------------------------------------------------------------- */
.site-footer{
  background:var(--navy);
  color:#fff;
  padding:2.5rem 0 1.25rem;
}
.footer-grid{
  display:grid;
  gap:1.5rem;
}
.site-footer a{color:#fff;}
.site-footer a:hover{opacity:.95;}
.footer-title{font-weight:900;margin:0 0 .75rem;}
.footer-bottom{
  margin-top:1.5rem;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.18);
  display:flex;
  flex-direction:column;
  gap:.5rem;
  color:rgba(255,255,255,.86);
}
.social{
  display:flex;
  gap:.75rem;
  align-items:center;
}
.social a{
  width:40px;height:40px;
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.25);
  border-radius:999px;
}
.social svg{width:18px;height:18px;fill:#fff;}
@media (min-width:768px){
  .footer-grid{grid-template-columns:1.2fr .8fr .8fr;}
  .footer-bottom{flex-direction:row;justify-content:space-between;align-items:center;}
}
