/* ============================================================
   Brick.sg — shared stylesheet
   UK property investment tools for overseas investors
   ============================================================ */

:root {
  /* HomeVestor-inspired palette: cream + forest green, Playfair/Montserrat */
  --navy: #123E2D;        /* deep forest green (brand / dark) */
  --navy-2: #1c5238;      /* lighter forest green */
  --gold: #2f7d4f;        /* medium green accent */
  --gold-dark: #256b41;   /* darker accent */
  --ink: #1f2d27;         /* near-black green-grey text */
  --muted: #6a7a70;       /* muted green-grey */
  --line: #ECE8E0;        /* warm border */
  --bg: #FBFAF7;          /* cream background */
  --card: #ffffff;
  --tint: #EEF3EF;        /* pale green tint */
  --green: #2f7d4f;       /* positive */
  --red: #b5423b;         /* negative */
  --radius: 14px;
  --shadow: 0 6px 22px rgba(18, 62, 45, 0.07);
  --shadow-lg: 0 14px 40px rgba(18, 62, 45, 0.13);
  --maxw: 1160px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; font-family: var(--serif); }
h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); letter-spacing: -0.005em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--navy); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  display: grid; place-items: center; color: var(--gold); font-weight: 900; font-size: 1.1rem;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.brand .tld { color: var(--gold); }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a, .nav-dd-btn {
  color: var(--ink); font-weight: 500; font-size: .93rem;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover { background: var(--bg); text-decoration: none; }
.nav-links a { text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.nav-links a.active { color: var(--navy); background: var(--tint); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px;
    max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 8px; }
  .nav-dd { width: 100%; }
  .nav-dd-btn { padding: 12px; width: 100%; text-align: left; }
  .nav-links a.nav-acct { margin-left: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; padding: 12px 20px;
  border-radius: 10px; font-weight: 600; border: 0; cursor: pointer;
  transition: transform .08s ease, background .2s ease; font-size: .96rem;
}
.btn:hover { background: var(--navy-2); text-decoration: none; transform: translateY(-1px); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: var(--gold-dark); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--navy); background: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1100px 420px at 82% -10%, rgba(47,125,79,.35), transparent 62%),
              linear-gradient(160deg, var(--navy) 0%, #0d3324 60%, #16472f 100%);
  color: #eaf1ec; padding: 78px 0 88px; position: relative; overflow: hidden;
}
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.18rem; color: #d5e3d8; max-width: 640px; }
.hero .eyebrow { color: #8fd0a6; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .76rem; margin-bottom: 14px; font-family: var(--font); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 1.9rem; color: #fff; font-family: var(--serif); font-weight: 600; }
.hero-stats .stat span { color: #9db8a8; font-size: .82rem; }

/* ---------- Sections ---------- */
section.block { padding: 60px 0; }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head .eyebrow { color: var(--gold-dark); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .76rem; }

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

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease;
}
.card.link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ico { font-size: 1.7rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card .arrow { color: var(--gold-dark); font-weight: 700; margin-top: 14px; display: inline-block; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--tint); color: var(--navy); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
tbody tr:hover { background: #f8f6f1; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge.complete { background: #e6f6ee; color: #12784a; }
.badge.construction { background: #fdf1de; color: #a8681a; }
.badge.upcoming { background: #e9effb; color: #294f9c; }
.badge.pipeline { background: #f0e9fb; color: #6b3fb0; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

/* ---------- Calculators ---------- */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .calc-layout { grid-template-columns: 1fr; } }
.calc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: .9rem; }
.field .hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
.input, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: var(--font); color: var(--ink); background: #fff;
}
.input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,75,.18); }
.input-money { position: relative; }
.input-money::before { content: "£"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.input-money .input { padding-left: 26px; }

.toggle-row { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle {
  flex: 1; min-width: 120px; text-align: center; padding: 11px; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); background: #fff;
  transition: all .12s ease;
}
.toggle.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checkbox input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--navy); }

.result-hero { background: linear-gradient(160deg, var(--navy), #0d3324); color: #fff; border-radius: var(--radius); padding: 26px; margin-bottom: 18px; }
.result-hero .label { color: #9db8a8; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.result-hero .big { font-size: 2.7rem; font-weight: 600; color: #fff; line-height: 1.1; margin: 6px 0; font-family: var(--serif); }
.result-hero .sub { color: #d5e3d8; font-size: .9rem; }
.breakdown { list-style: none; padding: 0; margin: 0; }
.breakdown li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.breakdown li:last-child { border-bottom: 0; }
.breakdown li b { font-variant-numeric: tabular-nums; }
.breakdown li.total { font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); margin-top: 6px; }

.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.kpi { flex: 1; min-width: 140px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .k-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi .k-val { font-size: 1.7rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; font-family: var(--serif); }

/* ---------- Chart ---------- */
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.chart-wrap { position: relative; height: 360px; }
.chart-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chart-tab { padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); }
.chart-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Notices ---------- */
.notice { background: #fff8e8; border: 1px solid #f0e2b8; border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 18px; font-size: .88rem; color: #6b5a2a; }
.notice.info { background: var(--tint); border-color: #d7e6dc; border-left-color: var(--gold); color: #2c5a41; }
.source-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.source-note a { color: var(--navy-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aec4b7; padding: 50px 0 30px; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; font-family: var(--serif); font-weight: 600; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer a { color: #aec4b7; display: block; padding: 4px 0; font-size: .9rem; }
.site-footer a:hover { color: #8fd0a6; text-decoration: none; }
.footer-brand { font-size: 1.4rem; font-weight: 700; color: #fff; font-family: var(--serif); }
.footer-brand .tld { color: #8fd0a6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 20px; font-size: .8rem; color: #86a291; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .85rem; color: var(--navy); font-weight: 600; }

.page-head { background: radial-gradient(900px 300px at 85% -20%, rgba(47,125,79,.30), transparent 60%), linear-gradient(160deg, var(--navy), #0d3324); color: #fff; padding: 52px 0 44px; }
.page-head h1 { color: #fff; }
.page-head p { color: #d5e3d8; max-width: 700px; margin-bottom: 0; }
.breadcrumb { color: #9db8a8; font-size: .85rem; margin-bottom: 12px; }
.breadcrumb a { color: #d5e3d8; }

/* --- Portal nav dropdown (added for IA restructure) --- */
.nav-dd{position:relative;display:inline-block}
.nav-dd-btn{background:none;border:0;font:inherit;color:inherit;cursor:pointer}
.nav-dd-btn.active,.nav-links a.active{font-weight:700}
.nav-dd-menu{display:none;position:absolute;top:100%;left:0;background:#fff;border:1px solid #e6e3da;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.08);padding:6px;min-width:190px;z-index:50}
.nav-dd.open .nav-dd-menu{display:block}
.nav-dd-menu a{display:block;padding:8px 12px;border-radius:7px;white-space:nowrap}
.nav-dd-menu a:hover{background:#f6f4ee}
@media(max-width:1040px){ .nav-dd-menu{position:static;display:block;box-shadow:none;border:0;padding:0 0 0 12px} }

/* Account links pushed to the right of the nav */
.nav-links a.nav-acct{margin-left:auto}
.nav-links a.nav-acct,.nav-links a.nav-acct + a{color:var(--navy,#123E2D);font-weight:600}
@media(max-width:1040px){ .nav-links a.nav-acct{margin-left:0} }
