/* ==========================================================================
   Shared design system
   Palette, typography, nav, footer, buttons, section labels, floral accents.
   Each page layers its own stylesheet on top of this.
   ========================================================================== */

/* --- Palette + tokens ----------------------------------------------------- */
:root {
  --aubergine:    #34213d;   /* primary text, dark sections */
  --aubergine-90: #4a3552;
  --mauve:        #d9c8d6;   /* warm accent */
  --lavender:     #f9f4f9;   /* soft section bg */
  --sky:          #ecf3fa;   /* secondary accent bg */
  --pearl:        #f8f8f8;   /* lightest neutral */
  --stone:        #efeeec;   /* subtle dividers */
  --slate:        #6c5e6d;   /* muted text */

  --placeholder:  var(--mauve);
  --white:        #ffffff;

  --shadow-soft:  0 18px 40px -24px rgba(52, 33, 61, 0.35);
  --shadow-card:  0 10px 30px -20px rgba(52, 33, 61, 0.45);
  --shadow-lift:  0 24px 50px -28px rgba(52, 33, 61, 0.5);

  --radius:       18px;
  --radius-sm:    12px;

  --measure:      62ch;      /* readable line length */
  --maxw:         1180px;    /* page container */
  --nav-h:        72px;

  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-head: "News Cycle", "Arial Narrow", sans-serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--aubergine);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul { list-style: none; padding: 0; }

button { font: inherit; cursor: pointer; }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--aubergine);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

/* Lora italic for the second half of a headline — the editorial signature. */
.italic-line {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  display: block;
  color: var(--aubergine-90);
}

p { max-width: var(--measure); }

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.65;
  color: var(--slate);
}

strong { font-weight: 600; }

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  position: relative;
  padding-block: clamp(56px, 9vw, 116px);
  overflow: clip;
}

.section--lavender { background: var(--lavender); }
.section--sky      { background: var(--sky); }
.section--pearl    { background: var(--pearl); }
.section--dark     { background: var(--aubergine); color: var(--white); }

.center  { text-align: center; }
.measure { max-width: var(--measure); margin-inline: auto; }

/* --- Section label / eyebrow ---------------------------------------------- */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--mauve);
}

.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

.section--dark .eyebrow { color: var(--mauve); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 3px; }

.btn--primary {
  background: var(--aubergine);
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.btn--primary:hover { background: var(--aubergine-90); }

.btn--secondary {
  background: transparent;
  color: var(--aubergine);
  border-color: var(--mauve);
}
.btn--secondary:hover { border-color: var(--aubergine); background: var(--white); }

.section--dark .btn--secondary {
  color: var(--white);
  border-color: rgba(217, 200, 214, 0.5);
}
.section--dark .btn--secondary:hover {
  border-color: var(--mauve);
  background: rgba(255, 255, 255, 0.06);
}

/* Inline text link with arrow */
.link-arrow {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--aubergine);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
}

/* Toggled by a tiny inline script once the page scrolls. */
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(52, 33, 61, 0.07);
}

.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--aubergine);
  white-space: nowrap;
}
.nav__brand .role {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  color: var(--slate);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}
.nav__links a {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--aubergine);
  position: relative;
  padding-block: 4px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--aubergine);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }
.nav__links a.active { font-weight: 700; }

/* Tighten the nav on small screens so the brand + 3 links always fit. */
@media (max-width: 640px) {
  .nav__inner { gap: 10px; }
  .nav__brand { font-size: 1.05rem; }
  .nav__brand .role { display: none; }   /* "· Realtor" is implied on mobile */
  .nav__links { gap: 15px; }
  .nav__links a { font-size: 0.92rem; }
}

/* --- Footer --------------------------------------------------------------- */
.footer {
  background: var(--aubergine);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(48px, 7vw, 72px) 28px;
}
.footer__grid {
  display: grid;
  gap: 36px;
}
.footer__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}
.footer__brand .role {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  color: var(--mauve);
}
.footer__tagline {
  color: rgba(255, 255, 255, 0.62);
  max-width: 34ch;
  font-size: 0.98rem;
}
.footer__col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 1rem;
}
.footer__col li { margin-bottom: 0.65rem; }
.footer__col a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s var(--ease);
}
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 48px;
  }
}

/* --- Floral accents ------------------------------------------------------- */
/* url() resolves relative to THIS stylesheet, so the same path works from
   every page regardless of folder depth. Until the PNG is added the corner
   simply renders empty. */
.floral-corner {
  position: absolute;
  z-index: 1;
  width: clamp(150px, 22vw, 280px);
  aspect-ratio: 1300 / 960;
  background-image: url('assets/floral-accent.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.45;
  pointer-events: none;
}
.floral-corner--tl { top: 0; left: 0; transform-origin: top left; }
.floral-corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.floral-corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.floral-corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }

@media (max-width: 600px) {
  .floral-corner { opacity: 0.35; width: clamp(120px, 38vw, 180px); }
}

/* --- Floral divider ------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(28px, 5vw, 52px);
}
/* Thin vertical rule variant (default). */
.divider:not(.divider--floral)::before {
  content: "";
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--mauve), transparent);
}
/* Centered watercolor bouquet variant for section breaks. */
.divider--floral::before {
  content: "";
  width: clamp(220px, 38vw, 420px);
  aspect-ratio: 640 / 180;
  background-image: url('assets/floral-divider.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.92;
}

/* --- Image placeholder system -------------------------------------------- */
/* Wrap each <img> in an element carrying .ph. The img's onerror adds
   .placeholder to that wrapper, hides the broken img, and reveals the label. */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--stone);
}
.ph.placeholder { background: var(--placeholder); }
.ph > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder-label {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--aubergine);
  opacity: 0.6;
}
.ph.placeholder .placeholder-label { display: flex; }

/* --- Accessibility -------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 3px; }

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