/* ==========================================================================
   PropertyPundit UK — Site Stylesheet
   Brand: navy / blue-grey / gold, editorial serif headlines + clean sans body
   ========================================================================== */

:root {
  /* Brand colours (from logo) */
  --navy: #0B2545;
  --navy-dark: #061F3D;
  --blue-grey: #4F6F8E;
  --blue-grey-light: #7C97B0;
  --gold: #C8963E;
  --gold-dark: #A97B2E;

  /* Neutrals */
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-alt: #F1EEE7;
  --border: #E3E0D8;
  --text: #1C2430;
  --text-muted: #5B6472;
  --text-inverse: #F5F6F8;

  /* Status tags */
  --tag-up: #1E7A4C;
  --tag-up-bg: #E4F3EC;
  --tag-down: #A6472B;
  --tag-down-bg: #F7E9E4;
  --tag-neutral: #5B6472;
  --tag-neutral-bg: #EEECE6;

  /* Type */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(11,37,69,0.08);
  --shadow-md: 0 6px 24px rgba(11,37,69,0.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-grey); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 2em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.5em; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
th { font-family: var(--font-sans); color: var(--navy); font-weight: 700; background: var(--surface-alt); }
code { background: var(--surface-alt); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-primary:hover { background: var(--gold-dark); color: #fff; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: inherit; }
.btn-outline.dark { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline.dark:hover { background: var(--navy); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-type { background: var(--navy); color: #fff; }
.badge-persona { background: var(--surface-alt); color: var(--navy); border: 1px solid var(--border); }

.tag { display:inline-flex; align-items:center; gap:6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 700; }
.tag-up { background: var(--tag-up-bg); color: var(--tag-up); }
.tag-down { background: var(--tag-down-bg); color: var(--tag-down); }
.tag-neutral { background: var(--tag-neutral-bg); color: var(--tag-neutral); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,249,246,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; color: var(--navy); }
.brand img { height: 34px; width: auto; }
.brand:hover { text-decoration: none; }
.nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.nav-pill a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-pill a:hover, .nav-pill a.active { background: var(--navy); color: #fff; text-decoration: none; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 1.1rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-pill { display: none; position: absolute; top: 64px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; background: var(--surface); box-shadow: var(--shadow-md); }
  .nav-pill.open { display: flex; }
  .nav-pill a { text-align: center; }
  .nav-toggle { display: inline-block; }
}

/* ---------- Header overlay (homepage hero only) ----------
   Floats the header over the full-bleed hero photo so the image reaches the
   very top of the screen. Switches to the normal solid header once the user
   scrolls past the hero (see .scrolled, toggled by JS in index.html). */
.site-header.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  z-index: 200;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.header-overlay .brand { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.header-overlay .brand img { filter: brightness(0) invert(1); }
.header-overlay .nav-pill {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
  box-shadow: none;
}
.header-overlay .nav-pill a { color: #fff; }
.header-overlay .nav-pill a:hover, .header-overlay .nav-pill a.active { background: rgba(255,255,255,0.26); color: #fff; }
.header-overlay .nav-toggle { color: #fff; border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.12); }

.site-header.header-overlay.scrolled {
  position: fixed;
  background: rgba(250,249,246,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-overlay.scrolled .brand { color: var(--navy); text-shadow: none; }
.header-overlay.scrolled .brand img { filter: none; }
.header-overlay.scrolled .nav-pill { background: var(--surface); border-color: var(--border); backdrop-filter: none; box-shadow: var(--shadow-sm); }
.header-overlay.scrolled .nav-pill a { color: var(--navy); }
.header-overlay.scrolled .nav-pill a:hover, .header-overlay.scrolled .nav-pill a.active { background: var(--navy); color: #fff; }
.header-overlay.scrolled .nav-toggle { color: var(--navy); border-color: var(--border); background: none; }

@media (max-width: 860px) {
  /* The open mobile menu is always a solid panel, regardless of scroll state, for legibility. */
  .header-overlay .nav-pill.open { background: var(--surface); border-color: var(--border); backdrop-filter: none; box-shadow: var(--shadow-md); }
  .header-overlay .nav-pill.open a { color: var(--navy); }
  .header-overlay .nav-pill.open a:hover, .header-overlay .nav-pill.open a.active { background: var(--navy); color: #fff; }
}

/* ---------- Hero (homepage) ---------- */
.hero {
  background-image:
    linear-gradient(180deg, rgba(6,31,61,0.55) 0%, rgba(6,31,61,0.40) 45%, rgba(6,31,61,0.66) 100%),
    url('https://images.pexels.com/photos/12504321/pexels-photo-12504321.jpeg?auto=compress&cs=tinysrgb&w=1920');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-inverse);
  padding: 150px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-image 0.6s ease;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(120deg, rgba(200,150,62,0.05) 0 2px, transparent 2px 40px);
  pointer-events: none;
}
.hero-inner { max-width: 780px; margin: 0 auto; position: relative; }
.hero-credit {
  position: absolute;
  right: 16px;
  bottom: 10px;
  font-size: 0.7rem;
  color: rgba(245,246,248,0.7);
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.hero-credit a { color: rgba(245,246,248,0.85); text-decoration: underline; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  margin-bottom: 22px;
  color: var(--text-inverse);
}
.hero h1 { color: #fff; margin-bottom: 0.3em; text-shadow: 0 2px 12px rgba(0,0,0,0.55); }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lede { color: rgba(245,246,248,0.92); font-size: 1.1rem; max-width: 560px; margin: 0 auto 32px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Market stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: -44px auto 56px;
  max-width: 980px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.stat-cell { background: var(--surface); padding: 22px 18px; text-align: center; }
.stat-value { font-family: var(--font-serif); font-size: 1.5rem; color: var(--navy); font-weight: 700; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 4px; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); margin-top: -30px; } }

/* ---------- Sections ---------- */
.section { padding: 56px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .see-all { font-weight: 600; font-size: 0.92rem; }
.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Headlines list ---------- */
.headline-list { list-style: none; padding: 0; margin: 0; }
.headline-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.headline-item:last-child { border-bottom: none; }
.headline-text { font-weight: 600; color: var(--navy); }
.headline-source { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Article cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card .badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.article-card h3 { margin: 0; font-size: 1.1rem; }
.article-card h3 a { color: var(--navy); }
.article-card h3 a:hover { text-decoration: none; color: var(--blue-grey); }
.article-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.article-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: auto; padding-top: 8px; }

/* ---------- Article listing page ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-bar button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
}
.filter-bar button.active, .filter-bar button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Article page ---------- */
.article-hero { background: var(--surface-alt); padding: 48px 24px 32px; border-bottom: 1px solid var(--border); }
.breadcrumbs { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span { margin: 0 6px; }
.article-hero .badge-row { display: flex; gap: 8px; margin-bottom: 16px; }
.article-hero h1 { max-width: 820px; }
.article-byline { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; }
.article-byline strong { color: var(--navy); }

.article-body { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.article-body h2 { border-top: 1px solid var(--border); padding-top: 0.9em; }
.article-body h2:first-of-type { border-top: none; padding-top: 0; }
.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 22px;
  border-left: 4px solid var(--gold);
  background: var(--surface-alt);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--navy);
}
.callout {
  background: #FBF3E4;
  border: 1px solid #EAD9B4;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 1.8em 0;
}
.callout strong { color: var(--gold-dark); }
.article-infographic { width: 100%; max-width: 880px; display: block; margin: 24px auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.disclaimer-block {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 18px 22px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq-block { max-width: 760px; margin: 0 auto 48px; padding: 0 24px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--navy); font-family: var(--font-serif); font-size: 1.05rem; }
.faq-item p { margin-top: 10px; color: var(--text-muted); }

/* ---------- Monetisation zones (hidden until activated by owner) ---------- */
.monetisation-zone { display: none !important; }
.monetisation-zone[data-active="true"] { display: block !important; }

/* ---------- Tool pages ---------- */
.tool-page { padding: 48px 24px 72px; }
.tool-header { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.tool-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.field-group { margin-bottom: 20px; }
.field-group label { display: block; font-weight: 600; color: var(--navy); font-size: 0.92rem; margin-bottom: 6px; }
.field-group input[type="number"],
.field-group input[type="text"],
.field-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}
.field-group input:focus, .field-group select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { font-weight: 500; font-size: 0.92rem; display: flex; align-items: center; gap: 6px; color: var(--text); }

.result-box {
  margin-top: 26px;
  padding: 22px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
}
.result-box .result-value { font-family: var(--font-serif); font-size: 2.1rem; color: var(--gold); font-weight: 700; }
.result-box .result-label { font-size: 0.85rem; color: rgba(245,246,248,0.75); margin-top: 4px; }
.result-table { margin-top: 18px; background: rgba(255,255,255,0.06); border-radius: 8px; overflow: hidden; }
.result-table th, .result-table td { border-bottom: 1px solid rgba(255,255,255,0.12); color: #fff; }
.result-table th { background: rgba(255,255,255,0.08); color: #fff; }

.tool-note { max-width: 640px; margin: 20px auto 0; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ---------- Homeowner guides ---------- */
.timeline { border-left: 3px solid var(--border); margin-left: 8px; padding-left: 28px; }
.timeline-step { position: relative; margin-bottom: 34px; }
.timeline-step::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-step h3 { margin-bottom: 4px; }
.step-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cost-chip { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px 12px; font-size: 0.78rem; font-weight: 700; color: var(--navy); }
.season-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 30px 0; }
@media (max-width: 700px) { .season-grid { grid-template-columns: 1fr; } }
.season-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.season-card h3 { color: var(--gold-dark); }
.miss-callout { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-top: 40px; }
.miss-callout h3 { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(245,246,248,0.8); padding: 56px 24px 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: var(--max-width); margin: 0 auto; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); color: #fff; font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.footer-brand img { height: 30px; }
.footer-col h4 { color: #fff; font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(245,246,248,0.75); font-size: 0.92rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-disclaimer { max-width: var(--max-width); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; color: rgba(245,246,248,0.55); }
.footer-bottom { max-width: var(--max-width); margin: 20px auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: rgba(245,246,248,0.5); }

/* ---------- 404 ---------- */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; }
.error-page .code { font-family: var(--font-serif); font-size: 5rem; color: var(--gold); font-weight: 700; }

/* ---------- Data sources page ---------- */
.source-table-wrap { overflow-x: auto; }
.source-category { margin-top: 40px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; color: var(--text-muted); }
