/* Earl Real Estate — Design System */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f7f9;
  --bg-tertiary: #eceef2;
  --bg-dark: #0a0e1a;
  --bg-dark-alt: #141a2a;

  --text-primary: #0a0a0a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;
  --text-inverse: #ffffff;
  --text-inverse-muted: rgba(255, 255, 255, 0.72);

  --accent: #0b3c5d;
  --accent-hover: #1e6091;
  --accent-soft: #e8eef4;

  --status-built: #1e6091;
  --status-approved: #5a7d8c;
  --status-concept: #8a8a8a;

  --border: rgba(10, 10, 10, 0.08);
  --border-strong: rgba(10, 10, 10, 0.14);
  --border-inverse: rgba(255, 255, 255, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-gap: clamp(72px, 10vw, 140px);

  --radius-sm: 2px;
  --radius-md: 4px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-color: var(--accent-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ========== TYPOGRAPHY ========== */

h1, h2, h3, h4, h5 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: var(--text-primary); }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 16px;
}

.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--text-secondary); max-width: 720px; }

/* ========== HEADER ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 36px; width: auto; }

.site-nav ul { list-style: none; display: flex; gap: clamp(16px, 2.5vw, 36px); align-items: center; }
.site-nav a {
  position: relative;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 0;
  transition: color 160ms ease;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}
.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active { color: var(--accent); font-weight: 600; }
.site-nav a.active::after { transform: scaleX(1); }

.site-nav-cta {
  background: var(--accent);
  color: var(--text-inverse) !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.site-nav-cta::after { display: none !important; }
.site-nav-cta:hover {
  background: var(--accent-hover);
  color: var(--text-inverse) !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(11, 60, 93, 0.5);
}

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .site-nav ul { display: none; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
  }
  .site-nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 20px var(--gutter) 32px;
    border-bottom: 1px solid var(--border);
    gap: 18px;
    align-items: flex-start;
  }
  .site-nav.open a { font-size: 18px; }
}

/* ========== HERO ========== */

.hero {
  padding: clamp(64px, 10vw, 140px) 0 clamp(56px, 8vw, 100px);
  background: var(--bg-primary);
}

.hero-inner { max-width: 960px; }

.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 32px; }

/* Full-bleed image hero (Sterling Bay style) */
.hero-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
}

.hero-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: var(--hero-position, 70% 20%);
  z-index: 0;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.92) 0%, rgba(10, 14, 26, 0.72) 32%, rgba(10, 14, 26, 0.35) 55%, rgba(10, 14, 26, 0) 78%),
    linear-gradient(180deg, rgba(10, 14, 26, 0) 0%, rgba(10, 14, 26, 0.25) 100%);
  z-index: 1;
}

.hero-media > .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(72px, 8vw, 120px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-stack {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--text-inverse);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
  max-width: 900px;
}

.hero-stack span { display: block; }

.hero-subline {
  margin-top: 28px;
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
}

.hero-media .eyebrow {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
}
.hero-media h1 {
  color: var(--text-inverse);
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25);
}
.hero-media .lead {
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.55;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

.hero-banner {
  position: relative;
  min-height: clamp(320px, 42vh, 440px);
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-inverse);
  display: flex;
  align-items: flex-end;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.35) 0%, rgba(10, 14, 26, 0.65) 100%);
  z-index: 1;
}

.hero-banner > .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(64px, 8vw, 100px);
  padding-bottom: clamp(40px, 5vw, 60px);
}

.hero-banner .eyebrow {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
}
.hero-banner h1 { color: var(--text-inverse); max-width: 920px; margin-bottom: 16px; font-size: clamp(32px, 5vw, 52px); }
.hero-banner .lead { color: rgba(255, 255, 255, 0.85); max-width: 720px; font-size: clamp(17px, 1.8vw, 20px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ========== SECTIONS ========== */

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section.tight { padding: clamp(48px, 6vw, 80px) 0; }
.section.bg-secondary { background: var(--bg-secondary); }
.section.bg-dark { background: var(--bg-dark); color: var(--text-inverse); }
.section.bg-dark h1, .section.bg-dark h2, .section.bg-dark h3 { color: var(--text-inverse); }
.section.bg-dark p { color: var(--text-inverse-muted); }
.section.bg-dark .eyebrow { color: #7db4dc; }

.section-head { max-width: 820px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin-bottom: 16px; }

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  max-width: none;
}
.section-head-row > div { flex: 1 1 auto; }
.section-head-row > a { flex: 0 0 auto; margin-bottom: 6px; }
.section-head-row h2 { margin-bottom: 0; }
.section-head-row .eyebrow { margin-bottom: 12px; }

/* ========== PROJECTS GRID ========== */

.projects-disclaimer {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.projects-disclaimer strong { color: var(--text-primary); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.projects-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .projects-grid.four-col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .projects-grid.four-col { grid-template-columns: 1fr; } }

.project-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -18px rgba(11, 60, 93, 0.25);
  border-color: var(--border-strong);
}

.project-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.project-image .caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(10px);
  color: var(--text-inverse);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  border-left: 2px solid #7db4dc;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.project-card:hover .project-image img { transform: scale(1.03); }

.project-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-tertiary);
}

.project-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.project-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.project-meta .location::after { content: '·'; margin: 0 6px; color: var(--text-muted); }
.project-meta .location:last-child::after { content: ''; }

.project-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 4px 0 4px;
  letter-spacing: -0.01em;
}

.project-card .scope {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.project-card .status-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 100px;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.built {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(11, 60, 93, 0.2);
}

.status-pill.approved {
  background: #ffffff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.status-pill.concept {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px dashed var(--text-muted);
}

/* ========== FOOTER ========== */

.site-footer {
  background: var(--bg-dark);
  color: var(--text-inverse-muted);
  padding: 72px 0 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px 40px;
  margin-bottom: 56px;
}

@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  color: var(--text-inverse);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { color: var(--text-inverse-muted); }
.site-footer ul a:hover { color: var(--text-inverse); }

.footer-brand p { color: var(--text-inverse-muted); line-height: 1.6; max-width: 320px; }
.footer-brand img { height: 40px; margin-bottom: 20px; }

.footer-bottom {
  border-top: 1px solid var(--border-inverse);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
}

.footer-bottom a { color: rgba(255, 255, 255, 0.64); }
.footer-bottom a:hover { color: var(--text-inverse); }

/* ========== BUTTON ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms ease;
}

.btn { transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: var(--text-inverse); }
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-inverse);
  box-shadow: 0 10px 20px -10px rgba(11, 60, 93, 0.55);
}

.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 10px 20px -10px rgba(11, 60, 93, 0.55);
}

.btn-dark-outline { background: transparent; color: var(--text-inverse); border-color: var(--border-inverse); }
.btn-dark-outline:hover {
  background: var(--text-inverse);
  color: var(--bg-dark);
  border-color: var(--text-inverse);
}

/* ========== UTILITIES ========== */

.prose { max-width: 720px; }
.prose p + p { margin-top: 20px; }
.prose p { color: var(--text-secondary); font-size: 17px; line-height: 1.7; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ========== TIMELINE ========== */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 920px;
  margin-top: 16px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.timeline-entry:last-child { border-bottom: none; padding-bottom: 0; }

.timeline-marker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 8px;
}

.timeline-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-body .role {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.timeline-body p:not(.role) {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .timeline-entry { grid-template-columns: 1fr; gap: 12px; }
}

/* ========== PORTRAIT ========== */

.portrait {
  overflow: hidden;
  background: var(--bg-tertiary);
  box-shadow: 0 24px 48px -20px rgba(10, 14, 26, 0.3);
  align-self: start;
}

.portrait img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.portrait.dark-frame {
  background: var(--bg-dark);
  padding: 0;
}
