/* ============================================
   THE SF REALTY — Master Stylesheet
   ============================================ */

:root {
  --navy: #0F2537;
  --navy-light: #16324A;
  --gold: #D4AF37;
  --gold-soft: #E4C766;
  --slate: #5A6E7F;
  --light-gray: #8C9BA5;
  --paper: #F7F5F1;
  --white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-h: 92px;
  --header-h-scrolled: 68px;

  --max-width: 1300px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: 0.2px; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--slate); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section { padding: clamp(4rem, 8vw, 7rem) 0; }
.enquiry { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.faq { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.section-tag {
  display: block;
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-style: italic;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.divider {
  width: 64px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 1.1rem 0 1.4rem;
}

.section-head.center .divider { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  min-height: 44px;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }

.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 37, 55, 0.97);
  backdrop-filter: blur(6px);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height 0.3s ease;
  border-bottom: 1px solid rgba(212,175,55,0.18);
}

.site-header.scrolled { height: var(--header-h-scrolled); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-link { display: flex; align-items: center; height: 100%; }
.logo-link img {
  height: 86px;
  width: auto;
  transition: height 0.3s ease;
}
.site-header.scrolled .logo-link img { height: 66px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover { color: var(--gold); border-color: var(--gold); }

.header-cta { display: flex; align-items: center; gap: 1.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h-scrolled);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
    gap: 1.1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-bottom: 1px solid rgba(212,175,55,0.18);
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .header-cta .btn-primary { padding: 0.75rem 1.3rem; font-size: 0.88rem; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(212,175,55,0.10), transparent 45%),
    linear-gradient(180deg, rgba(15,37,55,0) 0%, rgba(15,37,55,0.4) 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}
.hero-eyebrow .line { width: 34px; height: 1px; background: var(--gold); display: inline-block; }

.hero h1 { color: var(--white); }
.hero h1 em { color: var(--gold-soft); font-style: normal; }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.78);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }

.hero-trust {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.92rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 1.25rem;
  max-width: 480px;
}

.hero-trust-sub {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  max-width: 480px;
  margin-top: 0.9rem;
}

.hero-trust-tags {
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 0.75rem;
}
}

.hero-art { position: relative; }
.hero-art img {
  width: 100%;
  height: 90%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(212,175,55,0.35);
}

/* ============ PROPERTIES / SERVICES ============ */
.properties { background: var(--paper); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
}

.property-card {
  background: var(--white);
  border: 1px solid rgba(15,37,55,0.08);
  transition: border-color 0.25s ease, transform 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.property-card:hover { border-color: var(--gold); transform: translateY(-3px); }

.card-photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.property-card-body { padding: 1.5rem 1.6rem 1.8rem; }

.property-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.property-card p { font-size: 0.95rem; margin-bottom: 1.2rem; }

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  display: inline-block;
}
.card-link:hover { color: var(--gold); }

/* ============ ABOUT ============ */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
}

.about-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(15,37,55,0.1);
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem 1.5rem;
}
.about-list li {
  color: var(--slate);
  font-size: 0.95rem;
  padding-left: 1.1rem;
  position: relative;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

/* ============ TESTIMONIALS ============ */
.testimonials { background: var(--navy); color: var(--white); }
.testimonials .section-head p { color: rgba(255,255,255,0.7); }
.testimonials .section-tag { color: var(--gold-soft); }
.testimonials h2 { color: var(--white); }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.testimonial-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.22);
  padding: 2rem;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.4rem;
}

.testimonial-name { font-weight: 600; color: var(--gold-soft); }
.testimonial-meta { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin: 0; }

/* ============ ENQUIRY FORM ============ */
.enquiry-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 900px) {
  .enquiry-wrap { grid-template-columns: 1fr; }
}

.enquiry-photo {
  width: 100%;
  height: 260px;
  object-fit: cover;
  margin-top: 1.75rem;
  border: 1px solid rgba(15,37,55,0.1);
}

.enquiry-form {
  background: var(--paper);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid rgba(15,37,55,0.08);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--light-gray);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  min-height: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field .error-msg {
  display: none;
  color: #A3372F;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #A3372F; }
.field.invalid .error-msg { display: block; }

.form-note { font-size: 0.82rem; color: var(--light-gray); margin-top: 0.5rem; }
.form-success {
  display: none;
  background: rgba(212,175,55,0.12);
  border: 1px solid var(--gold);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
  color: var(--navy);
}
.form-success.show { display: block; }
.form-error {
  display: none;
  background: rgba(163,55,47,0.08);
  border: 1px solid #A3372F;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
  color: #A3372F;
}
.form-error.show { display: block; }

/* ============ FAQ ============ */
.faq-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 860px) {
  .faq-wrap { grid-template-columns: 1fr; }
  .faq-side { order: -1; }
}

.faq-side img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid rgba(15,37,55,0.1);
}
.faq-side-card {
  background: var(--paper);
  border: 1px solid rgba(15,37,55,0.08);
  border-top: 3px solid var(--gold);
  padding: 1.75rem;
}
.faq-side-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.faq-side-card p { font-size: 0.92rem; margin-bottom: 1.25rem; }

.faq-list { max-width: 100%; }
.faq-item { border-bottom: 1px solid rgba(15,37,55,0.12); }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.faq-question .plus {
  flex: none;
  width: 22px;
  height: 22px;
  position: relative;
}
.faq-question .plus::before,
.faq-question .plus::after {
  content: "";
  position: absolute;
  background: var(--gold);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.faq-question .plus::before { width: 14px; height: 2px; }
.faq-question .plus::after { width: 2px; height: 14px; transition: transform 0.25s ease; }
.faq-item[open] .plus::after { transform: translate(-50%,-50%) rotate(90deg) scaleY(0); }

.faq-answer { padding: 0 0 1.4rem; margin: 0; max-width: 68ch; }

/* ============ CONTACT ============ */
.contact { background: var(--paper); }
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: stretch;
}
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3rem);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(15,37,55,0.1);
}
.contact-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.contact-row:first-child { padding-top: 0; }
.contact-row .icon { flex: none; width: 22px; height: 22px; color: var(--gold); }
.contact-row strong { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.55); font-weight: 600; margin-bottom: 0.2rem; }
.contact-row a, .contact-row span.text { color: var(--white); font-weight: 500; }
.contact-row a:hover { color: var(--gold); }

.map-frame {
  border: 1px solid rgba(15,37,55,0.1);
  min-height: 320px;
  width: 100%;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 1.75rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand img { height: 75px; margin-bottom: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.9rem; max-width: 32ch; }

.footer-col h3 {
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer-col a, .footer-col span { font-size: 0.92rem; color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: var(--gold); }

.footer-seo {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 1.5rem;
  margin-bottom: 1.25rem;
}
.footer-seo p {
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-bottom {
  padding-top: 0.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--gold);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
