/*
 * Hub4Estate SEO pages — shared visual system.
 *
 * These 48 static HTML files carry real organic search traffic and are served outside the
 * React app (no build step), so this is one plain, self-contained stylesheet linked from
 * every page instead of 48 copies of inline <style> blocks in the old amber/gold look.
 *
 * Tokens match the live site: frontend/tailwind.config.js (accent-700 #a85f42, accent-600
 * #c4724f, cream #f5f3ef / #faf9f7, ink #09090B) and frontend/src/pages/FunnelPage.tsx
 * (Playfair Display headings, Inter body, JetBrains Mono for numbers, the single terracotta
 * pill CTA, no card-grid/gradient/glassmorphism decoration).
 *
 * Contrast: white text on --seo-accent (#a85f42) measures 4.79:1, passes WCAG AA. The
 * lighter accent-600 (#c4724f) measures 3.58:1 and FAILS — never use it for text-on-fill.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --seo-cream: #faf9f7;
  --seo-cream-alt: #f5f3ef;
  --seo-ink: #09090b;
  --seo-ink-soft: rgba(9, 9, 11, 0.68);
  /* 0.48 measured 3.46 on white, under the 4.5 AA minimum, and it is the colour of
     .breadcrumb, .updated and .label. On electrical-products-india that is 30 elements,
     28 of them the .label used down the whole page. 0.60 measures 5.29. */
  --seo-ink-faint: rgba(9, 9, 11, 0.60);
  --seo-line: rgba(9, 9, 11, 0.12);
  --seo-line-soft: rgba(9, 9, 11, 0.07);
  --seo-white: #ffffff;

  --seo-accent: #a85f42;       /* accent-700 — the only shade used for text-on-fill (4.79:1) */
  --seo-accent-hover: #8c4e37; /* accent-800 */
  --seo-accent-light: #edc4b0; /* accent-300, for borders/tints only, never as text bg */
  --seo-accent-bg: #faeee8;    /* accent-100 */

  --seo-success: #166534;
  --seo-success-bg: #dcfce7;
  --seo-success-line: rgba(22, 101, 52, 0.25);
  --seo-error: #991b1b;
  --seo-error-bg: #fee2e2;
  --seo-error-line: rgba(153, 27, 27, 0.2);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--seo-cream);
  color: var(--seo-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* belt and suspenders: no element here should ever force page scroll */
}
img, svg { max-width: 100%; height: auto; }
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── Motion and focus ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
a, .cta, .cta-link, .wa-btn { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, .cta:focus-visible, .cta-link:focus-visible, .wa-btn:focus-visible {
  outline: 2px solid var(--seo-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--seo-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.22;
}
h1 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem); margin: 28px 0 16px; }
h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem); margin: 44px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--seo-line); }
h3 { font-size: 1.2rem; margin: 30px 0 12px; }
h4 { font-size: 1.02rem; margin: 20px 0 8px; }
p { margin: 0 0 16px; color: var(--seo-ink-soft); font-size: 1rem; max-width: 74ch; }
ul, ol { margin: 0 0 20px 22px; padding: 0; }
li { margin-bottom: 8px; color: var(--seo-ink-soft); font-size: 1rem; }
strong { color: var(--seo-ink); font-weight: 700; }
a { color: var(--seo-accent); text-underline-offset: 2px; }
a:hover { color: var(--seo-accent-hover); }

/* ── Top bar (both markups: <nav> as the bar itself, or <header><nav>) ───── */
body > nav, body > header {
  background: var(--seo-ink);
  /* The bar sets a dark ground and no colour, so its own text nodes inherited the body ink,
     which IS --seo-ink. The "|" separators between the nav links rendered ink on ink and
     were invisible. The links themselves were fine because they carry their own colour. */
  color: rgba(255, 255, 255, 0.55);
  padding: 16px 0;
}
body > nav .container, body > header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  max-width: 1100px;
}
body > nav a, body > header nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-left: 18px;
}
body > nav a:first-child { margin-left: 0; }
body > nav a:hover, body > header nav a:hover { color: var(--seo-accent-light); }
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff !important;
  text-decoration: none !important;
}

/* ── Site header, the 422 generated city pages ────────────────────────────
   These use <header class="site-header"><a class="wordmark">, and neither class
   had a rule. The anchor fell through to the default link style and rendered as
   underlined terracotta on the generic dark bar: it read as an unstyled page.

   Matched to the React shell in src/components/Layout.tsx rather than invented,
   so a visitor crossing from a city page into the app does not appear to change
   sites. White ground, hairline rule, wordmark in ink at 17px. */
.site-header {
  background: var(--seo-white);
  border-bottom: 1px solid var(--seo-line-soft);
  padding: 18px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  /* Explicit, not inherited. `body > header .container` also sets a width, so simply
     dropping the declaration here handed the 1100px back to that rule and the wordmark
     stayed 100px left of the h1 it sits above. Must match .container's 900px. */
  max-width: 900px;
}
.site-header .wordmark,
.site-header .wordmark:hover {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--seo-ink);
  text-decoration: none;
}

/* ── Breadcrumb (div.breadcrumb or nav.breadcrumb, never the top bar) ────── */
.breadcrumb {
  font-size: 13px;
  color: var(--seo-ink-faint);
  margin: 16px 0;
  padding: 0;
  background: none;
}
.breadcrumb a { color: var(--seo-accent); text-decoration: none; }
.updated { font-size: 13px; color: var(--seo-ink-faint); margin-bottom: 24px; }

/* ── Hero — flattened. No gradient, left-aligned like the live funnel page ─ */
.hero {
  background: var(--seo-cream-alt);
  color: var(--seo-ink);
  padding: 48px 0;
  text-align: left;
  border-bottom: 1px solid var(--seo-line);
}
.hero .container { max-width: 900px; }
.hero h1 { margin-top: 0; }
.hero p { color: var(--seo-ink-soft); font-size: 1.08rem; max-width: 62ch; margin-left: 0; }

main { padding: 8px 0 24px; }

/* ── The one CTA, everywhere. Same pill as FunnelPage's ChatCta. ─────────
   #a85f42 background + white text = 4.79:1, passes WCAG AA (verified in the
   task brief). Never swap in the lighter accent-600 for a filled button. */
.cta, .cta-link, .wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 28px;
  background: var(--seo-accent);
  color: #fff !important;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.cta:hover, .cta-link:hover, .wa-btn:hover { background: var(--seo-accent-hover); color: #fff; }
.cta svg, .cta-link svg, .wa-btn svg { width: 20px; height: 20px; flex: none; }
.wa-cta-wrap { margin: 24px 0 32px; }
.wa-cta-wrap p { margin: 10px 0 0; font-size: 0.9rem; color: var(--seo-ink-faint); }

/* Dark callout section keeps the same pill; terracotta reads fine on ink. */
.cta-section {
  background: var(--seo-ink);
  color: #fff;
  padding: 44px 32px;
  border-radius: 20px;
  text-align: center;
  margin: 56px 0;
}
.cta-section h2 { color: #fff; border: none; margin-top: 0; padding-bottom: 0; }
.cta-section p { color: rgba(255, 255, 255, 0.72); margin-left: auto; margin-right: auto; }
/* Full white, not 85%. On the accent ground rgb(168,95,66) pure white measures 4.79 and
   85% composites down to 3.95, under the 4.5 minimum. The alpha was buying nothing: this
   is the button label. */
.cta-section a { color: #fff !important; }

/* ── Callout boxes: highlight, savings, deal — one flat treatment ────────── */
.highlight-box, .savings-box, .deal-card {
  background: var(--seo-cream-alt);
  border-left: 3px solid var(--seo-accent);
  padding: 18px 22px;
  margin: 22px 0;
  border-radius: 0 12px 12px 0;
}
.highlight-box strong, .savings-box strong, .deal-card strong { color: var(--seo-ink); }
.verdict, .vs-box-wrap {
  background: var(--seo-cream-alt);
  border: 1px solid var(--seo-line);
  border-radius: 16px;
  padding: 28px;
  margin: 36px 0;
}
.verdict h2 { margin-top: 0; border: none; padding-bottom: 0; }
.platform-section { padding: 22px 0; border-top: 1px solid var(--seo-line); }
.platform-section:first-of-type { border-top: none; padding-top: 0; }
.platform-section h3 { margin-top: 0; }

/* ── Two-up compare cards (pro/con) — content, not decoration, so they stay,
   flattened: thin border, no shadow, tinted only by outcome. ─────────────── */
.vs-box, .compare-box { display: flex; gap: 20px; flex-wrap: wrap; margin: 24px 0; }
.vs-card, .compare-card {
  flex: 1 1 260px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--seo-line);
  background: var(--seo-cream-alt);
}
.vs-card.good, .compare-card.good { border-color: var(--seo-success-line); background: var(--seo-success-bg); }
.vs-card.bad, .compare-card.bad { border-color: var(--seo-error-line); background: var(--seo-error-bg); }
.vs-card h3, .compare-card h3 { margin-top: 0; }

/* ── Directory / category / brand link lists — no card grids, no boxes ───── */
.grid, .card-grid {
  columns: 2;
  column-gap: 32px;
  margin: 20px 0 12px;
}
.card {
  display: block;
  break-inside: avoid;
  padding: 12px 0;
  margin: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--seo-line);
  border-radius: 0;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.card:hover { border-bottom-color: var(--seo-accent); }
.card h4 { margin: 0 0 3px; font-family: var(--font-sans); font-weight: 700; font-size: 0.98rem; color: var(--seo-ink); }
.card p { margin: 0; font-size: 0.87rem; color: var(--seo-ink-faint); max-width: none; }
@media (max-width: 640px) { .grid, .card-grid { columns: 1; } }

.categories-grid, .brands, .brand-links, .product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 16px 0 26px;
}
.categories-grid li { background: none; border: none; padding: 0; margin: 0; }
.categories-grid li a, .brand-links a {
  color: var(--seo-ink);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--seo-line);
}
.categories-grid li a:hover, .brand-links a:hover { border-bottom-color: var(--seo-accent); color: var(--seo-accent); }
.brands span, .product-tag {
  font-size: 0.85rem;
  color: var(--seo-ink-soft);
  background: none;
  border-radius: 0;
  padding: 4px 0;
  border-bottom: 1px dashed var(--seo-line);
}

/* ── Numbered steps (concierge "how it works") ───────────────────────────── */
.step-grid { display: grid; gap: 28px; margin: 24px 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--seo-accent-light);
  background: var(--seo-accent-bg);
  color: var(--seo-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.step h3 { margin-top: 0; }

/* ── Stat numbers — mono, no box, matches FunnelPage's Stat component ────── */
.stats-grid { display: flex; flex-wrap: wrap; gap: 32px; margin: 28px 0; }
.stat { background: none; border: none; padding: 0; text-align: left; }
.stat .number { display: block; font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--seo-ink); }
.stat .label { font-size: 0.85rem; color: var(--seo-ink-faint); margin-top: 4px; }

/* ── Tables — contained horizontal scroll, never a page-wide overflow ────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0 30px; border-radius: 12px; }
.table-scroll table { margin: 0; min-width: 480px; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th { background: var(--seo-ink); color: #fff; padding: 12px 16px; text-align: left; font-weight: 600; }
td { padding: 10px 16px; border-bottom: 1px solid var(--seo-line-soft); color: var(--seo-ink-soft); }
tr:nth-child(even) td { background: var(--seo-cream-alt); }
td.win, td.good, .win, .good { background: var(--seo-success-bg); color: var(--seo-success); font-weight: 600; }
td.lose, td.bad, .lose, .bad { background: var(--seo-error-bg); color: var(--seo-error); }
td.neutral, .neutral { color: var(--seo-ink-faint); }

/* ── FAQs ─────────────────────────────────────────────────────────────── */
.faq-item { margin: 20px 0; }
.faq-item h3, .faq-item h4 { margin-bottom: 6px; }
.faq-item p { color: var(--seo-ink-soft); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  background: var(--seo-ink);
  color: rgba(255, 255, 255, 0.55);
  padding: 40px 0 26px;
  margin-top: 56px;
  font-size: 13.5px;
}
footer a { color: var(--seo-accent-light); text-decoration: none; }
footer a:hover { color: #fff; }
footer strong { color: #fff; }
footer h4 { color: #fff; font-family: var(--font-sans); font-size: 0.95rem; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; color: inherit; font-size: inherit; }
/* p and li carry var(--seo-ink-soft) for page body copy, which is rgba(9,9,11,.68) on a
   light ground. Inside the footer the ground is --seo-ink, #09090b, the SAME near black,
   and a direct rule on the element beats the white inherited from `footer`. So every
   paragraph in the footer rendered black on black across all 459 static pages. The li case
   was already handled on the line above; p never was. */
footer p, footer li { color: inherit; }

/* Tap targets. WCAG 2.5.8 wants 24x24 for anything that is not inline in a sentence.
   Measured at 390px on electrical-products-india: 38 links under 24px, 16 to 20px tall,
   in the breadcrumb, in footer link lists and in the standalone paragraph links between
   sections. A link that IS inline in running prose is exempt and is left alone, which is
   why this targets list items, the breadcrumb and the footer rather than every anchor. */
.breadcrumb a,
.crumbs a,
nav a,
footer li a,
.footer-grid li a,
li a,
p > a:only-child,
/* tel: and mailto: are tap-to-act by definition, so they get the target size wherever they
   sit. A link that is genuinely inline inside a sentence is exempt under 2.5.8 and is
   deliberately not matched here. */
a[href^="tel:"],
a[href^="mailto:"] {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.footer-grid p { color: rgba(255, 255, 255, 0.55); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 18px; font-size: 12.5px; }

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero { padding: 36px 0; }
  .cta-section { padding: 32px 20px; }
  body > header nav { display: none; } /* the richer template hides secondary nav on phones */
  .vs-box, .compare-box, .step-grid, .stats-grid { gap: 20px; }
}
