/* Roja Estates. Property-site layout in Roja's own gold branding, one classical roman throughout.
   Colours are variables so the white version (light.css) can override them. */

@font-face {
  font-family: "Roja Pagella";
  src: local("Palatino Linotype"), local("Palatino-Roman"), local("Palatino"), local("TeX Gyre Pagella"),
       url("/assets/fonts/pagella-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roja Pagella";
  src: local("Palatino Linotype Italic"), local("Palatino-Italic"), local("Palatino Italic"), local("TeX Gyre Pagella Italic"),
       url("/assets/fonts/pagella-italic.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --bg: #000000;
  --panel: rgba(219, 181, 103, 0.06);
  --gold: #dbb567;
  --gold-bright: #f6d88c;
  --gold-deep: #c69a50;
  --text: #ece6da;
  --muted: #a59d90;
  --rule: rgba(219, 181, 103, 0.36);
  --rule-soft: rgba(219, 181, 103, 0.16);
  --link-hover: #fff3cf;
  --hover-tint: rgba(219, 181, 103, 0.12);
  --line-top: #f6d88c;
  --line-bottom: #b98d45;
  --gutter: clamp(16px, 4.5vw, 44px);
  --max: 1200px;
  --s14: 0.875rem; --s16: 1rem; --s18: 1.125rem; --s21: 1.3125rem; --s24: 1.5rem; --s36: 2.25rem; --s48: 3rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Roja Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: var(--s18); line-height: 1.65; font-kerning: normal; font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: 0.005em; }
p, ul, ol, dl, figure, fieldset { margin: 0; }
a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--rule); }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }
.quiet { color: var(--muted); font-size: var(--s14); }

/* Buttons: gilt for the main action, outline for the second */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0.5em 1.25em; border: 1px solid var(--gold); border-radius: 2px;
  font: inherit; font-size: 1.0625rem; line-height: 1.2; color: var(--gold-bright); background: transparent;
  text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s; text-align: center;
}
.button:hover { background: var(--hover-tint); color: var(--link-hover); }
.button--gold { color: #000; border-color: #e7c677; background: linear-gradient(180deg, #f3d488 0%, #d6ad5c 55%, #c69a50 100%); }
.button--gold:hover { color: #000; background: linear-gradient(180deg, #f8e0a0 0%, #dfb866 60%, #cfa458 100%); }

/* Form controls */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: var(--s14); color: var(--muted); }
.field select, .field input {
  font: inherit; font-size: var(--s16); color: var(--text); background-color: var(--bg);
  border: 1px solid var(--rule); border-radius: 2px; min-height: 46px; padding: 0 12px; width: 100%;
}
.field select {
  padding-right: 34px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23dbb567' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field select:hover, .field input:hover { border-color: var(--gold); }

/* Masthead */
.masthead { border-bottom: 1px solid var(--rule-soft); }
.masthead__inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 20px; min-height: 66px; }
.masthead__brand { display: block; margin-right: auto; }
/* The header logo: the small animation on every page but home, the still logo where motion is turned off */
.masthead__brand img, .masthead__film { width: auto; height: 40px; aspect-ratio: 158 / 66; }
.masthead__film { object-fit: contain; pointer-events: none; }
.masthead__film + .masthead__still { display: none; }
.is-home .masthead__brand { visibility: hidden; }
.masthead__nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.masthead__nav a { color: var(--text); text-decoration: none; font-size: var(--s16); white-space: nowrap; }
.masthead__nav a:hover { color: var(--gold-bright); text-decoration: underline; text-decoration-color: var(--rule); }
@media (min-width: 760px) { .masthead__brand img, .masthead__film { height: 48px; } .masthead__nav a { font-size: var(--s18); } }

/* Hero: Roja's logo animation, then the search */
.hero { padding: 0 var(--gutter) clamp(44px, 6vw, 64px); text-align: center; }
.hero__stage { position: relative; max-width: 600px; margin: 0 auto; aspect-ratio: 5 / 2; }
.hero__film, .hero__still {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%);
}
.hero__still { display: none; }
/* Pause button for the logo animation, tucked into the corner of the logo's space */
.film-toggle {
  position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%;
  background: var(--bg); color: var(--gold); cursor: pointer;
}
.film-toggle:hover { border-color: var(--gold); }
.film-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.film-toggle__play, .film-toggle[data-paused="true"] .film-toggle__pause { display: none; }
.film-toggle[data-paused="true"] .film-toggle__play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .hero__film, .masthead__film, .film-toggle, .colophon__motion { display: none; }
  .hero__still { display: block; }
  .masthead__film + .masthead__still { display: inline; }
  .button { transition: none; }
}
.hero__title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, var(--s48)); max-width: 24ch; margin: 4px auto 0; text-wrap: balance; }
.hero__lede { color: var(--muted); margin-top: 12px; font-size: var(--s21); }

.search { max-width: 1000px; margin: 32px auto 0; text-align: left; border: 1px solid var(--rule); padding: 0 clamp(16px, 3vw, 28px) clamp(18px, 3vw, 28px); background: var(--panel); }
.search__tabs { border: 0; padding: 0; display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--rule-soft); }
.search__tab { position: relative; cursor: pointer; }
.search__tab input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.search__tab span { display: block; padding: 14px 20px 12px; font-size: var(--s21); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.search__tab input:checked + span { color: var(--text); border-bottom-color: var(--gold); }
.search__tab input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: -2px; }
.search__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: end; }
.search__go { grid-column: 1 / -1; }
@media (min-width: 860px) { .search__fields { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; } .search__go { grid-column: auto; padding-inline: 2em; } }

/* Section rhythm */
.latest, .viewings, .about, .contact { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 6vw, 76px) var(--gutter); }
.viewings, .about, .contact { border-top: 1px solid var(--rule-soft); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, var(--s36)); color: var(--gold); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.latest__soon { margin-top: 16px; font-size: var(--s21); max-width: 52ch; }

/* Cards on the home page */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 28px; margin-top: 28px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: grid; gap: 4px; align-content: start; }
.card__media { display: block; text-decoration: none; margin-bottom: 14px; }
.card__price { color: var(--gold); font-size: var(--s24); line-height: 1.25; }
.card__title { font-size: var(--s21); }
.card__title a, .result__title a { color: var(--text); text-decoration: none; }
.card__title a:hover, .result__title a:hover { color: var(--gold-bright); text-decoration: underline; text-decoration-color: var(--rule); }
.card__address, .result__address { color: var(--muted); font-size: var(--s16); }
.price-q { display: block; font-size: var(--s16); color: var(--muted); line-height: 1.4; }

/* Key details with icons */
.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--text); }
.stat { display: inline-flex; align-items: center; gap: 7px; font-size: var(--s16); }
.icon { width: 20px; height: 20px; color: var(--gold); flex: none; }
.stats--wide { margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .stats--wide { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }
.stats--wide .stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.stats--wide .icon { grid-row: span 2; width: 26px; height: 26px; }
.stat__label { font-size: var(--s14); color: var(--muted); line-height: 1.3; }
.stat__value { line-height: 1.3; }

/* The gilt frame around each drawing, echoing the rules either side of "Estates" in the logo */
.plate { position: relative; margin: 0; aspect-ratio: 4 / 3; padding: 7px; border: 1px solid var(--rule); background: var(--bg); }
.plate::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--rule-soft); pointer-events: none; }
.plate .elevation { width: 100%; height: calc(100% - 26px); }
.plate--large { aspect-ratio: 16 / 10; }
.elevation * { vector-effect: non-scaling-stroke; }
.elevation stop:first-child { stop-color: var(--line-top); }
.elevation stop:last-child { stop-color: var(--line-bottom); }
.elevation .faint { opacity: 0.55; }
.elevation .ghost { opacity: 0.4; stroke-dasharray: 3 6; }
.plate__note { position: absolute; left: 18px; right: 18px; bottom: 12px; font-style: italic; font-size: var(--s14); color: var(--muted); line-height: 1.3; }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { display: inline-block; padding: 1px 10px; border: 1px solid var(--gold-deep); border-radius: 2px; font-size: var(--s14); color: var(--gold-bright); }

/* Results pages */
.results-page, .property { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) clamp(48px, 7vw, 80px); }
.crumbs { font-size: var(--s14); color: var(--muted); margin-bottom: 14px; }
.results-page h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, var(--s36)); }
.results-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-top: 10px; }
#results-count { font-size: var(--s18); }
.refine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin: 20px 0 8px; padding: 18px 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
@media (min-width: 720px) { .refine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .refine { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.results { display: grid; }
.result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--rule-soft); }
@media (min-width: 760px) { .result { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; } }
.result__media { display: block; text-decoration: none; }
.result__body { display: grid; gap: 4px; align-content: start; }
.result__price { color: var(--gold); font-size: var(--s24); line-height: 1.25; }
.result__title { font-size: var(--s24); margin-top: 2px; }
.result__summary { color: var(--muted); font-size: var(--s16); margin-top: 10px; max-width: 60ch; }
.result__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.results-empty { padding: 32px 0; display: grid; gap: 16px; justify-items: start; color: var(--muted); }

.coming-soon { margin-top: 28px; padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px); border: 1px solid var(--rule); background: var(--panel); text-align: center; display: grid; gap: 14px; justify-items: center; }
.coming-soon h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, var(--s36)); }
.coming-soon p { max-width: 46ch; }

/* Property page */
.property__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.property__head { margin-top: 22px; display: grid; gap: 4px; }
.listing__price { color: var(--gold); font-size: clamp(1.6rem, 1.25rem + 1.4vw, var(--s36)); line-height: 1.2; }
.listing__price .price-q { font-size: var(--s18); margin-bottom: 2px; }
.property__title { font-size: clamp(1.6rem, 1.25rem + 1.4vw, var(--s36)); color: var(--text); margin-top: 6px; }
.listing__address { color: var(--muted); font-size: var(--s21); }
.property__main section { margin-top: 40px; }
.property__main section h2 { font-size: var(--s24); }
.features { list-style: none; padding: 0; margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.features li { position: relative; padding-left: 20px; font-size: var(--s16); }
.features li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.listing__desc { margin-top: 14px; max-width: 62ch; }
.facts { margin-top: 16px; max-width: 44rem; }
.facts > div { display: grid; grid-template-columns: minmax(8.5rem, 40%) 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.facts > div:last-child { border-bottom: 1px solid var(--rule-soft); }
.facts dt { color: var(--muted); font-size: var(--s16); }
.facts dd { margin: 0; font-size: var(--s16); }
.nearby { list-style: none; padding: 0; margin-top: 16px; max-width: 44rem; }
.nearby li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule-soft); font-size: var(--s16); }
.nearby__dist { color: var(--muted); white-space: nowrap; }
.property__main .quiet { margin-top: 10px; }
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 16px; max-width: 44rem; }
@media (min-width: 760px) { .calc { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.calc__result { margin-top: 16px; font-size: var(--s21); color: var(--text); }
.smallprint { margin-top: 40px; color: var(--muted); font-size: var(--s14); max-width: 62ch; line-height: 1.55; }
.enquire { border: 1px solid var(--rule); background: var(--panel); padding: 22px; display: grid; gap: 10px; }
.enquire__title { font-size: var(--s24); color: var(--gold); line-height: 1.2; }
.enquire__actions { display: grid; gap: 10px; margin-top: 6px; }
.enquire__email { font-size: var(--s16); }
@media (min-width: 960px) {
  .property__grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: 48px; }
  .property__aside { position: sticky; top: 24px; align-self: start; }
}

/* Viewings: a real sequence, so it is numbered */
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; gap: 26px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline; }
.steps li::before { content: counter(step); grid-row: span 2; font-size: var(--s48); line-height: 1; color: var(--gold); min-width: 0.7em; }
.steps h3 { font-size: var(--s21); }
.steps p { color: var(--muted); margin-top: 6px; max-width: 34ch; }
.about p { margin-top: 18px; max-width: 60ch; font-size: var(--s21); line-height: 1.6; }
.contact__lines { margin-top: 16px; }
.contact__big { font-size: clamp(1.4rem, 1.05rem + 2vw, var(--s36)); text-decoration: none; }
.contact__big:hover { text-decoration: underline; }
.contact .quiet { margin-top: 10px; }

/* Plain pages */
.prose { max-width: 44rem; margin: 0 auto; padding: 32px var(--gutter) clamp(56px, 8vw, 96px); }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2vw, var(--s48)); }
.prose h2 { font-size: var(--s24); margin-top: 36px; }
.prose p { margin-top: 14px; }
.prose--centre { text-align: center; }
.prose--centre .button { margin-top: 12px; }

/* Footer */
.colophon { border-top: 1px solid var(--rule-soft); }
.colophon__inner { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 44px; display: grid; gap: 16px; font-size: var(--s16); }
.colophon__name { color: var(--gold); font-size: var(--s21); }
.colophon__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.colophon__motion {
  font: inherit; color: var(--gold-bright); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--rule);
}
.colophon__motion:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.colophon__legal { color: var(--muted); font-size: var(--s14); max-width: 72ch; }
@media (min-width: 860px) {
  .colophon__inner { grid-template-columns: 1fr 1fr; align-items: start; }
  .colophon__nav { justify-content: flex-end; }
  .colophon__legal { grid-column: 1 / -1; }
}
.property__quick { margin-top: 14px; }
@media (min-width: 960px) { .property__quick { display: none; } }

/* "Tell us what you're looking for" */
.register { margin-top: 36px; padding: clamp(24px, 4vw, 40px) clamp(18px, 4vw, 40px); border: 1px solid var(--rule); background: var(--panel); }
.register h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, var(--s36)); }
.register > p { margin-top: 10px; max-width: 60ch; }
.register__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 20px; align-items: end; }
@media (min-width: 860px) { .register__form { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.register .register__send { margin-top: 20px; }
.register .quiet { margin-top: 10px; }
.coming-soon + .register { margin-top: 24px; }

/* White version: the same layout with the gold logo on white, dark text and deeper golds
   chosen so every piece of gold text stays readable on white. */
:root {
  --bg: #ffffff;
  --text: #1f1d1a;
  --muted: #625c53;
  --gold: #8f6a22;
  --gold-bright: #7a5a1b;
  --gold-deep: #a88234;
  --link-hover: #4f3a10;
  --hover-tint: rgba(143, 106, 34, 0.08);
  --rule: rgba(143, 106, 34, 0.45);
  --rule-soft: rgba(143, 106, 34, 0.2);
  --line-top: #c9a04f;
  --line-bottom: #7f5d1d;
  --panel: #fbf8f2;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238f6a22' stroke-width='1.4'/%3E%3C/svg%3E");
}
.button--gold { border-color: #c39447; }
.elevation .ghost { opacity: 0.5; }
.masthead__brand img, .masthead__film { height: 50px; }
