/* gregwright.org — static rebuild stylesheet v3 (bulletproof images) */
:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-surface-alt: #eef0f4;
  --color-fg: #0f172a;
  --color-fg-muted: #475569;
  --color-fg-soft: #1e293b;
  --color-accent: #1e40af;
  --color-accent-hover: #1e3a8a;
  --color-accent-bright: #3b82f6;
  --color-accent-soft: #dbeafe;
  --color-border: #e2e8f0;

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', var(--font-body);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 8rem;

  --measure: 65ch;
  --container: 78rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.25);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.2em; transition: color 0.15s; }
a:hover { color: var(--color-accent-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md) 0;
  color: var(--color-fg);
}
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.375rem; font-weight: 700; }
p { margin: 0 0 var(--space-md) 0; max-width: var(--measure); }
ul, ol { margin: 0 0 var(--space-md) 1.25em; padding: 0; max-width: var(--measure); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-lg); }
.measure { max-width: var(--measure); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-md) 0;
  padding: 0.5rem 1rem;
  background: var(--color-accent-soft);
  border-radius: 999px;
}

.section-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-md) 0;
}
.section-eyebrow::before { content: '— '; font-weight: 800; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; }
.brand img { height: 2.25rem; width: auto; }
.brand-name { font-weight: 800; font-size: 1.0625rem; color: var(--color-fg); letter-spacing: -0.01em; }
.nav-toggle { display: none; }
.site-nav ul { display: flex; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 0.9375rem; font-weight: 600; color: var(--color-fg); padding: 0.5rem 0; position: relative; }
.site-nav a[aria-current="page"] { color: var(--color-accent); }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* HERO with real <img> */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 80vh;
  padding: var(--space-xxl) 0 var(--space-xl);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-fg);
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 64, 175, 0.55) 100%);
  z-index: -1;
}
.hero .container { width: 100%; }
.hero h1 { color: #fff; max-width: 24ch; margin-bottom: var(--space-lg); }
.hero .lead { font-size: 1.375rem; color: rgba(255, 255, 255, 0.92); max-width: 62ch; margin-bottom: var(--space-lg); }
.hero .eyebrow { color: #93c5fd; background: rgba(59, 130, 246, 0.2); }
.hero .cta-group { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-lg); }
.hero.compact { min-height: 45vh; padding: var(--space-xl) 0; }

/* Sections */
section { padding: var(--space-xxl) 0; }
section.bg-light { background: var(--color-bg); }
section.bg-surface { background: var(--color-surface); }
section.bg-alt { background: var(--color-surface-alt); }
section.bg-fg { background: var(--color-fg); color: #fff; }
section.bg-fg h2, section.bg-fg h3 { color: #fff; }
section.bg-fg p { color: rgba(255, 255, 255, 0.8); }
section.bg-fg .section-eyebrow { color: var(--color-accent-bright); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.25rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  border: 2px solid var(--color-accent);
  box-shadow: 0 6px 20px -6px rgba(30, 64, 175, 0.55);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(30, 64, 175, 0.65); }
.btn.secondary { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.45); box-shadow: none; }
.btn.secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* Split layout with image */
.split { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-xxl); } }
.split.flipped > :first-child { order: 2; }
@media (max-width: 899px) { .split.flipped > :first-child { order: 0; } }
.split-text h2 { color: var(--color-fg); }
.split-text h2::after { content: ''; display: block; width: 4rem; height: 4px; background: var(--color-accent); margin-top: var(--space-md); border-radius: 2px; }
.bg-fg .split-text h2::after { background: var(--color-accent-bright); }
.split-image { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; }
.split-image img { width: 100%; height: 100%; object-fit: cover; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--space-lg); margin-top: var(--space-xl); }
.pillar {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-accent); }
.pillar::before { content: ''; position: absolute; top: 0; left: 0; width: 4rem; height: 4px; background: var(--color-accent); }
.pillar h3 { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.pillar p { color: var(--color-fg-muted); margin: 0; }
.pillar-num { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--color-accent); letter-spacing: 0.1em; }

/* Image cards */
.image-cards { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); margin-top: var(--space-xl); }
.image-card { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-md); transition: transform 0.2s, box-shadow 0.2s; }
.image-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.image-card-image { aspect-ratio: 4 / 3; overflow: hidden; }
.image-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.image-card:hover .image-card-image img { transform: scale(1.05); }
.image-card-body { padding: var(--space-lg); }
.image-card-body h3 { margin: 0 0 var(--space-sm); }
.image-card-body p { color: var(--color-fg-muted); margin: 0; }

/* Banner section with photo */
.photo-banner {
  position: relative;
  isolation: isolate;
  padding: var(--space-xxl) 0;
  background: var(--color-fg);
  color: #fff;
  overflow: hidden;
}
.photo-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.25; z-index: -2; }
.photo-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 64, 175, 0.4) 100%); z-index: -1; }
.photo-banner h2 { color: #fff; max-width: 22ch; }
.photo-banner p { color: rgba(255, 255, 255, 0.9); }

/* Form */
form { display: grid; gap: var(--space-md); max-width: 32rem; }
label { display: grid; gap: var(--space-xs); font-size: 0.9375rem; font-weight: 600; }
input, textarea {
  font: inherit;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-fg);
}
.bg-fg input, .bg-fg textarea, .photo-banner input, .photo-banner textarea {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.bg-fg input::placeholder, .bg-fg textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
input:focus, textarea:focus { outline: 2px solid var(--color-accent-bright); outline-offset: -2px; }
textarea { resize: vertical; min-height: 7rem; }
.form-note { font-size: 0.875rem; color: var(--color-fg-muted); }
.bg-fg .form-note { color: rgba(255, 255, 255, 0.7); }
.form-status { padding: var(--space-md); border-radius: var(--radius); }
.form-status.ok { background: var(--color-accent-soft); color: var(--color-accent-hover); }
.form-status.err { background: #fee; color: #7a1d1d; }

/* Footer */
.site-footer { background: var(--color-fg); color: rgba(255, 255, 255, 0.7); padding: var(--space-xl) 0 var(--space-lg); font-size: 0.9375rem; }
.site-footer .container { display: grid; gap: var(--space-lg); }
@media (min-width: 700px) { .site-footer .container { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: var(--space-sm); color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--space-xs); }
.site-footer a { text-decoration: none; color: rgba(255, 255, 255, 0.7); }
.site-footer a:hover { color: var(--color-accent-bright); }
.site-footer .copyright { grid-column: 1 / -1; padding-top: var(--space-lg); border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.875rem; }

/* Mobile */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; background: none; border: 0; padding: var(--space-sm); font-size: 1.5rem; cursor: pointer; color: var(--color-fg); }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-header .container { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: var(--space-md); padding: var(--space-md) 0; }
  .hero { min-height: 70vh; padding: var(--space-xl) 0; }
  section { padding: var(--space-xl) 0; }
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
}

/* Prose */
.prose h2 { margin-top: var(--space-xl); }
.prose h2::after { display: none; }
.prose h3 { margin-top: var(--space-lg); }
.prose ul, .prose ol { margin-left: 1.5em; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-xl) 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
