/* Essex PPF public site
   One theme (dark), one accent (amber), one radius system (10px cards, pill buttons). */

@font-face {
  font-family: 'Saira';
  src: url('/assets/fonts/saira-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Saira';
  src: url('/assets/fonts/saira-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Saira';
  src: url('/assets/fonts/saira-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('/assets/fonts/chakra-petch-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('/assets/fonts/chakra-petch-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('/assets/fonts/chakra-petch-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0c0e11;
  --bg-raised: #12151a;
  --bg-sunken: #08090b;
  --line: #23272f;
  --text: #eceef1;
  --text-dim: #9aa3af;
  --accent: #f2b23e;
  --accent-ink: #1d1503;
  --radius: 10px;
  --font-sans: 'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Chakra Petch', 'Saira', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }

h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shell { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Intro loader styles live inline in index.php so they always ship
   with the loader markup, immune to stale CDN-cached CSS. */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #f7c05e; }

.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }

.btn-block { width: 100%; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }

.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta { padding: 0.55rem 1.25rem; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 13, 0.92) 0%, rgba(9, 11, 13, 0.72) 42%, rgba(9, 11, 13, 0.25) 75%),
    linear-gradient(0deg, rgba(9, 11, 13, 0.55) 0%, rgba(9, 11, 13, 0) 35%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 68px);
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.hero-copy { max-width: 600px; margin: auto 0; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.75rem;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1;
}
.stat-num em { font-style: normal; font-size: 0.5em; color: var(--accent); }
.stat-label {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 24ch;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 3.9vw, 3.5rem);
  max-width: 24ch;
}
.hero-sub {
  margin-top: 1.5rem;
  max-width: 44ch;
  font-size: 1.1rem;
  color: var(--text-dim);
}
.hero-actions { margin-top: 2.25rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- Pricing teaser ---------- */

.price-teaser { background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.price-teaser-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}
.price-teaser p { color: var(--text-dim); max-width: 60ch; }
.price-teaser strong { color: var(--text); font-family: var(--font-display); font-weight: 500; font-size: 0.95em; }

/* ---------- Packages ---------- */

.packages { padding: 6.5rem 0; }
.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head p { margin-top: 1rem; color: var(--text-dim); }

.package-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
}
.package {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.package:hover { border-color: #3a4150; transform: translateY(-2px); }
.package-featured { grid-row: 1 / 3; }
.package-featured img { width: 100%; height: 260px; object-fit: cover; }
.package-body { padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.package h3 { font-size: 1.35rem; }
.package-body > p { color: var(--text-dim); }
.price-rows { margin-top: auto; padding-top: 0.75rem; }
.price-rows div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
}
.price-rows div + div { border-top: 1px solid var(--line); }
.price-rows dt { color: var(--text-dim); font-size: 0.92rem; }
.price-rows dd { font-family: var(--font-display); font-size: 0.92rem; color: var(--accent); }
.package-meta { font-size: 0.85rem; color: var(--text-dim); padding-top: 0.75rem; }

.addons { margin-top: 3.5rem; }
.addons h3 { font-size: 1.2rem; margin-bottom: 1.25rem; }
.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.addon {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.2s var(--ease);
}
.addon:hover { border-color: #3a4150; }
.addon-price { font-family: var(--font-display); font-size: 0.88rem; color: var(--accent); }

.package-note { margin-top: 2rem; color: var(--text-dim); }

/* ---------- Experience ---------- */

.experience { background: var(--bg-sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6.5rem 0; }
.experience-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 4rem;
  align-items: start;
}
.experience-media { position: sticky; top: 100px; }
.experience-media img { border-radius: var(--radius); border: 1px solid var(--line); }
.experience-copy > p { margin-top: 1.25rem; color: var(--text-dim); max-width: 56ch; }
.experience-points { margin-top: 2.5rem; display: grid; gap: 2rem; }
.point h3 { font-size: 1.1rem; font-weight: 600; }
.point p { margin-top: 0.4rem; color: var(--text-dim); max-width: 56ch; }

/* ---------- Process (sticky-stack stages) ---------- */

.process { padding-top: 6.5rem; }
.process-head { padding-bottom: 3rem; }

/* Each wrapper is taller than the viewport: the panel pins while the
   extra height gives scroll room for the wording to build up. */
.stage-wrap {
  height: 175dvh;
  view-timeline: --stage block;
}
.stage-wrap:last-child { height: 145dvh; }

.stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}
.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(9, 11, 13, 0.88) 0%, rgba(9, 11, 13, 0.35) 42%, rgba(9, 11, 13, 0.12) 100%);
}
.stage-copy {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 24px 4.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.stage-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
}
.stage-copy h3 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  margin-top: 0.5rem;
}
.stage-lines {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}
.stage-line {
  color: var(--text-dim);
  max-width: 52ch;
  font-size: 1.05rem;
}
.stage-line strong { color: var(--text); }

/* Build-up: lines fade in one after another as the pinned panel's
   wrapper scrolls past. Browsers without scroll-driven animations
   (and reduced-motion users) just see the lines. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .stage-line {
      opacity: 0;
      transform: translateY(14px);
      animation: stage-line-in linear both;
      animation-timeline: --stage;
    }
    .stage-line:nth-child(1) { animation-range: cover 25% cover 38%; }
    .stage-line:nth-child(2) { animation-range: cover 36% cover 49%; }
    .stage-line:nth-child(3) { animation-range: cover 47% cover 60%; }
  }
}
@keyframes stage-line-in {
  to { opacity: 1; transform: none; }
}

/* ---------- Pricing page ---------- */

.pricing-hero { padding: 5.5rem 0 3.5rem; }
.pricing-hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); max-width: 18ch; }
.pricing-hero p { margin-top: 1.25rem; color: var(--text-dim); max-width: 62ch; }

.pricing-cta { border-top: 1px solid var(--line); }
.pricing-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.pricing-cta h2 { max-width: 24ch; }

/* ---------- Gallery ---------- */

.gallery { padding: 6.5rem 0; }
.gallery-head { margin-bottom: 2rem; }
.gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - 1200px) / 2 + 24px)) 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.gallery-track img {
  flex: 0 0 min(440px, 82vw);
  height: 330px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

/* ---------- FAQ ---------- */

.faq { background: var(--bg-sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6.5rem 0; }
.faq-grid {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 4rem;
  align-items: start;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.3rem 2.5rem 1.3rem 0;
  font-weight: 600;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 0 1.3rem; color: var(--text-dim); max-width: 60ch; }

/* ---------- Quote ---------- */

.quote { padding: 6.5rem 0; }
.quote-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 4rem;
  align-items: start;
}
.quote-copy p { margin-top: 1rem; color: var(--text-dim); max-width: 44ch; }
.quote-copy .eyebrow { margin-bottom: 1rem; }
.quote-alt a { white-space: nowrap; }

.quote-form {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: #3a4150; }
.field textarea { resize: vertical; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-success, .form-error {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}
.form-success { background: #12241a; border: 1px solid #1e4630; color: #9fd8b4; }
.form-error { background: #2a1517; border: 1px solid #57262b; color: #eda4ab; }

/* ---------- Footer ---------- */

.footer { background: var(--bg-sunken); border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem 24px 3rem;
}
.footer-logo { height: 64px; width: auto; }
.footer h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}
.footer p { color: var(--text-dim); }
.footer-tag { margin-top: 0.8rem; max-width: 34ch; }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.footer-base a { color: var(--text-dim); }
.footer-base a:hover { color: var(--text); }

/* ---------- Reveal motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .experience-grid, .faq-grid, .quote-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-inner { min-height: calc(100dvh - 68px); padding-top: 3rem; padding-bottom: 2rem; }
  .hero-copy { margin: auto 0; }
  .hero-stats { gap: 1rem; padding-top: 1.25rem; }
  .stat-label { font-size: 0.8rem; }
  .stage-copy { padding-bottom: 3rem; }
  .process { padding-top: 4rem; }
  .process-head { padding-bottom: 2rem; }
  .pricing-hero { padding: 3.5rem 0 2.5rem; }
  .gallery { padding: 4rem 0; }
  .experience-media { position: static; }
  .package-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .package-featured { grid-row: auto; }
  .stats-grid { grid-template-columns: 1fr; gap: 1.75rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .packages, .experience, .process, .faq, .quote { padding: 4rem 0; }
  .addon-grid { grid-template-columns: 1fr; }
  .brand img { height: 36px; }
  .footer-logo { height: 52px; }
  .gallery { padding-bottom: 4rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 24px 1rem;
  }
  .nav-links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  body.nav-open .nav-links { display: flex; }
  .nav-cta { margin-left: auto; }
  .nav-toggle {
    display: grid;
    gap: 5px;
    background: none;
    border: 0;
    padding: 8px 4px;
    cursor: pointer;
  }
  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.2s var(--ease);
  }
  body.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}
