/* Cost Seg Smart — Gatlinburg sister site
   Cohort: str_smokies (Smoky Mountains cabin STR)
   Palette: Cedar + warm tan — cabin warmth */

:root {
  --primary: #3d2e1f;
  --accent:  #c4a574;
  --ink:     #1f1810;
  --bg:      #fdfbf6;
  --muted:   #6a5c4c;
  --border:  #d8cfbf;
  --maxw:    1100px;
  --r:       8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
/* WCAG AA contrast — accent is a background-only color; hover uses darker ink-mixed primary to keep ≥4.5:1 on body bg */
a:hover { color: color-mix(in srgb, var(--primary) 65%, var(--ink) 35%); text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--ink); margin: 1.4em 0 0.5em; }
h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1.7rem; letter-spacing: -0.01em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
h3 { font-size: 1.25rem; }
p { margin: 0.7em 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }

/* Top nav — variant top-with-search */
nav.top {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 0;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
nav.top .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
nav.top a { color: #fff; text-decoration: none; font-weight: 500; padding: 0.4rem 0.6rem; border-radius: 4px; min-height: 44px; display: inline-flex; align-items: center; }
nav.top a:hover { background: rgba(255,255,255,0.12); }
nav.top .brand { font-weight: 700; font-size: 1.05rem; }
nav.top .nav-links { display: flex; gap: 0.2rem; flex-wrap: wrap; }
nav.top .cta { background: var(--accent); color: var(--ink); padding: 0.5rem 1rem; border-radius: 4px; font-weight: 600; }
nav.top .cta:hover { background: #fff; color: var(--primary); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 85%, black) 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
}
.hero h1 { color: #fff; margin-top: 0; }
.hero .lede { font-size: 1.15rem; opacity: 0.92; max-width: 680px; }
.hero .savings-pill {
  display: inline-block; background: var(--accent); color: var(--ink);
  padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 700;
  font-size: 0.92rem; margin-bottom: 1rem;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}
.stat .num { font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat .lbl { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

/* Section spacing */
section { padding: 2rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.96rem; }
th, td { padding: 0.7rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: color-mix(in srgb, var(--primary) 10%, var(--bg)); font-weight: 600; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }

/* Cards (engine fixtures, neighborhoods) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 1rem 0;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem;
}
.card h3 { margin-top: 0; }
.card .num-big { font-size: 1.7rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.card .num-lbl { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.card .meta { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }
.card img { width: 100%; height: auto; border-radius: 4px; margin-bottom: 0.8rem; }

/* CTAs */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  padding: 0.85rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 1rem;
  min-height: 44px;
  line-height: 1.4;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 80%, var(--ink)); color: #fff; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--ink); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0; }

/* Callouts */
.callout {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: 4px;
  margin: 1.2rem 0;
}
.callout.warn { background: color-mix(in srgb, #c44 10%, var(--bg)); border-left-color: #c44; }

/* FAQ */
details {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.7rem 1rem;
  margin: 0.5rem 0;
  background: #fff;
}
details[open] { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
details summary { font-weight: 600; cursor: pointer; padding: 0.3rem 0; }
details summary::marker { color: var(--accent); }
details p { margin: 0.5rem 0; }

/* Trust / freshness */
.freshness {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
}

/* Footer */
footer { background: var(--ink); color: #ccc; padding: 2.5rem 0 2rem; margin-top: 2rem; font-size: 0.9rem; }
footer h4 { color: #fff; margin-top: 0; font-size: 1rem; }
footer a { color: #ddd; }
footer a:hover { color: var(--accent); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}
.footer-bottom { border-top: 1px solid #333; padding-top: 1rem; color: #999; font-size: 0.82rem; }

/* Mobile baseline — kill iOS zoom + meet 44px tap target */
input:not([type=hidden]), select, textarea { font-size: 16px !important; }
nav a, .nav a, .top-nav a, footer a, .btn, button, summary, details summary { min-height: 44px; display: inline-flex; align-items: center; }

/* Mobile: prevent wide tables from forcing whole-page zoom-out on small viewports */
@media (max-width: 720px) {
  section table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.88rem;
  }
  section table thead,
  section table tbody {
    display: inline-table;
    width: auto;
    min-width: 100%;
  }
  /* Image-fluidity guard against wide hero images */
  img { max-width: 100%; height: auto; }
}

/* Responsive */
@media (max-width: 720px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  .hero { padding: 2rem 0 1.6rem; }
  body { font-size: 16px; }
  nav.top .container { gap: 0.4rem; }
  nav.top .nav-links { gap: 0; }
}
