/* ==========================================================================
   Home of Dreams — design system
   Palette, type scale and components shared across all pages.
   ========================================================================== */

:root {
  /* Colour — warm, editorial, high contrast for WCAG AA */
  --ink:        #14110E;
  --ink-soft:   #453D34;
  --muted:      #6B6157;
  --paper:      #FBF9F6;
  --paper-2:    #F3EEE7;
  --line:       #E2D9CE;
  --brass:      #8A5A22;   /* 4.9:1 on --paper */
  --brass-lift: #B8834A;
  --forest:     #1E3A32;
  --forest-2:   #2C5147;
  --white:      #FFFFFF;

  /* EPC band colours (official SAP banding) */
  --epc-a: #007F3D; --epc-b: #2C9F29; --epc-c: #8DCE46;
  --epc-d: #FFD500; --epc-e: #FCAA65; --epc-f: #EF8023; --epc-g: #E9153B;

  /* Type */
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --stack: clamp(3rem, 7vw, 6rem);
  --radius: 2px;
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brass); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.35rem, 6vw, 4.15rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p  { margin: 0 0 1.1em; max-width: 68ch; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--paper); padding: .85rem 1.25rem;
}
.skip:focus { left: .5rem; top: .5rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }

.eyebrow {
  font-family: var(--body); font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
  margin: 0 0 1rem;
}
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-soft); max-width: 62ch; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251,249,246,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-family: var(--display); font-size: 1.18rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand__name small { display: block; font-family: var(--body); font-size: .62rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    background: none; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .55rem .8rem; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink);
  }
  .nav {
    position: absolute; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.25rem;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-size: .93rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.btn--primary { background: var(--forest); color: var(--white); }
.btn--primary:hover { background: var(--ink); color: var(--white); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: rgba(255,255,255,.6); color: var(--white); background: rgba(0,0,0,.18); }
.btn--light:hover { background: var(--white); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--forest); color: var(--white); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,14,.55) 0%, rgba(20,17,14,.25) 45%, rgba(20,17,14,.8) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: clamp(5rem, 16vw, 10rem); }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lede { color: rgba(255,255,255,.88); }
.hero .eyebrow { color: var(--brass-lift); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

/* Property page hero variant */
.phero { position: relative; }
.phero__img { aspect-ratio: 16/8; width: 100%; object-fit: cover; background: var(--paper-2); }
@media (max-width: 700px) { .phero__img { aspect-ratio: 4/3; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--stack); }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink p { color: rgba(251,249,246,.82); }
.section--ink a { color: var(--brass-lift); }
.section__head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Property cards ---------- */
.cards { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px -22px rgba(20,17,14,.5); }
.card__media { position: relative; aspect-ratio: 4/3; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__flag {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--ink); color: var(--white); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: .4rem .7rem;
}
.card__body { padding: 1.6rem 1.6rem 1.9rem; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: .25rem; }
.card__loc { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }
.card__facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.15rem; padding: 0; list-style: none; }
.card__facts li {
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .3rem .6rem; color: var(--ink-soft);
}
.card__cta { margin-top: auto; }

/* ---------- Key facts grid ---------- */
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.facts > div { background: var(--paper); padding: 1.25rem 1.35rem; }
.facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.facts dd { margin: 0; font-family: var(--display); font-size: 1.32rem; line-height: 1.25; }
.facts dd small { display: block; font-family: var(--body); font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: .2rem; line-height: 1.4; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery figure { margin: 0; }
.gallery button {
  display: block; padding: 0; border: 0; background: var(--paper-2); cursor: zoom-in; width: 100%;
  aspect-ratio: 4/3; overflow: hidden;
}
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery button:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: .82rem; color: var(--muted); padding-top: .45rem; }

dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1180px, 94vw); max-height: 94vh;
}
dialog.lightbox::backdrop { background: rgba(20,17,14,.92); }
.lightbox__img { width: 100%; max-height: 82vh; object-fit: contain; background: #000; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  color: var(--white); padding: .75rem .25rem; font-size: .88rem; }
.lightbox__bar button { background: none; border: 1px solid rgba(255,255,255,.5); color: var(--white);
  font: inherit; padding: .4rem .9rem; cursor: pointer; border-radius: var(--radius); }
.lightbox__bar button:hover { background: var(--white); color: var(--ink); }

/* ---------- EPC ---------- */
.epc { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .epc { grid-template-columns: 1fr; } }
.epc-chart { display: flex; flex-direction: column; gap: 4px; }
.epc-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: .6rem; }
.epc-row__band { font-weight: 700; font-size: .82rem; color: var(--muted); text-align: center; }
.epc-bar {
  position: relative; height: 30px; display: flex; align-items: center;
  color: #14110E; font-weight: 700; font-size: .82rem; padding-left: .6rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.epc-bar[data-band="A"] { background: var(--epc-a); color: #fff; }
.epc-bar[data-band="B"] { background: var(--epc-b); color: #fff; }
.epc-bar[data-band="C"] { background: var(--epc-c); }
.epc-bar[data-band="D"] { background: var(--epc-d); }
.epc-bar[data-band="E"] { background: var(--epc-e); }
.epc-bar[data-band="F"] { background: var(--epc-f); }
.epc-bar[data-band="G"] { background: var(--epc-g); color: #fff; }
.epc-pill {
  margin-left: auto; margin-right: .5rem; background: rgba(255,255,255,.92); color: var(--ink);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 999px;
}
.epc-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line);
  padding: .35rem .7rem; background: var(--white);
}
.epc-badge i { width: 20px; height: 20px; display: grid; place-items: center; font-style: normal;
  font-size: .78rem; color: #14110E; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl caption { text-align: left; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding-bottom: .75rem; }
.tbl th, .tbl td { text-align: left; padding: .78rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink-soft); width: 42%; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl--zebra tbody tr:nth-child(odd) { background: var(--white); }

.rating { font-weight: 700; }
.rating--good { color: #16652F; }
.rating--ok   { color: #7A5A00; }
.rating--poor { color: #A11226; }

/* ---------- Local area ---------- */
.poi { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.poi > div { background: var(--paper); padding: 1.15rem 1.3rem; }
.poi .lbl { font-family: var(--body); font-size: .74rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 .6rem; }
.poi ul { margin: 0; padding: 0; list-style: none; }
.poi li { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; font-size: .92rem;
  border-bottom: 1px dotted var(--line); }
.poi li:last-child { border-bottom: 0; }
.poi li span { color: var(--muted); white-space: nowrap; }

/* ---------- Callouts ---------- */
.note {
  border-left: 3px solid var(--brass); background: var(--white);
  padding: 1.15rem 1.35rem; margin: 1.5rem 0; font-size: .95rem;
}
.note .lbl { font-family: var(--body); font-size: .74rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 .5rem; }
.note p:last-child { margin-bottom: 0; }
.note--warn { border-left-color: #A11226; }
.note--warn .lbl { color: #A11226; }

.todo {
  background: #FFF8E6; border: 1px dashed #C79A2E; color: #5A4300;
  padding: .18rem .5rem; font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  display: inline-block; border-radius: var(--radius);
}

/* ---------- Media / tour ---------- */
.tour { position: relative; padding-top: 56.25%; background: var(--ink); border: 1px solid var(--line); }
.tour iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Enquiry form ---------- */
.form { display: grid; gap: 1.1rem; max-width: 620px; }
.form label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .4rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.form .check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; }
.form .check input { width: auto; margin-top: .25rem; }
.form .check label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .9rem;
  color: var(--ink-soft); margin: 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: rgba(251,249,246,.75); padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem; font-size: .9rem; }
.site-foot h2, .site-foot h3 { color: var(--white); font-family: var(--body); font-size: .74rem;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.site-foot a { color: rgba(251,249,246,.9); }
.site-foot a:hover { color: var(--brass-lift); }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { padding: .22rem 0; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 3rem; padding-top: 1.75rem;
  font-size: .8rem; color: rgba(251,249,246,.6); }
.foot-legal p { max-width: none; }

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 1rem; }
.grid-2 { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.breadcrumb { font-size: .85rem; color: var(--muted); padding-block: 1.1rem; }
.breadcrumb a { color: var(--muted); }
.src { font-size: .8rem; color: var(--muted); }
.src a { color: var(--muted); }
