/* ==========================================================================
   James Murphy | Realtor - South Shore, MA
   Stylesheet for index.html
   ========================================================================== */

:root {
  --navy: #1a2a4a;
  --navy-dark: #101c33;
  --navy-light: #2c4270;
  --gold: #b6893f;
  --gold-light: #d9b06c;
  --ink: #1c2230;
  --muted: #5c6478;
  --line: #e6e8ee;
  --bg-alt: #f6f7fa;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(16, 28, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 28, 51, 0.16);
  --container: 1140px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  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, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(32px, 4.5vw, 52px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 20px; }
h4 { font-size: 18px; margin-bottom: 6px; }

p { margin: 0 0 14px; color: var(--muted); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Every anchor target should clear the sticky header */
section[id], main#top { scroll-margin-top: 84px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(182, 137, 63, 0.35);
}
.btn-primary:hover { background: var(--gold-light); }

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

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); }

/* ---- Header / Nav --------------------------------------------------------*/
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-family: var(--font-head); font-size: 17px; color: var(--navy); }
.brand-text span { font-size: 10.5px; letter-spacing: 0.09em; color: var(--gold); font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav-links a:hover { color: var(--gold); border-color: var(--gold); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.nav-phone {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--navy);
  white-space: nowrap;
}
.nav-phone:hover { color: var(--gold); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---------------------------------------------------------------*/
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy) 55%, var(--navy-light));
  color: var(--white);
  padding: 84px 0 0;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 90px;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.hero h1 { color: var(--white); }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero .lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 26px 0 40px; }

.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-family: var(--font-head); font-size: 26px; color: var(--white); }
.hero-stats span { font-size: 11px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.65); font-weight: 600; }

.hero-portrait { display: flex; justify-content: center; }
.portrait-frame {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.portrait-frame .avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--navy-light);
  border: 4px solid var(--navy-dark);
}

.portrait-video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--navy-dark);
  background: var(--navy-light);
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  font-size: 64px;
  letter-spacing: 0.02em;
}
.about-card .avatar-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-size: 32px;
  margin: 0 auto 16px;
}

.wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
  z-index: 1;
}
.wave-divider svg { width: 100%; height: 70px; display: block; }

/* ---- Trust strip ----------------------------------------------------------*/
.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}
.trust-item svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }

/* ---- Sections -------------------------------------------------------------*/
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 640px;
  margin: 0 auto 50px;
  text-align: center;
}
.section-head .eyebrow { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ---- About ---------------------------------------------------------------*/
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}
.about-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 26px;
  text-align: center;
  border: 1px solid var(--line);
}
.about-card h3 { margin-bottom: 4px; }
.about-card .role { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.about-facts { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.about-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.about-facts > div:first-child { border-top: none; padding-top: 0; }
.about-facts span:first-child { color: var(--muted); }
.about-facts span:last-child { font-weight: 600; color: var(--navy); }

.about-copy .quote {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 19px;
  color: var(--navy);
  margin: 22px 0;
}

/* ---- Specialties -----------------------------------------------------------*/
.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.specialty-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.specialty-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.specialty-wide {
  grid-column: span 2;
  background: linear-gradient(180deg, var(--white), var(--bg-alt));
  border-color: var(--gold-light);
}
.specialty-wide p { font-size: 14.5px; line-height: 1.65; }
.specialty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-light), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.specialty-icon svg { width: 24px; height: 24px; }
.specialty-card p { font-size: 14px; margin: 0; }

/* ---- Timeline --------------------------------------------------------------*/
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 54px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -54px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px var(--white);
}
.section-alt .timeline-dot { box-shadow: 0 0 0 6px var(--bg-alt); }
.timeline-dot svg { width: 20px; height: 20px; }
.timeline-item .meta {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.timeline-item ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.timeline-item li { margin-bottom: 6px; font-size: 14.5px; }

/* ---- Credentials -----------------------------------------------------------*/
.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.cred-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.cred-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.cred-list svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.cred-list b { display: block; font-size: 14.5px; color: var(--navy); }
.cred-list span { font-size: 13px; color: var(--muted); }

/* ---- Contact ---------------------------------------------------------------*/
.contact {
  background: linear-gradient(160deg, var(--navy-dark), var(--navy));
  color: var(--white);
}
.contact .eyebrow { color: var(--gold-light); }
.contact .section-head p { color: rgba(255, 255, 255, 0.72); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.contact-info-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-item .icon svg { width: 20px; height: 20px; color: var(--gold-light); }
.contact-info-item b { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.6); margin-bottom: 2px; font-weight: 600; }
.contact-info-item a,
.contact-info-item span { font-size: 15.5px; font-weight: 600; color: var(--white); }
.contact-info-item a:hover { color: var(--gold-light); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 137, 63, 0.18);
}
.honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.form-status {
  min-height: 20px;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 12px;
}
.form-status.success { color: #1c7a4d; }
.form-status.error { color: #b3382c; }
.form-note {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}

/* ---- Footer -----------------------------------------------------------------*/
footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 26px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--white); }
.footer-brand img { width: 30px; height: 30px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; font-weight: 600; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { padding-top: 22px; font-size: 12px; text-align: center; line-height: 1.7; }

/* ---- Scroll reveal ------------------------------------------------------------*/
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Respect users who've asked for less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .specialty-card:hover { transform: none; }
}

/* ---- Responsive ---------------------------------------------------------------*/
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-bottom: 70px; }
  .hero-portrait { order: -1; }
  .portrait-frame { width: 200px; height: 200px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 340px; margin: 0 auto; }
  .specialty-grid { grid-template-columns: repeat(2, 1fr); }
  .cred-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 24px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta .btn.btn-navy { display: none; }
  .nav-phone { display: none; }
  .menu-toggle { display: flex; }

  .section { padding: 64px 0; }
  .hero { padding-top: 64px; }
  .hero-stats { gap: 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .specialty-grid { grid-template-columns: 1fr; }
  .trust-strip .container { gap: 16px 26px; }
}
