/* =========================================================
   Cowan & Rutter — Established Real Estate Consultancy, Chelsea
   ========================================================= */

:root {
  --ink:        #0e1f44;   /* dark blue (primary)      */
  --ink-soft:   #1c3160;
  --cream:      #ffffff;   /* white background         */
  --cream-deep: #eef2f8;   /* very light blue-grey     */
  --brass:      #e0303f;   /* red accent (lighter fire engine red) */
  --brass-dark: rgba(224, 48, 63, 0.10);
  --text:       #1f2937;
  --muted:      #5b6675;
  --line:       rgba(14, 31, 68, 0.12);
  --white:      #ffffff;

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 400;
  margin-bottom: 18px;
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 16px 38px;
  border: 1px solid var(--brass);
  color: var(--ink);
  background: transparent;
  transition: all 0.45s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--brass); color: var(--white); }

.btn-light { color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 40px 0 26px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header.scrolled {
  padding: 16px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-logo { height: 82px; width: auto; display: block; transform: scaleX(1.15); transform-origin: left center; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: color 0.5s var(--ease);
}
.brand-sub {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 6px;
}
.scrolled .brand-name { color: var(--ink); }

.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.4s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--brass); }
.scrolled .nav-links a.active { color: var(--brass); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 30px; height: 22px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 0; height: 1.5px; width: 100%;
  background: var(--ink);
  transition: all 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

/* ---------- Hero (Home) ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: -4% -4% -4% -4%;
  background-image:
    url("https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?auto=format&fit=crop&w=2400&q=80");
  background-size: cover;
  background-position: center 40%;
  /* special effect: slow cinematic zoom */
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.16) translate(-1.5%, -1.5%); }
}
/* special effect: layered gradient + vignette wash */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(14,31,68,0.85) 0%, rgba(14,31,68,0.48) 45%, rgba(14,31,68,0.15) 100%),
    radial-gradient(120% 120% at 80% 10%, rgba(193,18,31,0.22) 0%, transparent 55%);
  mix-blend-mode: normal;
}
/* special effect: subtle moving sheen */
.hero-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.06) 50%, transparent 65%);
  background-size: 250% 250%;
  animation: sheen 12s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%   { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}

.hero-content { position: relative; z-index: 3; max-width: 820px; transform: translateY(60px); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.hero h1 em { color: var(--brass); font-style: italic; }
.hero p.lede {
  color: rgba(255,255,255,0.86);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 300;
  max-width: 540px;
  margin: 26px 0 38px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,0.7);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px; height: 46px;
  margin: 12px auto 0;
  background: linear-gradient(rgba(255,255,255,0.7), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%,100%{opacity:.3; transform:scaleY(.6) translateY(-8px);} 50%{opacity:1; transform:scaleY(1) translateY(0);} }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 220px 0 110px;
  background: var(--ink);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../img/page-hero.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  animation: kenburns 30s ease-in-out infinite alternate;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,31,68,0.38), rgba(14,31,68,0.68));
}
.team-hero::before { background-image: url("../img/kings-road.jpg"); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); font-size: clamp(2.4rem, 5vw, 4rem); }
.page-hero .eyebrow { color: var(--brass); font-size: 1rem; letter-spacing: 0.22em; }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 560px; margin-top: 18px; font-weight: 300; }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head { max-width: 680px; margin-bottom: 60px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.05rem; }

.divider { width: 56px; height: 1px; background: var(--brass); margin: 0 0 22px; }
.center .divider { margin-left: auto; margin-right: auto; }

/* ---------- Intro / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}
.split .media {
  position: relative;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 60px -30px rgba(22,32,46,0.4);
}
.split .media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,0.5);
  pointer-events: none;
}
.stat-row { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; color: var(--brass); line-height: 1; }
.stat .lbl { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ---------- Services grid ---------- */
.bg-cream-deep { background: var(--cream-deep); }
.bg-ink { background: var(--ink); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}
.service-card {
  padding: 52px 40px;
  border-right: 1px solid var(--line);
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
  position: relative;
}
.service-card:last-child { border-right: 0; }
.service-card:hover { background: var(--cream); }
.service-card .idx {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--brass);
  letter-spacing: 0.1em;
}
.service-card h3 { font-size: 1.6rem; margin: 18px 0 14px; }
.service-card p { color: var(--muted); font-size: 0.98rem; }
.service-card .more {
  display: inline-block;
  margin-top: 22px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 4px;
}

/* ---------- Detailed service rows ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row.flip .text { order: 2; }
.service-row .visual {
  aspect-ratio: 16 / 11;
  background-size: cover;
  background-position: center;
  position: relative;
  box-shadow: 0 26px 50px -28px rgba(22,32,46,0.45);
}
.service-row .visual span.tag {
  position: absolute;
  left: 0; top: 26px;
  background: var(--brass);
  color: var(--white);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 9px 18px;
}
.service-row h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.service-row .text p { margin-top: 18px; color: var(--muted); }
.feature-list { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.98rem;
  color: var(--text);
}
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px;
  border: 1px solid var(--brass);
  transform: rotate(45deg);
}

/* ---------- Property search ---------- */
.property-filters {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: end;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px;
}
.property-filters .field { flex: 1; min-width: 160px; margin-bottom: 0; }
.property-filters label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.property-filters select {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 13px 16px;
}
.property-filters select:focus { outline: none; border-color: var(--brass); }
.property-filters .btn { white-space: nowrap; }

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 50px;
}
.property-card {
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -28px rgba(22,32,46,0.35);
}
.property-card .photo {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  position: relative;
}
.property-card .photo span.tag {
  position: absolute;
  left: 0; top: 20px;
  background: var(--brass);
  color: var(--white);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 16px;
}
.property-card .body { padding: 26px 28px 30px; }
.property-card .price { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.property-card .title { font-size: 0.98rem; color: var(--text); margin-top: 8px; }
.property-card .addr { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.property-card .meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Team ---------- */
.team-row {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 70px;
  align-items: start;
  padding: 50px 0;
}
.team-photo {
  aspect-ratio: 4 / 5;
  min-height: 420px;
  background-size: cover;
  background-position: center top;
  box-shadow: 0 26px 50px -28px rgba(22,32,46,0.45);
}
.team-info h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 18px; }
.team-info p { color: var(--muted); }
.testimonial {
  margin-top: 30px;
  padding-left: 24px;
  border-left: 3px solid var(--brass);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.testimonial cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 120% at 50% 0%, rgba(193,18,31,0.28), transparent 60%);
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 520px; margin: 18px auto 36px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
}
.contact-info .info-block { margin-bottom: 34px; }
.contact-info .label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
}
.contact-info .value { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.contact-info .value a:hover { color: var(--brass); }
.contact-info .small { color: var(--muted); font-size: 0.96rem; }

.form { background: var(--white); padding: 46px; border: 1px solid var(--line); }
.form .field { margin-bottom: 22px; }
.form label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 14px 16px;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--white);
}
.form textarea { resize: vertical; min-height: 130px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-note { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.form-success {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--brass-dark);
  border: 1px solid var(--brass);
  color: var(--ink);
  font-size: 0.92rem;
}
.form-success.show { display: block; }

.map-embed {
  margin-top: 60px;
  border: 1px solid var(--line);
  filter: grayscale(0.4) contrast(1.05);
}
.map-embed iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 76px 0 30px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand-name { color: var(--white); font-size: 1.6rem; }
.footer-brand p { margin-top: 16px; font-size: 0.94rem; max-width: 300px; }
.footer-col h4 {
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 20px;
}
.footer-col a, .footer-col p { display: block; font-size: 0.95rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--brass); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 28px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a {
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.footer-bottom a:hover { color: var(--brass); border-color: var(--brass); }

.social-links { display: flex; gap: 14px; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: rgba(255,255,255,0.92);
  transition: color 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.social-links a:hover {
  color: var(--white);
  background: var(--brass);
  border-color: var(--brass);
}
.social-links svg { width: 22px; height: 22px; display: block; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .split, .service-row, .service-row.flip, .contact-grid, .team-row { grid-template-columns: 1fr; gap: 40px; }
  .property-grid { grid-template-columns: 1fr; }
  .property-filters { flex-direction: column; align-items: stretch; }
  .service-row.flip .text { order: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .service-card:last-child { border-bottom: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 340px);
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 40px;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.3);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: rgba(255,255,255,0.92) !important; font-size: 1rem; }
  .nav-toggle { display: block; z-index: 120; }
  .nav-open .nav-toggle span { background: var(--white); }
  .nav-open .nav-toggle span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
  .section { padding: 76px 0; }
  .form { padding: 30px 22px; }
  .form .row { grid-template-columns: 1fr; }
}
