/* =========================================================
   Essex Park Title — styles
   Brand palette (per JV palette PDF):
     #005B50  logo green
     #172A3A  Deep Space Blue (primary dark)
     #508991  Pacific Cyan (secondary accent)
     #75DDDD  Pearl Aqua (soft section bg / bright pop)
   Variable names retained for stability; values mapped to palette.
   ========================================================= */

:root {
  /* Primary — Deep Space Blue (#172A3A) */
  --teal-900: #172A3A;
  --teal-800: #1f3a4d;
  --teal-700: #508991;
  --teal-500: #75DDDD;
  --teal-50:  #e6f8f8;

  /* Brand accent — logo green (#005B50) */
  --gold-700: #003830;
  --gold-600: #004a40;
  --gold-500: #005B50;
  --gold-100: #cce4e1;

  /* Pearl Aqua — light pop */
  --purple-700: #3fb8b8;
  --purple-500: #75DDDD;
  --purple-100: #d8f4f4;

  /* Pacific Cyan — muted secondary */
  --green-700: #3d6e74;
  --green-500: #508991;
  --green-100: #d4e3e5;

  /* Neutrals */
  --cream:    #75DDDD;
  --paper:    #ffffff;
  --ink:      #172A3A;
  --ink-2:    #44586a;
  --muted:    #768896;
  --line:     #cce4e2;
  --shadow-sm: 0 1px 2px rgba(23,42,58,.06), 0 1px 1px rgba(23,42,58,.04);
  --shadow-md: 0 10px 30px -12px rgba(23,42,58,.18), 0 2px 6px rgba(23,42,58,.06);
  --shadow-lg: 0 30px 60px -20px rgba(23,42,58,.25);

  --radius: 14px;
  --radius-sm: 8px;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-900); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--teal-900);
  margin: 0 0 .5em;
  line-height: 1.15;
}
h2 { font-size: clamp(1.85rem, 1.2rem + 2vw, 2.85rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }

p { margin: 0 0 1em; }

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

/* Skip link */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--teal-900); color: #fff;
  padding: 10px 14px; border-radius: 0 0 8px 8px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(23, 42, 58, 0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; color: var(--teal-900); }
.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 220px;
}

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav a:not(.btn) {
  font-size: .95rem; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 6px 0;
}
.primary-nav .btn {
  padding: 7px 20px;
  font-size: .85rem;
  letter-spacing: .02em;
}
.primary-nav a:not(.btn):hover { color: var(--teal-900); }
.primary-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 3px; background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
  border-radius: 2px;
}
.primary-nav a:not(.btn):hover::after,
.primary-nav a:not(.btn):focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  background: transparent; border: 1px solid rgba(23,42,58,.15);
  border-radius: 10px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--teal-900); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--teal-900); color: #fff; }
.btn-primary:hover { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--teal-900); border-color: rgba(23,42,58,.22); }
.btn-ghost:hover { background: var(--teal-900); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(88px, 11vw, 144px) 0 clamp(72px, 8vw, 112px);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero-copy {
  min-width: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 45%, #cdd2d8 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: clamp(28px, 3.4vw, 44px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 24px 60px -24px rgba(23, 42, 58, 0.45),
    0 6px 18px -8px rgba(23, 42, 58, 0.25);
  color: var(--ink);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(23,42,58,.10) 0%, rgba(23,42,58,.30) 60%, rgba(23,42,58,.55) 100%),
    url("/assets/img/hero-building.jpg") center 30% / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(117,221,221,.25), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(0,91,80,.20), transparent 60%);
  pointer-events: none;
}
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-600);
  margin: 0 0 14px;
}
.hero .eyebrow { color: var(--gold-500); }
.hero-title {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 14ch;
  color: #fff;
}
.hero-title em { font-style: italic; color: var(--gold-500); }
.hero-lede {
  max-width: 60ch;
  font-size: clamp(1.05rem, .98rem + .3vw, 1.2rem);
  color: rgba(255,255,255,.86);
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }
.hero .btn-primary { background: var(--gold-500); color: #fff; }
.hero .btn-primary:hover { background: var(--gold-700); color: #fff; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { background: #fff; color: var(--teal-900); border-color: #fff; }
/* Hero-copy overrides — must come after .hero rules to win the cascade */
.hero-copy .hero-title { color: var(--teal-900); }
.hero-copy .hero-title em { color: var(--gold-500); font-style: italic; }
.hero-copy .hero-lede { color: var(--ink-2); }
.hero-copy .btn-ghost { color: var(--teal-900); border-color: rgba(23,42,58,.32); }
.hero-copy .btn-ghost:hover { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.hero-stats {
  list-style: none; padding: 0 0 0 28px; margin: 0;
  display: grid; grid-template-columns: 1fr;
  gap: 24px;
  border-left: 2px solid var(--gold-500);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 1rem + .8vw, 1.65rem); color: #fff; line-height: 1.1; text-shadow: 0 2px 14px rgba(23,42,58,.55); }
.hero-stats span { color: rgba(255,255,255,.85); font-size: .9rem; margin-top: 4px; text-shadow: 0 1px 8px rgba(23,42,58,.5); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 7vw, 96px) 0; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { margin-bottom: 14px; }
.section-lede { color: var(--ink-2); font-size: 1.08rem; }

/* ---------- Showcase band (mid-page architectural break) ---------- */
.showcase {
  position: relative;
  padding: clamp(96px, 13vw, 168px) 0;
  color: #fff;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.showcase-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(23,42,58,.62), rgba(23,42,58,.82)),
    url("/assets/img/mid-architecture.jpg") center / cover no-repeat;
  background-attachment: fixed;
}
.showcase .eyebrow { color: var(--gold-500); }
.showcase-quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
  max-width: 28ch;
  margin: 0 auto;
  color: #fff;
  letter-spacing: -0.01em;
}
.showcase-attribution {
  margin-top: 24px;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
@media (max-width: 900px) {
  .showcase-bg { background-attachment: scroll; }
}

/* ---------- Services / Cards ---------- */
.section-services { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* Outlined cards with chromatic-glitch hover */
.card {
  background: transparent;
  border: 2px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), border-color .2s ease;
}
.card::before, .card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transform: translate(0, 0);
  transition: opacity .22s ease, transform .32s cubic-bezier(.2,.8,.3,1);
}
.card::before { border-color: var(--green-500); }   /* Pacific Cyan offset */
.card::after  { border-color: var(--purple-500); }  /* Pearl Aqua offset */
.card:hover { transform: translate(-3px, -3px); }
.card:hover::before { opacity: 1; transform: translate(5px, 5px); }
.card:hover::after  { opacity: 1; transform: translate(-5px, -5px); }
.card:focus-within { transform: translate(-3px, -3px); }
.card:focus-within::before { opacity: 1; transform: translate(5px, 5px); }
.card:focus-within::after  { opacity: 1; transform: translate(-5px, -5px); }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); margin: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--teal-900); color: var(--purple-500);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

/* Feature card: same outlined treatment, dark border for emphasis */
.card-feature {
  background: transparent;
  border-color: var(--teal-900);
  display: flex; flex-direction: column; justify-content: center;
}
.card-feature h3 { color: var(--teal-900); font-size: 1.35rem; }
.card-feature p { color: var(--ink-2); }
.link-arrow {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold-500); font-weight: 600;
}
.link-arrow:hover { color: var(--gold-700); }

/* ---------- Why ---------- */
.section-why { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.why-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.why-list li {
  padding-left: 28px; position: relative; color: var(--ink-2);
}
.why-list li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(0, 91, 80, .25);
}
.why-list li:nth-child(2)::before {
  background: var(--purple-500);
  box-shadow: 0 0 0 4px rgba(117, 221, 221, .40);
}
.why-list li:nth-child(3)::before {
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(80, 137, 145, .35);
}
.why-list strong { color: var(--teal-900); margin-right: 6px; }
.why-aside {
  background: var(--teal-900); color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  position: sticky; top: 96px;
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin: 0; }
.stat-grid > div { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.stat-grid dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .15em; color: var(--purple-500); }
.stat-grid dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.15rem; color: #fff; }

/* ---------- Leadership ---------- */
.section-leadership { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.person {
  background: transparent;
  border: 2px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  position: relative;
  isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), border-color .2s ease;
}
.person::before, .person::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transform: translate(0, 0);
  transition: opacity .22s ease, transform .32s cubic-bezier(.2,.8,.3,1);
}
.person::before { border-color: var(--green-500); }
.person::after  { border-color: var(--purple-500); }
.person:hover { transform: translate(-3px, -3px); }
.person:hover::before { opacity: 1; transform: translate(5px, 5px); }
.person:hover::after  { opacity: 1; transform: translate(-5px, -5px); }
.person-photo {
  width: 140px; height: 140px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--teal-50);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold-500);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.person h3 { margin-bottom: 4px; font-size: 1.1rem; }
.person-role { color: var(--purple-700); font-size: .88rem; font-weight: 600; margin: 0 0 14px; letter-spacing: .02em; }
.person-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.person-contact a { color: var(--ink-2); }
.person-contact a:hover { color: var(--teal-900); }

/* ---------- Clients ---------- */
.section-clients { background: var(--cream); }
.client-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 220px));
  gap: 16px;
  justify-content: center;
}
@media (max-width: 560px) {
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.client-grid li {
  font-family: var(--serif);
  font-size: 1.25rem;
  text-align: center;
  padding: 28px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--teal-900);
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}
.client-grid li:hover { transform: translateY(-2px); border-color: var(--gold-500); color: var(--gold-700); box-shadow: 0 8px 24px -12px rgba(0, 91, 80, .30); }
.client-grid li:nth-child(3n+2):hover { border-color: var(--purple-500); color: var(--purple-700); box-shadow: 0 8px 24px -12px rgba(117, 221, 221, .55); }
.client-grid li:nth-child(3n+3):hover { border-color: var(--green-500); color: var(--green-700); box-shadow: 0 8px 24px -12px rgba(80, 137, 145, .40); }

/* ---------- Contact ---------- */
.section-contact {
  background: linear-gradient(180deg, var(--teal-900), var(--teal-800));
  color: #fff;
}
.section-contact .eyebrow { color: var(--gold-500); }
.section-contact h2 { color: #fff; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-copy p { color: rgba(255,255,255,.8); }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.contact-info h3 {
  color: var(--gold-500);
  font-family: var(--sans);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .18em;
  margin-bottom: 6px; font-weight: 600;
}
.contact-info p { color: #fff; margin: 0; line-height: 1.5; }
.contact-info a { color: #fff; border-bottom: 1px dotted rgba(255,255,255,.4); }
.contact-info a:hover { color: var(--gold-100); border-bottom-color: var(--gold-500); }

.contact-form {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .85rem; color: rgba(255,255,255,.85); font-weight: 500; }
.field .optional { color: rgba(255,255,255,.5); font-weight: 400; }
.field input,
.field select,
.field textarea {
  font: inherit;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23ffffff' stroke-width='1.5' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.45); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: rgba(255,255,255,.1);
}
.field-honey { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-status { margin: 0; font-size: .9rem; color: rgba(255,255,255,.85); }
.form-status.is-success { color: var(--gold-100); }
.form-status.is-error { color: #ffb4b4; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: rgba(255,255,255,.72);
  padding: 56px 0 32px;
  border-top: 4px solid var(--gold-500);
}
.site-footer .brand-logo {
  filter: brightness(0) invert(1);
  opacity: .92;
  height: 28px;
}
.footer-brand { flex-direction: column; gap: 14px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand p { margin: 0; color: rgba(255,255,255,.85); font-family: var(--serif); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-meta { font-size: .9rem; }
.footer-meta a { color: #fff; }
.footer-meta .copyright { margin-top: 18px; color: rgba(255,255,255,.5); font-size: .82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .why-grid, .contact-grid, .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .why-aside { position: static; }
  .contact-info { grid-template-columns: 1fr 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: none;
    border-top: 2px solid var(--gold-500);
    padding: 24px 0 0;
    gap: 20px;
  }
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column; align-items: stretch;
    padding: 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .primary-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav a { padding: 12px 0; border-bottom: 1px solid rgba(23,42,58,.06); }
  .primary-nav a.btn { margin-top: 12px; align-self: flex-start; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; }
  .contact-info { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .hero-actions, .contact-form, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}
