/* BuyRanked Smart Home — mobile-first editorial stylesheet. No frameworks, system fonts. */

:root {
  --ink: #17242e;
  --muted: #5b6b7a;
  --accent: #b25a1b;
  --accent-dark: #7a3d0e;
  --bg: #ffffff;
  --wash: #faf5ec;
  --border: #e6d9c2;
  --notice-bg: #fff8e6;
  --notice-border: #e3c97e;
  --radius: 10px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--accent-dark);
  color: #fff;
  padding: 14px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: 0.2px; }
.brand span { font-weight: 400; opacity: 0.85; }
.site-nav a {
  color: #e8f1f8;
  text-decoration: none;
  margin-left: 16px;
  font-size: 15px;
}
.site-nav a:hover { text-decoration: underline; }

/* ---------- Type ---------- */
h1 { font-size: 30px; line-height: 1.25; margin: 28px 0 12px; letter-spacing: -0.3px; }
h2 { font-size: 23px; line-height: 1.3; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 20px; }
.updated { font-size: 13px; color: var(--muted); margin: 0 0 20px; }

/* ---------- Mission statement ---------- */
.mission {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 0 0 30px;
}
.mission-kicker {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent-dark); margin: 0 0 6px;
}
.mission-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.3px;
  margin: 0 0 8px; color: var(--ink);
}
.mission-text { font-size: 16px; color: var(--muted); margin: 0; }
.mission-text a { color: var(--accent-dark); font-weight: 700; }

/* ---------- Disclosure notice ---------- */
.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  margin: 0 0 28px;
}
.notice strong { display: block; margin-bottom: 4px; }
.notice a { color: var(--accent-dark); }

/* ---------- Quick picks ---------- */
.quick-picks { margin: 0 0 36px; }
.section-title { font-size: 22px; margin: 0 0 14px; }
.pick-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.pick-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--wash);
  position: relative;
}
.pick-card .pick-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.pick-card h3 { margin: 0 0 4px; font-size: 18px; }
.pick-card p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.pick-card .price { font-weight: 700; color: var(--ink); }

/* ---------- Trending now ---------- */
/* Full-bleed tinted band so the section separates from the rest of the page */
.trending {
  margin: 0 0 36px;
  background: rgba(250, 240, 226, 0.7);
  border-top: 1px solid #e8d3ac;
  border-bottom: 1px solid #e8d3ac;
  padding: 40px 0;
}
.trending .email-box { margin: 24px 0 0; }
.trend-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 8px;
}
.trend-sub { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.trend-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--wash); overflow: hidden; position: relative;
}
.trend-photo-wrap { position: relative; background: #fff; }
.trend-photo { display: block; width: 100%; height: auto; }
.trend-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: #fff; background: var(--accent-dark); border-radius: 6px; padding: 4px 10px;
}
.trend-body { padding: 18px; }
.trend-body h3 { margin: 0 0 4px; font-size: 20px; }
.trend-body .price { font-weight: 700; color: var(--ink); margin: 0 0 10px; font-size: 16px; }
.trend-body p { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
.trend-body p strong { color: var(--ink); }
.verdict {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; border-radius: 6px; padding: 3px 10px; margin-right: 6px;
}
.verdict-worthit { background: #e2f2e7; color: #14663a; }
.trend-caveat { font-size: 13px !important; font-style: italic; }

/* ---------- Comparison table ---------- */
/* The compare section is the centerpiece: card container + oversized title */
section.compare {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 26px 22px 4px;
  margin: 0 0 36px;
}
section.compare .section-title {
  font-size: 30px;
  letter-spacing: -0.3px;
  color: var(--accent-dark);
  margin: 0 0 4px;
}
section.compare .table-scroll {
  margin: 0 -22px 26px;
  padding: 0 22px;
}
.table-hint {
  display: none;
  font-size: 13px;
  color: var(--muted);
  margin: -8px 0 6px;
  text-align: right;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px 36px;
  padding: 0 20px;
}
table.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}
table.compare th, table.compare td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.compare th {
  background: var(--wash);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
table.compare td.rank { font-weight: 800; color: var(--accent-dark); white-space: nowrap; }

@media (max-width: 719px) {
  .table-hint { display: block; }
  /* Sticky product column so you always know which row you're reading */
  table.compare th:nth-child(2),
  table.compare td:nth-child(2) {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    background: #fff;
    box-shadow: 2px 0 0 var(--border);
  }
  table.compare th:nth-child(2) { background: var(--wash); z-index: 2; }
  table.compare td:nth-child(2) { font-weight: 700; z-index: 1; }
}

/* ---------- Product sections ---------- */
.product {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 0 0 28px;
  background: #fff;
}
.product-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.rank-badge {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.price { font-weight: 700; margin: 2px 0 0; }
.price-note { font-size: 13px; color: var(--muted); font-weight: 400; }
.rank-why { font-style: italic; color: var(--muted); font-size: 15px; margin: 0 0 14px; }

.product-img {
  background: var(--wash);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 16px;
  padding: 16px;
  text-align: center;
  overflow: hidden;
}
.product-img img {
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: 4px;
}

.best-for { margin: 0 0 12px; }
ul.specs { margin: 0 0 16px; padding-left: 20px; font-size: 15px; }
ul.specs li { margin-bottom: 4px; }

.pros-cons { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0 0 18px; }
.pros, .cons {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
}
.pros { background: #eef7f1; }
.cons { background: #faf4ec; }
.pros h3 { color: var(--accent-dark); }
.cons h3 { color: #8a5a1d; }
.pros ul, .cons ul { margin: 0; padding-left: 18px; }
.pros li, .cons li { margin-bottom: 4px; }

.cta-row { display: flex; flex-direction: column; gap: 10px; }

/* ---------- "On a budget?" boxes ---------- */
.budget-box {
  margin-top: 20px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: #f6faf7;
  padding: 18px;
}
.budget-box > h3 { margin: 0; font-size: 18px; color: var(--accent-dark); }
.budget-sub { margin: 2px 0 14px; font-size: 14px; color: var(--muted); font-style: italic; }
.budget-inner { display: grid; gap: 14px; grid-template-columns: 1fr; }
.budget-img {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  overflow: hidden;
}
.budget-img img {
  max-height: 200px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.budget-body h4 { margin: 0 0 4px; font-size: 17px; }
.budget-body .price { margin: 0 0 10px; }
.budget-body ul.specs { font-size: 14px; }
.give-up {
  font-size: 15px;
  background: #fff;
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin: 0 0 12px;
}
.budget-body .best-for { font-size: 15px; }
.budget-box .btn { margin-top: 4px; }
.btn {
  display: block;
  text-align: center;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: #fff;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--wash); }

/* ---------- Email signup ---------- */
.email-box {
  background: var(--accent-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 22px;
  margin: 36px 0;
}
.email-box h2 { color: #fff; margin-bottom: 8px; }
.email-box p { color: #d7e7dd; margin: 0 0 16px; font-size: 15px; }
.email-box form { display: flex; flex-direction: column; gap: 10px; }
.email-box input[type="email"],
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 16px;
  width: 100%;
  font-family: inherit;
}
.email-box .btn-primary { border: none; cursor: pointer; }
.form-message {
  font-size: 15px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px 0 0;
}
.contact-form .form-message { background: var(--notice-bg); border: 1px solid var(--notice-border); }

/* ---------- FAQ ---------- */
.faq { margin: 0 0 40px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.faq a { color: var(--accent-dark); }
.faq p { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.faq p strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: #12241b;
  color: #c9d6ce;
  padding: 36px 0 28px;
  margin-top: 20px;
  font-size: 15px;
}
.site-footer nav { margin-bottom: 16px; }
.site-footer nav a {
  color: #e8f1f8;
  text-decoration: none;
  margin-right: 18px;
  line-height: 2.2;
}
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 6px 0; }
.footer-disclosure { font-size: 13px; color: #93a79b; max-width: 640px; }

/* ---------- Legal pages ---------- */
.legal h1 { margin-top: 28px; }
.legal h2 { margin: 26px 0 8px; font-size: 20px; }
.legal p, .legal li { font-size: 16px; }
.legal ul { padding-left: 20px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 40px; }
.contact-form label { font-weight: 700; font-size: 15px; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .btn-primary { border: none; cursor: pointer; width: 100%; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 36px; }
  .pick-grid { grid-template-columns: repeat(3, 1fr); }
  .pros-cons { grid-template-columns: 1fr 1fr; }
  .budget-inner { grid-template-columns: 220px 1fr; align-items: start; }
  .cta-row { flex-direction: row; }
  .cta-row .btn { flex: 1; }
  .email-box form { flex-direction: row; }
  .email-box input[type="email"] { flex: 1; }
  .email-box .btn-primary { white-space: nowrap; }
}

/* ---------- Small phones: roomier header nav, full-width nav row ---------- */
@media (max-width: 560px) {
  .site-header .wrap { justify-content: center; }
  .site-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .site-nav a { margin: 0; padding: 10px 12px; }
}

/* ---------- Anchor jump polish ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.product { scroll-margin-top: 16px; }
/* Jump links in the comparison table and quick picks */
table.compare td a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.pick-card h3 a { color: inherit; text-decoration: none; }
.pick-card h3 a:hover { text-decoration: underline; }

/* ---------- Brand logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-logo { height: 30px; width: auto; background: #fff; border-radius: 7px; padding: 3px 6px; }

/* ---------- Brand icon accents ---------- */
.title-icon { height: 24px; width: auto; vertical-align: -5px; margin-right: 8px; }
.cat-icon-tile { background: #e9f4ed; border-radius: 12px; padding: 7px 9px; display: inline-flex; align-self: flex-start; }
.cat-icon-tile img { height: 30px; width: auto; display: block; }
.email-icon { height: 26px; width: auto; background: #fff; border-radius: 6px; padding: 2px 5px; vertical-align: -7px; margin-right: 8px; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand img { height: 22px; width: auto; background: #fff; border-radius: 5px; padding: 2px 4px; }

.pick-photo {
  display: block; width: 100%; height: 180px; object-fit: cover;
  border-radius: 10px; margin-bottom: 12px;
}

/* ---------- Trending feature card: full-width editorial layout on desktop ---------- */
/* The trending section holds a single card; don't strand it in a 3-col grid */
@media (min-width: 640px) {
  .trending .pick-grid { grid-template-columns: 1fr; }
  .trending .pick-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
  }
  .trending .pick-photo { height: 300px; margin-bottom: 0; }
}

/* ---------- Faint fixed smart-home backdrop (desktop only) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("images/smarthome-bg.jpg") center 30% / cover no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
/* Keep it off phones/tablets: faint there would only fight readability */
@media (max-width: 720px) {
  body::before { display: none; }
}

/* ---------- Cross-promotion ---------- */
.cross-promo { margin: 0 0 36px; }
.footer-cross span { color: #cfe3d7; margin-right: 18px; line-height: 2.2; }
@media (min-width: 640px) {
  .cross-promo .pick-grid { grid-template-columns: repeat(2, 1fr); }
}
