/* Own A Story — Ramy Guirgis */
:root {
  --navy: #032b59;
  --accent: #d42020; /* darkened from #fa2a2a for 4.5:1 contrast on white */
  --ink: #333333;
  --muted: #666666;
  --line: #949494; /* form borders: 3:1 contrast (WCAG 1.4.11) */
  --serif: "Lora", Georgia, serif;
  --sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --display: "Jost", "Futura", "Avenir Next", sans-serif;
  --header-h: 70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* Keyboard focus: always visible */
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 3px; }
.hero :focus-visible, .site-header:not(.scrolled) :focus-visible { outline-color: #ffffff; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: #fff;
  color: var(--navy);
  font: 600 16px var(--sans);
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.skip-link:focus { top: 12px; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 34px;
  background: var(--navy);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  font-family: var(--display);
  font-size: 20px;
  text-decoration: none;
  color: #fff;
  transition: color .2s ease;
}
.site-header nav a[aria-current="page"] { font-weight: 700; }
.site-header .logo { justify-self: center; height: var(--header-h); display: flex; align-items: center; }
.site-header .logo img { height: 58px; width: auto; }

/* Transparent over the home hero until scrolled */
.home .site-header { background: transparent; }
.home .site-header .logo { visibility: hidden; }

/* Scrolled state: white bar, red links (all pages) */
.site-header.scrolled { background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.site-header.scrolled nav a { color: var(--accent); }
.site-header.scrolled .logo { visibility: hidden; }

.menu-toggle { display: none; }

/* Phone number: header right, hero, footer */
.header-phone {
  justify-self: end;
  font-family: var(--display);
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.header-phone:hover { text-decoration: underline; }
.site-header.scrolled .header-phone { color: var(--accent); }

.hero .call {
  display: inline-block;
  margin-top: 14px;
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hero .call:hover { text-decoration: underline; }

.site-footer .footer-phone {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
}
.site-footer .footer-phone:hover { text-decoration: underline; }
.site-footer .footer-email { margin: -4px 0 12px; }
.site-footer .footer-email a {
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}
.site-footer .footer-email a:hover { text-decoration: underline; }
.contact-intro a { overflow-wrap: anywhere; }

.contact-intro {
  text-align: center;
  font-size: 17px;
  font-weight: 400;
  color: #4a4a4a;
  margin: -30px 0 50px;
}
.contact-intro a { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-intro a:hover { text-decoration: underline; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: calc(var(--header-h) + 60px) 24px 40px;
  background: #222 url("images/hero-hollywood.jpg") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Dark enough that all white text meets WCAG AA contrast over the photo */
  background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.35) 100%);
}
.hero > * { position: relative; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 72px);
  letter-spacing: .02em;
  margin: 0 0 18px;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero .tagline {
  font-size: clamp(17px, 2vw, 26px);
  font-weight: 300;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
}
.hero .search {
  margin-top: auto;
  padding-top: 18vh;
}
.hero .search h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  margin: 0 0 18px;
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease;
}
.btn:hover { background: #06407f; transform: translateY(-1px); }

/* MLS search bar */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.home-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: min(620px, 92vw);
  margin: 0 auto;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: 400 17px var(--sans);
  color: var(--ink);
  padding: 0 18px;
  outline: none;
}
.home-search input::placeholder { color: #6b6b6b; opacity: 1; }
.home-search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.6), 0 10px 30px rgba(0,0,0,.35); }
.home-search .btn { white-space: nowrap; }
.search-note {
  margin: 12px auto 0;
  max-width: 560px;
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
@media (max-width: 520px) {
  .home-search { flex-direction: column; border-radius: 18px; gap: 6px; }
  .home-search input { padding: 12px 14px; }
  .home-search .btn { width: 100%; }
}

.hero .brokerage { margin-top: 12vh; }
.hero .brokerage img { width: 150px; height: auto; margin: 0 auto; }

/* ---------- Social ---------- */
.social { display: flex; justify-content: center; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e8e8e8;
  display: grid;
  place-items: center;
  color: #555;
  transition: background-color .2s ease, color .2s ease;
}
.social a:hover { background: var(--navy); color: #fff; }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Inner pages ---------- */
main.page { padding-top: calc(var(--header-h) + 80px); }
.page-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 50px;
  text-align: center;
  color: var(--ink);
  margin: 0 0 60px;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.about-logo { width: min(360px, 70%); margin: 0 auto 120px; }

.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
  align-items: center;
  margin-bottom: 60px;
}
.story-row .copy {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #4a4a4a;
  text-align: center;
}
.story-row .copy p { margin: 0 0 14px; }
.story-row.reverse .photo { order: -1; }

.closing {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  color: #555;
  text-align: center;
  margin: 80px 0 90px;
}
.closing strong { color: #333; }

.brokerage-mark { width: 170px; margin: 0 auto; }

/* ---------- Lead forms (home value, guide) ---------- */
.lead-form { max-width: 620px; }
.lead-form fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.lead-form legend {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  padding: 0;
  margin: 0 0 18px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field-row.three { grid-template-columns: 1fr 1fr 1.3fr; }
.contact-form select {
  width: 100%;
  font: 18px Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  border: 1px solid #949494;
  border-radius: 3px;
  padding: 9px 10px;
}
.contact-form select:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.lead-form button[type="submit"],
.contact-form button[type="submit"] { min-height: 44px; }
.lead-form button[type="submit"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-size: 16px;
  padding: 12px 30px;
  border-radius: 999px;
}
.lead-form button[type="submit"]:hover { background: #06407f; color: #fff; }
.contact-form button[disabled] { opacity: .6; cursor: progress; }
.privacy-note { font-size: 14px; color: #555; margin: 8px 0 0; }

.guide-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
.guide-preview { width: 100%; border: 1px solid #ddd; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.guide-info h2 { font-family: var(--serif); font-size: 24px; color: var(--ink); margin: 26px 0 8px; }
.guide-info p { font-size: 16px; font-weight: 400; line-height: 1.65; color: #4a4a4a; margin: 0; }

.thanks { max-width: 640px; text-align: center; font-size: 17px; font-weight: 400; line-height: 1.7; color: #333; }
.thanks a:not(.btn) { color: var(--navy); font-weight: 600; }
.thanks .btn { margin: 10px 0; }

/* Home page: seller call-to-action cards */
.cta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1040px;
  margin: 70px auto 10px;
  padding: 0 22px;
}
.cta-card {
  display: block;
  text-decoration: none;
  border: 1px solid #e3e3e3;
  border-top: 4px solid var(--navy);
  padding: 28px 28px 26px;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.cta-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.1); transform: translateY(-2px); }
.cta-card h2 { font-family: var(--display); font-weight: 700; font-size: 26px; margin: 0 0 8px; color: var(--ink); }
.cta-card p { margin: 0 0 16px; font-size: 16px; font-weight: 400; line-height: 1.6; color: #4a4a4a; }
.cta-card .more { font-weight: 600; color: var(--navy); }

/* Menu button (shown on narrower screens) */
.menu-toggle {
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.7);
  color: #fff;
  border-radius: 6px;
  font: 500 17px var(--display);
  padding: 7px 12px;
  cursor: pointer;
  min-height: 44px;
}
.menu-toggle .bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px;
}
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars span { top: 5px; }
.menu-toggle .bars::after { bottom: 0; }
.site-header.scrolled .menu-toggle { color: var(--accent); border-color: var(--accent); }

@media (max-width: 1199px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .menu-toggle { display: inline-flex; justify-self: start; }
  .site-header nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    padding: 8px 24px 18px;
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
  }
  .site-header.menu-open nav { display: flex; }
  .site-header nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header.scrolled nav { background: #fff; }
  .site-header.scrolled nav a { border-bottom-color: #eee; }
  .home .site-header.menu-open:not(.scrolled) { background: var(--navy); }
}

/* ---------- Accessibility statement ---------- */
.statement { max-width: 720px; font-size: 17px; font-weight: 400; line-height: 1.7; color: #333; }
.statement h2 { font-family: var(--display); font-size: 24px; margin: 36px 0 10px; color: var(--ink); }
.statement a { color: var(--navy); font-weight: 600; }
.statement-date { color: #555; font-size: 15px; margin-top: 36px; }

/* ---------- Contact ---------- */
.contact-form { max-width: 500px; margin: 0 auto; font-family: Arial, Helvetica, sans-serif; }
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.contact-form .field { margin-bottom: 30px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: 18px Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
}
.contact-form textarea { min-height: 132px; resize: vertical; }
.contact-form ::placeholder { color: #6b6b6b; opacity: 1; }
.required-note { font-size: 14px; color: #555; margin: 0 0 24px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.contact-form button {
  font: 700 14px Arial, Helvetica, sans-serif;
  color: #555;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 10px 28px;
  cursor: pointer;
}
.contact-form button:hover { border-color: var(--navy); color: var(--navy); }
.form-note { font-size: 14px; color: var(--muted); margin-top: 14px; min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 60px 22px 70px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.home .site-footer { padding-top: 40px; }
.site-footer p { margin: 0; }

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: #e8e8e8;
  color: #333;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.to-top { visibility: hidden; }
.to-top.show { opacity: 1; pointer-events: auto; visibility: visible; }
.site-footer a { color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-header { grid-template-columns: auto 1fr; padding: 0 16px; }
  .site-header .logo { justify-self: end; }
  .site-header .logo img { height: 44px; }
  .header-phone { display: none; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: 17px; }
  .story-row { grid-template-columns: 1fr; gap: 24px; }
  .guide-layout, .cta-cards { grid-template-columns: 1fr; gap: 28px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .story-row.reverse .photo { order: 0; }
  .page-title { font-size: 38px; margin-bottom: 40px; }
  .about-logo { margin-bottom: 70px; }
}
@media (max-width: 420px) {
  .site-header .logo { display: none; }
}
