/* Pillarbox Property — lettings portfolio
   Palette: warm paper, ink, pillarbox red accent (matched to logo) */

:root {
  --paper: #faf7f2;
  --paper-deep: #f1ece3;
  --ink: #27221f;
  --ink-soft: #5e5752;
  --red: #c8102e;
  --red-deep: #9e0c23;
  --line: #e0d9cc;
  --white: #fffdf9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(37, 39, 31, .06), 0 8px 24px rgba(37, 39, 31, .07);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--red); }

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}

.site-nav a:hover { color: var(--ink); }

.nav-cta {
  color: var(--white) !important;
  background: var(--red);
  padding: .55rem 1.1rem;
  border-radius: 999px;
  transition: background .15s ease;
}

.nav-cta:hover { background: var(--red-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease;
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  gap: .85rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.hero-media {
  margin: 0;
  position: relative;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-media figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(255, 253, 249, .92);
  padding: .4rem .8rem;
  border-radius: 6px;
  font-size: .8rem;
  color: var(--ink-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s ease, border-color .15s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover { background: var(--red-deep); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--ink-soft); }

.btn-block { width: 100%; }

/* ---------- Trust strip ---------- */

.strip {
  background: var(--red);
  color: var(--paper);
  padding-block: 1.75rem;
}

.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.strip-item { text-align: center; }

.strip-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
}

.strip-item span {
  font-size: .85rem;
  opacity: .8;
}

/* ---------- Sections ---------- */

.homes, .how { padding-block: clamp(3.5rem, 7vw, 6rem); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 0;
}

/* ---------- Filters ---------- */

.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}

.filter-btn:hover { border-color: var(--ink-soft); color: var(--ink); }

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- Property cards ---------- */

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.home-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.home-card.is-let { opacity: .85; }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--paper-deep), #ddd3c2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: .85rem;
  left: .85rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--red);
}

.card-badge.badge-let { color: var(--ink-soft); }
.card-badge.badge-soon { color: var(--red); }

.card-body {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 { margin-bottom: .15rem; }

.card-loc {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-bottom: .8rem;
}

.card-desc {
  font-size: .92rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  flex: 1;
}

.card-meta {
  display: flex;
  gap: 1.1rem;
  font-size: .82rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: .9rem;
  margin-bottom: .9rem;
}

.card-meta span strong { color: var(--ink); font-weight: 600; }

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.card-price small {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.card-link {
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

.grid-empty {
  margin-top: 2rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- How it works ---------- */

.how { background: var(--paper-deep); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.steps li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--red);
  display: block;
  margin-bottom: .9rem;
}

.steps p { color: var(--ink-soft); font-size: .94rem; margin: 0; }

/* ---------- About ---------- */

.about { padding-block: clamp(3.5rem, 7vw, 6rem); }

.about-inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-media { margin: 0; }

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-copy p { color: var(--ink-soft); }

.about-copy blockquote {
  margin: 1.75rem 0 0;
  padding: 1.4rem 1.6rem;
  background: var(--paper-deep);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.about-copy blockquote p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: .6rem;
}

.about-copy cite {
  font-style: normal;
  font-size: .85rem;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-copy p { color: #bdb6b0; max-width: 42ch; }

.contact-details {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.contact-details li {
  padding-block: 1rem;
  border-top: 1px solid #3e3833;
  font-size: .95rem;
}

.contact-details span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #948c86;
  margin-bottom: .25rem;
}

.contact-details a { color: var(--paper); text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-details small { color: #948c86; }

.contact-form {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 1.1rem; }

.form-row label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}

.form-note {
  margin: 1rem 0 0;
  font-size: .88rem;
  color: var(--red);
  text-align: center;
  min-height: 1.2em;
}

.form-note.is-error { color: var(--red); }

/* ---------- Footer ---------- */

.site-footer {
  background: #1d1916;
  color: #9c948e;
  padding-block: 3rem 0;
  font-size: .88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
}

.brand-footer { color: var(--paper); font-size: 1.15rem; margin-bottom: .75rem; }
.brand-footer .brand-logo { width: 36px; height: 36px; }

.footer-small { line-height: 1.7; margin: 0; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-nav a { color: #9c948e; text-decoration: none; }
.footer-nav a:hover { color: var(--paper); }

.footer-base {
  border-top: 1px solid #37322d;
  padding-block: 1.25rem;
}

.footer-base p { margin: 0; font-size: .8rem; }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero-inner,
  .about-inner,
  .contact-inner { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; }

  .strip-inner { grid-template-columns: repeat(2, 1fr); }

  .hero-media { order: -1; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1.25rem;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a { padding-block: .75rem; font-size: 1.05rem; }

  .nav-cta { margin-top: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-card, .btn, .filter-btn { transition: none; }
}

/* ---------- Property page ---------- */

.property-page { padding-block: 2rem clamp(3rem, 6vw, 5rem); }

.crumbs { margin-bottom: 1.5rem; font-size: .9rem; }
.crumbs a { text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }

.prop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.prop-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .15em; }
.prop-head .card-badge { position: static; border: 1px solid var(--line); }

.prop-layout {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 2rem;
  align-items: start;
}

.prop-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}

.prop-main img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.prop-main-hint {
  position: absolute;
  right: .9rem;
  bottom: .9rem;
  font-family: var(--font-body);
  font-size: .75rem;
  background: rgba(255, 253, 249, .9);
  color: var(--ink-soft);
  padding: .3rem .7rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .15s ease;
}

.prop-main:hover .prop-main-hint { opacity: 1; }

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: .5rem;
  margin-top: .5rem;
}

.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper-deep);
  opacity: .75;
  transition: opacity .15s ease;
}

.thumb:hover { opacity: 1; }

.thumb.is-active {
  border-color: var(--red);
  opacity: 1;
}

.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.prop-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.prop-card .card-price { font-size: 1.35rem; }

.fact-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.fact-list li {
  display: flex;
  justify-content: space-between;
  padding-block: .6rem;
  border-top: 1px solid var(--line);
  font-size: .92rem;
}

.fact-list li span { color: var(--ink-soft); }

.prop-note {
  margin: 1rem 0 0;
  font-size: .85rem;
  color: var(--ink-soft);
  text-align: center;
}

.prop-desc {
  max-width: 68ch;
  margin-top: 2.5rem;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

/* ---------- Lightbox ---------- */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 16, 14, .94);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #f5efe8;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
  opacity: .8;
}

.lightbox button:hover { opacity: 1; }

.lb-close { top: .5rem; right: .75rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

.lb-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #f5efe8;
  font-size: .85rem;
  opacity: .75;
  margin: 0;
}

/* Card tweaks for linked media/titles */

.card-media { display: block; }

.card-body h3 a {
  color: inherit;
  text-decoration: none;
}

.card-body h3 a:hover { text-decoration: underline; }

@media (max-width: 880px) {
  .prop-layout { grid-template-columns: 1fr; }
  .prop-card { position: static; }
}

/* ---------- No-photo placeholder ---------- */

.card-media-placeholder {
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
  border-radius: 12px;
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: .85;
}

.prop-main-empty {
  cursor: default;
  aspect-ratio: 3 / 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prop-main-empty p {
  position: absolute;
  bottom: 18%;
  width: 100%;
  text-align: center;
  color: var(--ink-soft);
  font-size: .9rem;
  margin: 0;
}

/* ---------- Locate bar, map, services ---------- */

.locate-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.locate-btn { font-weight: 600; }

.locate-btn:disabled { opacity: .6; cursor: wait; }

.locate-note {
  font-size: .85rem;
  color: var(--ink-soft);
}

.map-wrap { margin-top: 3rem; }

.map-wrap h3 { margin-bottom: 1rem; }

#map {
  height: 440px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  z-index: 1; /* keep below the sticky header */
}

.leaflet-popup-content { font-family: var(--font-body); }

.services {
  background: var(--paper-deep);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.home-grid-services { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-width: 100%; }

.card-badge.badge-co {
  left: auto;
  right: .85rem;
  background: var(--ink);
  color: var(--paper);
}
