/* ==========================================================================
   Keyline — independent estate agent
   Theme tokens first. The online editor edits this block.
   ========================================================================== */

:root {
  --accent: #0f5c55;          /* deep teal: buttons, links, highlights */
  --accent-dark: #0b4842;
  --accent-text: #0f5c55;
  --accent-soft: #e3efec;
  --gold: #b8975a;            /* fine rules and small details */

  --ink: #161d1b;
  --ink-2: #48514e;
  --ink-3: #737b78;

  --surface: #fafaf7;
  --surface-2: #f1f0ea;
  --card: #ffffff;
  --border: #e3e1d8;
  --dark: #13201d;

  --radius: 6px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Figtree", -apple-system, system-ui, sans-serif;

  --container: 1240px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 5.8vw, 4.8rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 8vw, 112px); }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--dark); color: #c8d0cd; }
.section--dark h2, .section--dark h3 { color: #fff; }
.overline { display: inline-flex; align-items: center; gap: 12px; font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); }
.overline::after { content: ""; width: 34px; height: 1px; background: var(--gold); }
.section--dark .overline { color: var(--gold); }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.section--dark .lede { color: #a9b5b1; }
.muted { color: var(--ink-3); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 600; font-size: .95rem; letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--line { border-color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent-soft); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.link { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ----------------------------------------------------------------- header */
.header { position: sticky; top: 0; z-index: 40; background: rgba(250, 250, 247, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; gap: 32px; min-height: 78px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark { width: 34px; height: 34px; border: 1.5px solid var(--accent); border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.logo__text { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .01em; }
.logo__text small { display: block; font-family: var(--font-body); font-size: .62rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); margin-top: -2px; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { font-size: .94rem; font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--gold); }
.nav .btn { color: #fff; border: 0; padding: 0 20px; }
.saved-link .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .72rem; font-weight: 800; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); cursor: pointer; }
@media (max-width: 940px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; inset: 100% 0 auto; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav .btn { margin-top: 14px; }
}

/* ------------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: #fff; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 18, .15) 0%, rgba(10, 20, 18, .35) 45%, rgba(10, 20, 18, .82) 100%); z-index: 1; }
.hero .container { position: relative; z-index: 2; padding-block: 56px; }
.hero .overline { color: #f1dcae; }
.hero h1 { margin-top: 18px; max-width: 12em; color: #fff; }
.hero .lede { margin-top: 18px; color: rgba(255, 255, 255, .86); }
.search { display: grid; grid-template-columns: auto 1.3fr 1fr 1fr 1fr auto; gap: 0; margin-top: 36px; background: #fff; border-radius: var(--radius); color: var(--ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); overflow: hidden; }
.search > * { border-right: 1px solid var(--border); }
.search label { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 18px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.search select { border: 0; padding: 0; background: transparent; font-size: 1rem; font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; cursor: pointer; }
.search select:focus { outline: none; }
.search .btn { border-radius: 0; min-height: 76px; padding: 0 30px; border: 0; }
.mode { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 14px; }
.mode button { padding: 6px 14px; border-radius: 999px; border: 0; background: transparent; font-size: .86rem; font-weight: 700; cursor: pointer; color: var(--ink-3); }
.mode button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
@media (max-width: 640px) { .hero::before { background: linear-gradient(180deg, rgba(10, 20, 18, .5), rgba(10, 20, 18, .85)); } }
@media (max-width: 980px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search > * { border-bottom: 1px solid var(--border); }
  .mode { flex-direction: row; grid-column: 1 / -1; }
  .search .btn { grid-column: 1 / -1; min-height: 56px; }
}

/* ------------------------------------------------------------------ cards */
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.head h2 { margin-top: 14px; }
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.listing { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.listing:hover { box-shadow: 0 24px 50px -30px rgba(19, 32, 29, .45); transform: translateY(-3px); }
.listing[hidden] { display: none; }
.listing__media { position: relative; }
.listing__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.listing__status { position: absolute; left: 14px; top: 14px; padding: 5px 10px; border-radius: 3px; background: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.listing__status--new { background: var(--gold); color: #fff; }
.listing__status--offer { background: var(--dark); color: #fff; }
.heart { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); z-index: 2; }
.heart svg { width: 18px; height: 18px; }
.heart[aria-pressed="true"] { color: #c2412e; }
.heart[aria-pressed="true"] svg path { fill: currentColor; }
.listing__body { padding: 22px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.listing__price { font-family: var(--font-display); font-size: 1.6rem; }
.listing__price small { font-family: var(--font-body); font-size: .85rem; color: var(--ink-3); }
.listing h3 { margin-top: 6px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; }
.listing h3 a { text-decoration: none; }
.listing h3 a::after { content: ""; position: absolute; inset: 0; }
.listing__place { color: var(--ink-3); font-size: .92rem; }
.facts { display: flex; gap: 18px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--ink-2); }
.listing .facts { margin-top: 18px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 17px; height: 17px; color: var(--accent); }
@media (max-width: 1000px) { .listings { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .listings { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); }
.service { padding: 36px 32px 8px 0; }
.service + .service { padding-left: 32px; border-left: 1px solid var(--border); }
.service__n { font-family: var(--font-display); font-size: 1rem; color: var(--gold); }
.service h3 { margin: 18px 0 10px; }
.service p { color: var(--ink-2); }
.service .link { display: inline-block; margin-top: 16px; }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } .service + .service { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); } }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.numbers strong { display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 4.4vw, 3.4rem); font-weight: 500; color: #fff; line-height: 1; }
.numbers span { color: #a9b5b1; font-size: .95rem; }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.split__body > * + * { margin-top: 20px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split img { aspect-ratio: 4 / 3; } }

.quote { max-width: 820px; margin-inline: auto; text-align: center; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.3; font-style: italic; }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-weight: 700; }
.quote cite span { display: block; font-weight: 400; color: var(--ink-3); font-size: .92rem; }
.stars { color: var(--gold); letter-spacing: 3px; }

/* --------------------------------------------------------------- search page */
.results { display: grid; grid-template-columns: 290px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: 100px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.filters h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 800; }
.filter-group { padding: 18px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group > .label { display: block; margin-bottom: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--radius); background: var(--surface-2); }
.seg button { min-height: 40px; border: 0; border-radius: 4px; background: transparent; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { min-width: 44px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-weight: 700; cursor: pointer; }
.pills button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.checks { display: grid; gap: 10px; }
.checks label { display: flex; gap: 10px; align-items: center; font-size: .95rem; cursor: pointer; }
.checks input, input[type="range"] { accent-color: var(--accent); }
input[type="range"] { width: 100%; }
.range-out { display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.bar strong { font-size: 1.05rem; }
.bar select { min-height: 44px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.results .listings { grid-template-columns: repeat(2, 1fr); }
.no-results { padding: 48px; text-align: center; background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--ink-2); }
@media (max-width: 980px) { .results { grid-template-columns: 1fr; } .filters { position: static; } }
@media (max-width: 640px) { .results .listings { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- property */
.crumbs { display: flex; gap: 10px; padding-block: 22px; font-size: .88rem; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 240px 240px; gap: 10px; }
.gallery button { position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.gallery button:first-child { grid-row: 1 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 4px; background: rgba(255, 255, 255, .94); font-size: .86rem; font-weight: 700; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 140px 140px; } .gallery button:first-child { grid-column: 1 / -1; grid-row: auto; } }
.prop { display: grid; grid-template-columns: 1fr 370px; gap: 48px; align-items: start; padding-block: 40px 96px; }
.prop__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.prop__head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.prop__price { font-family: var(--font-display); font-size: 2.2rem; text-align: right; }
.prop__price small { display: block; font-family: var(--font-body); font-size: .85rem; color: var(--ink-3); }
.keyfacts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-block: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.keyfacts div { padding: 16px 18px; }
.keyfacts div + div { border-left: 1px solid var(--border); }
.keyfacts dt { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.keyfacts dd { margin: 4px 0 0; font-weight: 700; font-size: 1.05rem; }
@media (max-width: 760px) { .keyfacts { grid-template-columns: 1fr 1fr; } .keyfacts div + div { border-left: 0; } .keyfacts div { border-top: 1px solid var(--border); } }
.prose h2 { font-size: 1.7rem; margin: 40px 0 14px; }
.prose p + p { margin-top: 14px; }
.prose p { color: var(--ink-2); }
.features { columns: 2; gap: 32px; padding: 0; list-style: none; }
.features li { break-inside: avoid; padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--border); }
.features li::before { content: ""; position: absolute; left: 0; top: 18px; width: 12px; height: 1.5px; background: var(--gold); }
.floorplan { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.floorplan svg { width: 100%; height: auto; }
.agent-card { position: sticky; top: 100px; display: grid; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.agent { display: flex; gap: 14px; align-items: center; }
.agent__photo { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; }
.agent b { display: block; }
.calc .row { margin-top: 14px; }
.calc output { display: block; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.calc output strong { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 500; color: var(--accent-text); }
@media (max-width: 1000px) { .prop { grid-template-columns: 1fr; } .agent-card { position: static; } }
@media (max-width: 560px) { .features { columns: 1; } }

.lightbox { width: min(1100px, 96vw); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: #0c1312; color: #fff; }
.lightbox::backdrop { background: rgba(6, 12, 11, .86); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: .9rem; }
.lightbox__bar button { min-width: 44px; height: 40px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; cursor: pointer; }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .row + .field, .field + .row, .row + .row { margin-top: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row .field + .field { margin-top: 0; }
label, .label { font-size: .86rem; font-weight: 700; }
.input { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--radius); border: 1px solid #d5d2c6; background: #fff; font-size: 1rem; }
textarea.input { min-height: 100px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: #b23b28; }
.error { min-height: 1em; font-size: .82rem; color: #b23b28; }
.done { text-align: center; padding: 28px 8px; }
.done h3 { font-size: 1.6rem; }
.done p { margin-top: 10px; color: var(--ink-2); }
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.steps span.is-on { background: var(--accent); }
.form-step[hidden] { display: none; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.fees { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fees th, .fees td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.fees th { width: 34%; font-weight: 700; }
.fees td strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.fees td p { color: var(--ink-2); font-size: .94rem; margin-top: 4px; }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { padding-bottom: 20px; color: var(--ink-2); }

.page-head { padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--border); margin-bottom: clamp(32px, 4vw, 48px); }
.page-head h1 { margin-top: 16px; font-size: clamp(2.4rem, 5vw, 3.8rem); }
.page-head .lede { margin-top: 16px; }

/* ----------------------------------------------------------------- footer */
.footer { background: var(--dark); color: #a9b5b1; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-block: 64px 40px; }
.footer .logo__text { color: #fff; }
.footer .logo__mark { border-color: var(--gold); color: var(--gold); }
.footer h4 { margin: 0 0 14px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer p { margin-top: 14px; max-width: 26em; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid #263431; font-size: .84rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

.credits { list-style: none; margin: 0; padding: 0; }
.credits li { padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.credits a { color: var(--accent-text); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
