/* =========================================================
   EJH Engineering — Global Stylesheet
   --orange / --orange-dark / --orange-light / --cream are
   sampled from the supplied logo.png so the site matches it
   exactly. --slate-* / --paper / --ink are near-neutral tones
   chosen to sit well alongside that orange.
   ========================================================= */

@font-face {
  font-family: 'Gill Sans MT';
  src: url('../fonts/GillSansMT.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Brand palette. Base orange/slate sampled from logo.png, then
     slightly muted (orange) / lightened (slate) per feedback. ---- */
  --orange: #985624;
  --orange-dark: #74421B;
  --orange-light: #B7835C;
  --cream: #FEFFF5;
  --slate-900: #282C33;
  --slate-800: #31363F;
  --slate-700: #3E454F;
  --slate-600: #545C69;
  --paper: #FAF7F4;
  --ink: #1B1D21;
  --white: #FFFFFF;

  --font-display: 'Gill Sans MT', 'Gill Sans', Calibri, 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Gill Sans MT', 'Gill Sans', Calibri, 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;

  --max-width: 1200px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-strong: 0 20px 50px rgba(0,0,0,0.35);
  --ease: cubic-bezier(.22,.68,0,1.01);
  --ease-hinge: cubic-bezier(.3,1.4,.55,1);
}

* , *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------------------------- Buttons ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s ease, color .25s ease;
}

.btn:hover, .btn:focus-visible { transform: translateY(-2px); }

.btn-primary {
  background: var(--white);
  color: var(--orange-dark);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--slate-900);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.btn-dark {
  background: var(--slate-900);
  color: var(--white);
}
.btn-dark:hover, .btn-dark:focus-visible {
  background: var(--orange);
  color: var(--white);
}

/* ---------------------------- Header ---------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.site-header--overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease, background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.site-header--overlay.is-scrolled {
  opacity: 1;
  pointer-events: auto;
}

.site-header.is-scrolled {
  background: rgba(30, 33, 38, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 96px;
  height: auto;
  border-radius: 8px;
}

.brand-name {
  color: var(--white);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand-name span { color: var(--orange-light); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-nav a:not(.btn) {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  position: relative;
  padding: 4px 0;
}
.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s var(--ease);
}
.main-nav a:not(.btn):hover::after,
.main-nav a:not(.btn):focus-visible::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------------------------- Hero ---------------------------- */

.hero {
  /* Orange wash over a photo — matches --orange (#985624 = 152,86,36) at
     high opacity so the photo only just shows through behind the letters. */
  background:
    linear-gradient(rgba(152,86,36,0.88), rgba(152,86,36,0.88)),
    url('/assets/img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-container {
  width: 100%;
  padding-top: 130px;
  padding-bottom: 70px;
}

/* ---- Interactive EJH letters ---- */

.value-picker {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(8px, 3vw, 40px);
}

.value-unit {
  position: relative;
  flex: 1 1 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: value-unit-in 1.4s var(--ease) forwards;
}
.value-unit:nth-child(1) { animation-delay: .2s; }
.value-unit:nth-child(2) { animation-delay: .55s; }
.value-unit:nth-child(3) { animation-delay: .9s; }

@keyframes value-unit-in {
  from { opacity: 0; transform: translateY(46px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  text-align: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  margin: clamp(24px, 4vw, 48px) 0 0;
  opacity: 0;
  animation: value-unit-in 1.4s var(--ease) forwards;
  animation-delay: 1.15s;
}

.value-trigger {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  height: clamp(260px, 44vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--white);
  perspective: 1200px;
}

.value-trigger .letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 20vw, 15rem);
  line-height: 1;
  letter-spacing: -0.02em;
  transform-style: preserve-3d;
  transform-origin: 15% center;
  transition: transform .55s var(--ease-hinge), text-shadow .3s ease, filter .3s ease;
  text-shadow: 7px 7px 0 var(--orange-dark);
  will-change: transform;
}

.value-unit.is-hovered .letter,
.value-unit:focus-within .letter,
.value-unit.is-active .letter {
  transform: translateX(22%) translateZ(40px) rotateY(78deg);
  text-shadow: 0 0 0 rgba(135,69,19,0);
  filter: drop-shadow(14px 14px 0 rgba(0,0,0,0.22));
}

.value-trigger:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 6px;
  border-radius: 12px;
}

.value-panel {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--slate-700), var(--slate-900));
  border-radius: var(--radius);
  padding: 48px 42px;
  color: var(--white);
  text-align: left;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px) scale(0.96);
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.value-unit.is-hovered .value-panel,
.value-unit:focus-within .value-panel,
.value-unit.is-active .value-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s linear 0s;
}

.value-panel > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.value-unit.is-hovered .value-panel > *,
.value-unit:focus-within .value-panel > *,
.value-unit.is-active .value-panel > * {
  opacity: 1;
  transform: translateY(0);
}
.value-panel > *:nth-child(1) { transition-delay: .08s; }
.value-panel > *:nth-child(2) { transition-delay: .14s; }
.value-panel > *:nth-child(3) { transition-delay: .2s; }

.value-panel .value-heading {
  font-size: 1.7rem;
  margin: 0;
}
.value-panel .value-heading strong {
  color: var(--orange-light);
  font-weight: 700;
}

.value-panel p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.value-panel-foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.emboss-icon {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--slate-900), var(--slate-700));
  box-shadow:
    inset 5px 5px 10px rgba(0,0,0,0.65),
    inset -4px -4px 8px rgba(255,255,255,0.09),
    0 3px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.emboss-icon svg {
  width: 36px;
  height: 36px;
  stroke: rgba(255,255,255,0.8);
  fill: none;
  stroke-width: 1.6;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.6)) drop-shadow(-1px -1px 1px rgba(255,255,255,0.05));
}

.value-panel .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--orange-light);
  font-size: 1.05rem;
}
.value-panel .learn-more svg {
  width: 18px; height: 18px;
  transition: transform .25s var(--ease);
}
.value-panel .learn-more:hover svg { transform: translateX(4px); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--white);
  opacity: 0.7;
  animation: scroll-cue-bounce 2.2s ease-in-out infinite;
}
.scroll-cue svg { width: 26px; height: 26px; display: block; }
.scroll-cue:hover, .scroll-cue:focus-visible { opacity: 1; }

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Reduced motion / touch-first fallback */
@media (prefers-reduced-motion: reduce) {
  .value-trigger .letter,
  .value-panel,
  .scroll-cue { transition: none !important; animation: none !important; }
  .value-unit,
  .hero-tagline { opacity: 1 !important; animation: none !important; transform: none !important; }
}

@media (max-width: 860px) {
  .value-picker {
    flex-direction: column;
    gap: 18px;
  }
  .value-unit { max-width: 100%; }
  .value-trigger { height: 180px; perspective: none; }
  .value-trigger .letter { font-size: clamp(5.5rem, 28vw, 8rem); }
  .value-unit.is-hovered .letter,
  .value-unit:focus-within .letter,
  .value-unit.is-active .letter {
    transform: translateX(0) translateZ(0) rotate(0deg) scale(0.92);
  }
  .value-panel {
    position: relative;
    inset: auto;
    margin-top: 10px;
    transform: translateY(-8px);
    display: none;
  }
  .value-unit.is-active .value-panel {
    display: flex;
    transform: translateY(0);
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------- Intro strip ---------------------------- */

.intro {
  background: var(--paper);
  padding: 90px 0;
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.intro-media img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--slate-900);
}
.intro p {
  font-size: 1.08rem;
  color: var(--slate-700);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}
.stat {
  min-width: 120px;
}
.stat .num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--orange);
  display: block;
}
.stat .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-600);
}

/* ---------------------------- Services ---------------------------- */

.services {
  background: var(--slate-900);
  color: var(--white);
  padding: 90px 0;
}

.section-heading {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}
.section-heading h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.section-heading p {
  color: rgba(255,255,255,0.75);
}
.services .section-heading p { color: rgba(255,255,255,0.75); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.service-card {
  background: linear-gradient(160deg, var(--orange), var(--orange-dark));
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-card:hover, .service-card:focus-within {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon svg {
  width: 30px; height: 30px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.6;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--white);
}
.service-card p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0;
}

/* ---------------------------- Gallery ---------------------------- */

.gallery {
  background: var(--paper);
  padding: 70px 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.gallery-item {
  margin: 0;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gallery-item:hover img {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}
.gallery-item figcaption {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--slate-900);
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------------------------- CTA ---------------------------- */

.cta {
  background: var(--paper);
  padding: 90px 0;
  text-align: center;
}
.cta h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  color: var(--slate-900);
}
.cta p {
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--slate-700);
  font-size: 1.08rem;
}
.cta .btn-dark {
  padding: 16px 34px;
  font-size: 1.05rem;
}

/* ---------------------------- Footer ---------------------------- */

.site-footer {
  background: var(--slate-900);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 26px;
  border-top: 4px solid var(--orange);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand-name { display: block; margin-bottom: 10px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--orange-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

/* ---------------------------- Value detail pages ---------------------------- */

.page-hero {
  background: linear-gradient(155deg, var(--slate-800), var(--slate-900));
  color: var(--white);
  padding: 160px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero .big-letter {
  font-size: clamp(6rem, 18vw, 12rem);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  text-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.page-hero .breadcrumb {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 26px;
}
.page-hero .breadcrumb a:hover { color: var(--orange-light); }

.value-detail {
  max-width: 820px;
  margin: -50px auto 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  padding: 50px clamp(24px, 5vw, 64px);
  position: relative;
}
.value-detail h2 {
  color: var(--slate-900);
  font-size: 1.5rem;
  margin-top: 1.6em;
}
.value-detail h2:first-child { margin-top: 0; }
.value-detail p { color: var(--slate-700); font-size: 1.05rem; }

.related-values {
  background: var(--paper);
  padding: 70px 0;
}
.related-values h3 {
  text-align: center;
  margin-bottom: 34px;
  color: var(--slate-900);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease);
}
.related-card:hover { transform: translateY(-6px); }
.related-card .letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--orange);
}
.related-card h4 { margin: 8px 0; color: var(--slate-900); }
.related-card p { font-size: 0.9rem; color: var(--slate-600); margin: 0; }

/* ---------------------------- Responsive nav ---------------------------- */

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 92px 0 0 0;
    background: var(--slate-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 20px; }
  .main-nav .btn { margin-top: 20px; }
}
