/* ─────────────────────────────────────────────────────
   KATIE THE AGENT — Style Sheet
   Fresh, vibrant, real estate personal brand
   Palette: Deep teal primary + warm gold accent + clean whites
───────────────────────────────────────────────────── */

/* ── TOKENS ── */
:root,
[data-theme='light'] {
  /* Type */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    7.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Surfaces */
  --color-bg:              #f9f8f6;
  --color-surface:         #ffffff;
  --color-surface-2:       #f4f2ef;
  --color-surface-offset:  #edeae4;
  --color-divider:         #dbd7cf;
  --color-border:          #ccc9c1;

  /* Text */
  --color-text:           #1a1a18;
  --color-text-muted:     #6b6860;
  --color-text-faint:     #aaa89f;
  --color-text-inverse:   #f9f8f6;

  /* Footer surface – stays dark in BOTH themes so white text is always legible.
     Do NOT point this at --color-text, which inverts between themes. */
  --color-footer-bg:      #1a1a18;

  /* Primary – deep forest teal */
  --color-primary:          #0b5c5f;
  --color-primary-hover:    #094749;
  --color-primary-active:   #063233;
  --color-primary-light:    #d0e8e9;

  /* Accent – warm amber/gold */
  --color-accent:           #d9840a;
  --color-accent-hover:     #c07208;
  --color-accent-light:     #fdefd8;

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10,30,25,0.07);
  --shadow-md: 0 4px 16px rgba(10,30,25,0.10);
  --shadow-lg: 0 12px 40px rgba(10,30,25,0.14);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-mid:  280ms;

  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  /* Layout */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:   1200px;
}

[data-theme='dark'] {
  --color-bg:             #131310;
  --color-surface:        #1a1a17;
  --color-surface-2:      #1f1f1c;
  --color-surface-offset: #252521;
  --color-divider:        #2e2d29;
  --color-border:         #3a3935;
  --color-text:           #e8e6e0;
  --color-text-muted:     #7a7870;
  --color-text-faint:     #4e4c47;
  --color-text-inverse:   #1a1a18;
  --color-footer-bg:      #0d0d0b;
  --color-primary:        #3b9da3;
  --color-primary-hover:  #2b8088;
  --color-primary-active: #1d636a;
  --color-primary-light:  #1e3a3b;
  --color-accent:         #f4a83c;
  --color-accent-hover:   #e89020;
  --color-accent-light:   #3b2c0e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #131310;
    --color-surface:        #1a1a17;
    --color-surface-2:      #1f1f1c;
    --color-surface-offset: #252521;
    --color-divider:        #2e2d29;
    --color-border:         #3a3935;
    --color-text:           #e8e6e0;
    --color-text-muted:     #7a7870;
    --color-text-faint:     #4e4c47;
    --color-text-inverse:   #1a1a18;
    --color-footer-bg:      #0d0d0b;
    --color-primary:        #3b9da3;
    --color-primary-hover:  #2b8088;
    --color-primary-light:  #1e3a3b;
    --color-accent:         #f4a83c;
    --color-accent-light:   #3b2c0e;
  }
}

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.12;
}

p, li {
  text-wrap: pretty;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

input, button, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

::selection {
  background: color-mix(in oklab, var(--color-primary) 25%, transparent);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-16));
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--color-primary) 35%, transparent);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 18px color-mix(in oklab, var(--color-primary) 45%, transparent);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.8);
}

.btn-sm  { font-size: var(--text-sm);  padding: var(--space-2) var(--space-5); }
.btn-md  { font-size: var(--text-sm);  padding: var(--space-3) var(--space-8); }
.btn-lg  { font-size: var(--text-base); padding: var(--space-4) var(--space-10); }

/* ── EYEBROWS & SECTION HEADINGS ── */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-heading {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.section-heading em {
  font-style: italic;
  color: var(--color-primary);
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 246, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
}

[data-theme='dark'] .header {
  background: rgba(19, 19, 16, 0.92);
}

.header--scrolled {
  border-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.4rem);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.logo-text em {
  font-style: italic;
  color: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-left: auto;
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-link:hover { color: var(--color-primary); }

.header .btn-primary { margin-left: var(--space-4); }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  margin-left: var(--space-2);
  transition: background var(--dur-fast) var(--ease-out);
}
.hamburger:hover { background: var(--color-surface-2); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--dur-mid) var(--ease-out),
              opacity var(--dur-mid) var(--ease-out);
  transform-origin: center;
}
.hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(5, 35, 35, 0.75) 0%,
    rgba(11, 50, 50, 0.55) 50%,
    rgba(20, 20, 15, 0.40) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: var(--space-32);
  max-width: 780px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.hero-heading em {
  font-style: italic;
  color: var(--color-accent);
}

.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  line-height: 1.55;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  backdrop-filter: blur(8px);
}
.badge-text {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
}

.hero-scroll-cue {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2.5s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--color-primary);
  padding-block: var(--space-6);
}
.trust-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
  flex: 1;
  min-width: 140px;
}
.trust-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff;
}
.trust-label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.trust-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ── ABOUT ── */
.about { background: var(--color-surface); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-24));
  align-items: center;
}
.about-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.7;
}
.about-text p strong { color: var(--color-text); }

.about-visual {
  position: relative;
  padding-left: var(--space-8);
}
.about-photo-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-primary-light);
  box-shadow: var(--shadow-lg);
}
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.about-photo-bg {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-6);
}
.about-bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.about-photo-overlay-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
}
.about-photo-overlay-text span:first-child {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}
.about-photo-overlay-text span:last-child {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.about-accent-card {
  position: absolute;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-accent);
  max-width: 280px;
  bottom: var(--space-8);
  left: calc(-1 * var(--space-10));
  z-index: 2;
}
.accent-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: var(--space-2);
}
.accent-attr {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
}

/* ── AREAS SERVED ── */
.areas {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}
.areas-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}
.areas-intro {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.area-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  text-align: center;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  cursor: default;
}
.area-card:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.area-card:hover .area-name { color: #fff; }

.area-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--dur-fast) var(--ease-out);
}

/* ── WHY KATIE ── */
.why {
  background: var(--color-surface-2);
}
.why-header {
  text-align: center;
  max-width: 520px;
  margin: 0 auto var(--space-12);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.why-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  transition: box-shadow var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
}
.why-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.why-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}
.why-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.why-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ── MARKET PULSE ── */
.market {
  background: var(--color-bg);
  overflow: hidden;
}
.market-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-20));
  align-items: center;
}
.market-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.7;
}
.market-text p strong { color: var(--color-text); }

.market-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-mid) var(--ease-out);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* ── CONTACT ── */
.contact {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 50%, rgba(217,132,10,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at -10% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.contact-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-20));
  align-items: center;
}

.contact-text .section-eyebrow.light {
  color: var(--color-accent);
}
.contact-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-5);
}
.contact-text p {
  color: rgba(255,255,255,0.8);
  font-size: var(--text-base);
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact-action-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  backdrop-filter: blur(8px);
  text-decoration: none;
}
.contact-action-card:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  transform: translateX(4px);
}
.contact-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.contact-action-card > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.contact-action-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.contact-action-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff;
}
.contact-action-sub {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* ── FOOTER ── */
.footer {
  background: var(--color-footer-bg);
  padding-block: var(--space-12);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.footer .logo-text { color: #fff; }
.footer .logo-text em { color: var(--color-accent); }
.footer-tagline {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.66);
  padding-left: var(--space-5);
  border-left: 1px solid rgba(255,255,255,0.28);
}
.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-8);
}
.footer-info p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.78);
}
.footer-info a {
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-info a:hover { color: #fff; }
.footer-legal {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.62);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.28);
}

/* ── REFERRAL NETWORK (manila folder, vertical index tabs) ── */
:root,
[data-theme='light'] {
  --folder-face:   #e9dec4;
  --folder-tab:    #dccca9;
  --folder-tab-hi: #e3d5b8;
  --folder-edge:   #bfad85;
  --folder-ink:    #2f2819;
  --folder-muted:  #5c5342;
  --folder-shadow: rgba(74, 60, 30, 0.20);
  --folder-grain:  0.055;
  --folder-grain-blend: multiply;
}
[data-theme='dark'] {
  --folder-face:   #2b2519;
  --folder-tab:    #1e1910;
  --folder-tab-hi: #251f14;
  --folder-edge:   #4a4029;
  --folder-ink:    #ece3ce;
  --folder-muted:  #b3a98f;
  --folder-shadow: rgba(0, 0, 0, 0.50);
  --folder-grain:  0.040;
  --folder-grain-blend: overlay;
}

.referrals { background: var(--color-surface-2); }
.ref-header { max-width: 60ch; margin-bottom: var(--space-10); }
.ref-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Folder shell: tab rail on the left, folder face on the right.
   The whole unit carries one shadow so it reads as a single object. */
.folder {
  display: flex;
  align-items: stretch;
  filter: drop-shadow(0 10px 26px var(--folder-shadow));
}

/* ── Tab rail ── */
.folder-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 13.5rem;
  padding-top: var(--space-6);
  margin-right: -1px;
  position: relative;
  z-index: 2;
}

/* Die-cut index tab: bevelled on the outer edge, square where it meets
   the folder face. Built from two clipped layers so the tapered silhouette
   still gets a hairline edge (a plain border cannot follow a clip-path). */
.folder-tab {
  --tab-clip: polygon(0 11px, 11px 0, 100% 0, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  color: var(--folder-muted);
  background: none;
  border: none;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-6);
  min-height: 46px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.folder-tab::before,
.folder-tab::after {
  content: '';
  position: absolute;
  clip-path: var(--tab-clip);
  pointer-events: none;
}
.folder-tab::before {
  inset: 0;
  z-index: -2;
  background: var(--folder-edge);
}
.folder-tab::after {
  inset: 1px;
  z-index: -1;
  background: var(--folder-tab);
  transition: background var(--dur-fast) var(--ease-out);
}
.folder-tab:hover {
  color: var(--folder-ink);
}
.folder-tab:hover::after { background: var(--folder-tab-hi); }
.folder-tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -3px;
  z-index: 4;
}

/* Active tab becomes the folder face and spills over the body's edge,
   erasing the seam between tab and card. */
.folder-tab.is-active {
  z-index: 3;
  color: var(--folder-ink);
  font-weight: 600;
  transform: translateX(-3px);
}
.folder-tab.is-active::after {
  background: var(--folder-face);
  right: -3px;
}

/* ── Folder face ── */
.folder-body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
  background: var(--folder-face);
  border: 1px solid var(--folder-edge);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-8);
  /* soft crease along the spine, as if the stock is folded here */
  box-shadow: inset 16px 0 20px -16px var(--folder-shadow);
}

/* Paper grain. Sits above the face, below the content. */
.folder-body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: var(--folder-grain);
  mix-blend-mode: var(--folder-grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
}

.folder-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.folder-panel[hidden] { display: none; }
.folder-panel:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.partner-media { margin: 0; }
.partner-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--folder-edge);
  box-shadow: 0 2px 10px var(--folder-shadow);
  display: block;
}
.partner-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}
.partner-logo {
  width: auto;
  max-width: 190px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  display: block;
  margin-bottom: var(--space-1);
}
.partner-service {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--folder-muted);
}
.partner-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--folder-ink);
  line-height: 1.15;
}
.partner-blurb {
  font-size: var(--text-sm);
  color: var(--folder-muted);
  line-height: 1.7;
}
.partner-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-2);
}
.partner-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
.partner-links a:hover { color: var(--color-primary-hover); }

.ref-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 75ch;
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

@media (prefers-reduced-motion: reduce) {
  .folder-tab { transition: none; }
  .folder-tab.is-active { transform: none; }
  .folder-tab.is-active::after { right: -3px; }
}

/* ── RESPONSIVE ── */

/* ── 1024px — Large Tablet / Small Laptop ── */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .folder-tabs { flex: 0 0 11.5rem; }
  .folder-tab { font-size: var(--text-xs); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); }
  .areas-grid { grid-template-columns: repeat(4, 1fr); }
  .about-accent-card {
    left: calc(-1 * var(--space-6));
    max-width: 260px;
  }
}

/* ── 768px — Tablet ── */
@media (max-width: 768px) {
  .header-inner { height: 60px; position: relative; }

  /* Hide desktop nav & CTA; show hamburger */
  .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-6);
    gap: var(--space-1);
    box-shadow: var(--shadow-md);
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--dur-mid) var(--ease-out),
                transform var(--dur-mid) var(--ease-out);
    z-index: 200;
  }
  .nav--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav .nav-link {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--color-divider);
    color: var(--color-text);
  }
  .nav .nav-link:last-child { border-bottom: none; }

  .desktop-cta { display: none; }
  .hamburger { display: flex; margin-left: auto; }

  .hero { min-height: 90svh; }
  .hero-content { padding-block: var(--space-16) var(--space-24); }
  .hero-sub { font-size: var(--text-base); }

  /* Trust bar — 2×2 on tablet */
  .trust-divider { display: none; }
  .trust-inner { gap: var(--space-3) var(--space-6); }
  .trust-item { min-width: calc(50% - var(--space-8)); flex: 0 0 calc(50% - var(--space-4)); }

  /* About — single column, photo above text */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .about-visual { padding-left: 0; }
  .about-photo-wrap { aspect-ratio: 16 / 9; max-height: 420px; }
  .about-accent-card {
    position: relative;
    left: 0;
    bottom: auto;
    margin-top: var(--space-5);
    max-width: 100%;
  }

  /* Areas — 2×4 on tablet */
  .areas-grid { grid-template-columns: repeat(4, 1fr); }

  /* Why — 2-col on tablet */
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }

  /* Market — stack */
  .market-inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .market-stats { grid-template-columns: repeat(2, 1fr); }

  /* Contact — stack */
  .contact-card { grid-template-columns: 1fr; gap: var(--space-8); }
  .contact-action-card { flex-direction: row; align-items: flex-start; }

  /* Referral folder: rail flips to a horizontal strip that scrolls sideways,
     so tabs never wrap and the active one still meets the folder face. */
  .folder { flex-direction: column; }
  .folder-tabs {
    flex: 0 0 auto;
    flex-direction: row;
    padding-top: 0;
    padding-left: var(--space-4);
    margin-right: 0;
    margin-bottom: -1px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .folder-tabs::-webkit-scrollbar { display: none; }
  .folder-tab {
    --tab-clip: polygon(11px 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%, 0 11px);
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    padding: var(--space-3) var(--space-5);
  }
  .folder-tab.is-active { transform: translateY(-3px); }
  .folder-tab.is-active::after { right: 1px; bottom: -3px; }
  .folder-body {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: var(--space-6);
    box-shadow: inset 0 16px 20px -16px var(--folder-shadow);
  }
  .folder-panel { grid-template-columns: 1fr; gap: var(--space-6); }

  /* Footer */
  .footer-info { flex-direction: column; gap: var(--space-2); }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .footer-tagline { padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.28); padding-top: var(--space-3); }
}

/* ── 600px — Large Phone / Small Tablet ── */
@media (max-width: 600px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .why-card { padding: var(--space-6) var(--space-5); }
}

/* ── 480px — Phone ── */
@media (max-width: 480px) {
  .hero-heading { line-height: 1.08; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .trust-item { min-width: 140px; }

  .areas-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .area-card { padding: var(--space-4) var(--space-4); }
  .area-name { font-size: var(--text-base); }

  .why-grid { grid-template-columns: 1fr; }
  .why-card { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-5); }
  .why-icon { flex-shrink: 0; margin-bottom: 0; }
  .why-card h3 { margin-bottom: var(--space-2); }

  .market-stats { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .stat-num { font-size: var(--text-lg); }

  .contact-action-card { flex-direction: column; gap: var(--space-4); }
  .contact-action-value { font-size: var(--text-base); word-break: break-all; }

  .section-heading { font-size: var(--text-xl); }
  .contact-heading { font-size: var(--text-xl); }

  .about-photo-wrap { aspect-ratio: 4 / 3; max-height: 300px; }
}
