/* Planning 4 Homes - home page, free check and sign-in. Same design language as css/report.css. */

:root {
  --ink: #0c2131; --ink-2: #16344a;
  --green: #0b5a27; --green-2: #127a39;
  --clay: #a0482c;
  --paper: #f6f4ef; --card: #fff; --line: #e5e1d8; --muted: #5b6670;
  --good: #0b5a27; --good-bg: #e7f2ea;
  --warn: #9a5a00; --warn-bg: #fdf3e2;
  --bad: #a3271b; --bad-bg: #fbeae7;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(12,33,49,.05), 0 10px 30px rgba(12,33,49,.07);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper); }
a { color: var(--green); text-underline-offset: .15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 6px; }
.hide { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); font-weight: 400; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar .wrap { display: flex; align-items: center; gap: 1.4rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { height: 26px; width: auto; }
.beta { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .15rem .45rem; border-radius: 6px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.topnav { display: flex; gap: 1.3rem; margin-left: 1rem; }
.topnav a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .93rem; }
.topnav a:hover { color: #fff; }
.spacer { flex: 1; }
.auth { display: flex; align-items: center; gap: .6rem; }
.auth .who { color: rgba(255,255,255,.65); font-size: .85rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; color: rgba(255,255,255,.85); font: 500 .93rem var(--sans); cursor: pointer; padding: .5rem .4rem; }
.link-btn:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font: 600 1rem/1 var(--sans); padding: .95rem 1.5rem; border-radius: 999px; border: 0;
  cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #16883f 0%, #0b5a27 60%, #0a4a21 100%); box-shadow: 0 10px 24px rgba(11,90,39,.28), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { color: #fff; }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.btn-light:hover { color: var(--ink); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-outline:hover { color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: .6rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1100px 420px at 90% -20%, rgba(18,122,57,.42), transparent 60%),
                    radial-gradient(700px 320px at -10% 120%, rgba(160,72,44,.25), transparent 60%), var(--ink);
  color: #fff; padding: 4.5rem 0 5rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--clay); }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 1.04; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: #9fdcb3; }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,.8); margin: 1.3rem 0 2rem; max-width: 34em; }
.hero .ctas { display: flex; gap: .8rem; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 2rem; font-size: .88rem; color: rgba(255,255,255,.72); }
.trust span { display: inline-flex; align-items: center; gap: .45rem; }
.trust svg { width: 16px; height: 16px; color: #7fd39c; }

/* sample report card in the hero */
.sample { position: relative; }
.sample .tag { position: absolute; top: -12px; right: 18px; z-index: 2; background: var(--clay); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; }
.sheet { background: #fff; color: var(--ink); border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.35); overflow: hidden; transform: rotate(1.2deg); }
.sheet-head { background: var(--ink-2); color: #fff; padding: 1.1rem 1.3rem 1.2rem; }
.sheet-head .k { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.sheet-head .addr { font-family: var(--serif); font-size: 1.45rem; margin-top: .2rem; }
.sheet-head .verdict { display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem; font-size: .82rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: .35rem .7rem; border-radius: 999px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #f2b705; }
.sheet-body { padding: 1rem 1.1rem 1.2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem; border-top: 3px solid var(--good); }
.mini.warn { border-top-color: #e0a100; } .mini.bad { border-top-color: var(--bad); }
.mini .k { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mini .v { font-family: var(--serif); font-size: 1.05rem; margin-top: .2rem; }
.epc-mini { display: flex; gap: 3px; margin-top: .35rem; }
.epc-mini span { height: 10px; flex: 1; border-radius: 2px; }

/* ---------- Sections ---------- */
section.block { padding: 5rem 0; }
.block-head { max-width: 40em; margin-bottom: 2.5rem; }
.block-head .eyebrow { color: var(--clay); }
.block-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; }
.block-head p { color: var(--muted); margin-top: .7rem; font-size: 1.05rem; }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: s; }
.step { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .97rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { background: var(--card); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--line); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--good-bg); color: var(--green); margin-bottom: .9rem; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { color: var(--muted); font-size: .95rem; }
.feature .new { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--clay); margin-left: .4rem; }

/* ---------- Checker ---------- */
.checker-wrap { background: linear-gradient(180deg, var(--paper), #efece4); }
.check-card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 2.2rem; max-width: 980px; margin: 0 auto; }
.check-card h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.check-card .sub { color: var(--muted); margin: .3rem 0 1.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr auto; gap: 1rem; align-items: end; }
.field label, .field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.input, .select { width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1.5px solid #cfc9bb; border-radius: 12px; padding: .8rem .9rem; height: 50px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(11,90,39,.12); }
.select { -webkit-appearance: none; appearance: none; padding-right: 2.4rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230c2131' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center; }
#postcode { text-transform: uppercase; }
#postcode::placeholder { text-transform: none; }
.form-row .btn { height: 50px; }
.field-error { color: var(--bad); font-weight: 600; font-size: .9rem; margin-top: .4rem; }
.hint { color: var(--muted); font-size: .88rem; margin-top: .35rem; }

/* results */
#results { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.res-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6rem; }
.property-map { height: 340px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #e9e6df; }
.prop-k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#propertyAddress { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.15; margin: .3rem 0 .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: #eef0f1; color: var(--muted); }
.chip.good { background: var(--good-bg); color: var(--good); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.os-attribution { font-size: .75rem; color: var(--muted); margin-top: .45rem; }
#pinHelp { color: var(--muted); font-size: .93rem; margin: .9rem 0 1.1rem; }

/* free preview */
.preview { margin-top: 1.8rem; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.preview-head { padding: 1.1rem 1.3rem; background: var(--ink); color: #fff; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.preview-head h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.preview-head .chip { background: rgba(255,255,255,.12); color: #fff; }
.preview ul { list-style: none; }
.preview li { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.3rem; border-top: 1px solid var(--line); background: #fff; }
.preview li .lbl { flex: 1; font-weight: 500; }
.preview li .st { font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.st.flag { color: var(--warn); } .st.clear { color: var(--good); } .st.found { color: var(--green); } .st.none, .st.locked { color: var(--muted); }
.st svg { width: 16px; height: 16px; }
.preview .loading { padding: 1.2rem 1.3rem; color: var(--muted); display: flex; gap: .7rem; align-items: center; background: #fff; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* paywall */
.paywall { margin-top: 1.4rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.6rem; background: linear-gradient(135deg, #fbfaf6, #f1efe8); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; }
.paywall h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.ticks { list-style: none; display: grid; gap: .5rem; margin-top: 1rem; }
.ticks li { position: relative; padding-left: 1.7rem; font-size: .97rem; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .3rem; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center; }
.price-box { background: #fff; border-radius: 14px; padding: 1.4rem; box-shadow: var(--shadow); align-self: start; }
.price { font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.price small { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.consent-check { display: flex; gap: .65rem; align-items: flex-start; font-size: .86rem; line-height: 1.45; color: var(--muted); margin: 1rem 0; cursor: pointer; }
.consent-check input { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .1rem; accent-color: var(--green); }
.consent-error { color: var(--bad); font-weight: 600; font-size: .88rem; margin: -.4rem 0 .8rem; }
.secure { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .7rem; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 900px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.plan.best { border: 2px solid var(--green); box-shadow: var(--shadow); position: relative; }
.plan.best::after { content: 'Most popular'; position: absolute; top: -12px; left: 1.6rem; background: var(--green); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .65rem; border-radius: 999px; }
.plan h3 { font-size: 1.05rem; }
.plan .price { margin: .6rem 0 .2rem; }
.plan .btn { margin-top: 1.4rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); margin-top: .6rem; }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(12,33,49,.55); backdrop-filter: blur(3px); align-items: center; justify-content: center; padding: 1rem; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 20px; width: 100%; max-width: 420px; padding: 2rem; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: .9rem; right: .9rem; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f1efe9; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.modal-close:hover { background: #e7e3da; }
.modal .mark { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; margin-bottom: 1rem; }
.modal .mark img { height: 24px; }
.modal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1.1; }
#authIntro { color: var(--muted); margin: .4rem 0 1.3rem; font-size: .95rem; }
.google-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem; background: #fff; color: #3c4043; border: 1.5px solid #dadce0; border-radius: 12px; font: 600 1rem var(--sans); cursor: pointer; }
.google-btn:hover { background: #f8f9fa; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1.1rem 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.modal .field { margin-bottom: .9rem; }
.auth-legal { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 1rem; }
.auth-switch { text-align: center; margin-top: .6rem; font-size: .92rem; }
.alert { border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; margin-bottom: .9rem; }
.alert-error { background: var(--bad-bg); color: var(--bad); }

/* ---------- Footer ---------- */
.site-footer { padding: 3rem 0; background: var(--ink); color: rgba(255,255,255,.7); font-size: .88rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.site-footer p + p { margin-top: .5rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }
.site-footer .brand { margin-bottom: .9rem; }

/* ---------- Dashboard container (cards are styled in index.html) ---------- */
.dashboard { display: none; min-height: 60vh; }
.dashboard.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .sample { max-width: 460px; }
  .topnav { display: none; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row .btn { grid-column: 1 / -1; }
  .res-grid, .paywall { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 3rem 0 3.5rem; }
  .auth .who { display: none; }
  .steps3, .features, .plans, .site-footer .cols { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .check-card { padding: 1.4rem; }
  section.block { padding: 3.5rem 0; }
  .property-map { height: 280px; }
  .beta { display: none; }
}
.auth button, .auth .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .topbar .wrap { gap: .6rem; }
  .brand { font-size: .95rem; }
  .auth { gap: .3rem; }
  .auth .btn-sm { padding: .5rem .8rem; font-size: .85rem; }
  .link-btn { font-size: .85rem; padding: .4rem .3rem; }
}
@media (max-width: 380px) { .brand span.txt { display: none; } }
