/* =========================================================
   Green Elephant Creative Solution Inc.
   Aesthetic: "Engineered editorial" — aerospace technical
   drawing precision meets refined magazine layout.
   ========================================================= */

:root {
  /* Palette — sampled from the logo */
  --forest: #0F3D2A;
  --brand:  #1B6E4C;
  --mid:    #3E8E63;
  --sage:   #79B083;
  --mist:   #DCEBE0;
  --paper:  #F6F8F5;

  --ink:    #15281D;   /* near-black green for body text */
  --muted:  #4d5f54;
  --line:   #d3ded6;   /* hairline rules */
  --line-dk:rgba(255,255,255,.16);

  --accent: var(--sage);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --r: 14px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain over the whole page */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- Shared typographic atoms ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .55em;
}
.eyebrow--light { color: var(--sage); }
.eyebrow--accent { color: var(--mid); }
.sec-no {
  color: var(--mid);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: .15em .5em;
  font-weight: 700;
}
.eyebrow--light .sec-no { color: var(--sage); }

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--forest);
  margin: 0 0 .6em;
  max-width: 22ch;
}
.section__title--light { color: #fff; }
.section__intro {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0;
}
.section__intro--light { color: var(--mist); }

.btn {
  --pad: .95em 1.6em;
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: var(--pad);
  border-radius: 9px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .35s var(--ease);
}
.btn--accent { background: var(--sage); color: var(--forest); }
.btn--accent:hover { background: #8fc299; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,61,42,.28); }
.btn--ghost { color: var(--mist); border-color: rgba(121,176,131,.6); }
.btn--ghost:hover { border-color: var(--sage); color: #fff; transform: translateY(-2px); }
.btn--full { width: 100%; justify-content: center; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,248,245,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(15,61,42,.06);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: clamp(14px, 2vw, 22px);
  transition: padding-block .3s var(--ease);
}
.is-scrolled .header__inner { padding-block: 11px; }

.brand { display: flex; align-items: center; }
.brand__img { height: 46px; width: auto; transition: height .3s var(--ease); }
.is-scrolled .brand__img { height: 38px; }
.brand__img[data-broken] { display: none; }
.brand__fallback { display: none; align-items: center; gap: .55rem; }
.brand__fallback.show { display: flex; }
.brand__mark { font-size: 1.7rem; line-height: 1; filter: saturate(.7) hue-rotate(40deg); }
.brand__text {
  font-family: var(--serif); font-weight: 600; font-size: 1.18rem;
  line-height: 1; color: var(--forest); display: flex; flex-direction: column; gap: 2px;
}
.brand__text small {
  font-family: var(--mono); font-weight: 500; font-size: .54rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mid);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav > a {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .04em;
  color: var(--ink); position: relative; padding: .2em 0;
}
.nav > a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--brand); transition: width .3s var(--ease);
}
.nav > a:not(.nav__cta):hover::after { width: 100%; }
.nav > a.nav__cta {
  background: var(--forest); color: #fff !important; padding: .72em 1.9em;
  border-radius: 9px; text-transform: uppercase; font-size: .85rem; letter-spacing: .1em;
  line-height: 1; transition: background .3s var(--ease), transform .3s var(--ease);
}
.nav > a.nav__cta:hover { background: var(--brand); transform: translateY(-1px); }

/* Hamburger + close + backdrop — hidden on desktop, shown in mobile media query */
.nav-open, .nav-close, .nav-backdrop { display: none; }
.nav-open {
  flex-direction: column; gap: 5px; padding: 8px; margin-right: -8px; cursor: pointer;
}
.nav-open span { width: 26px; height: 2px; background: var(--forest); border-radius: 2px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  color: #fff;
  padding-top: clamp(70px, 12vh, 130px);
  padding-bottom: 0;
  overflow: hidden;
  background: var(--forest);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(15,61,42,.72) 0%, rgba(15,61,42,.88) 60%, rgba(15,61,42,.97) 100%),
    linear-gradient(125deg, var(--forest) 0%, #134d36 45%, var(--brand) 100%),
    url("../images/hero-aerospace.jpg");
  background-size: cover, cover, cover;
  background-position: center, center, center 30%;
  background-blend-mode: normal, luminosity, normal;
}
/* blueprint grid overlay */
.hero__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(121,176,131,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121,176,131,.10) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(120% 100% at 70% 0%, #000 35%, transparent 80%);
          mask-image: radial-gradient(120% 100% at 70% 0%, #000 35%, transparent 80%);
}
.hero__inner { position: relative; z-index: 2; padding-bottom: clamp(48px, 8vh, 90px); }
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6.6vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin: 0 0 .55em;
  max-width: 16ch;
}
.hero__title em { font-style: italic; color: var(--sage); font-weight: 400; }
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--mist);
  max-width: 56ch; margin: 0 0 1.1em;
}
.hero__lead strong { color: #fff; font-weight: 600; }
.hero__sub {
  font-family: var(--mono); font-size: .92rem; line-height: 1.6;
  color: var(--sage); max-width: 52ch; margin: 0 0 2.2em;
  padding-left: 1em; border-left: 2px solid rgba(121,176,131,.5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* hero credibility strip */
.hero__strip { position: relative; z-index: 2; }
.dimline {
  height: 1px; background: var(--line-dk); position: relative; margin-bottom: 1.4rem;
}
.dimline::before, .dimline::after {
  content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--sage);
}
.dimline::before { left: 0; }
.dimline::after { right: 0; }
.stats {
  list-style: none; margin: 0; padding: 0 0 clamp(36px, 6vh, 64px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px);
}
.stats li { display: flex; flex-direction: column; gap: .35rem; }
.stats__num {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #fff; line-height: 1;
}
.stats__label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage);
}

/* =========================================================
   SECTION RHYTHM
   ========================================================= */
.section { padding-block: clamp(72px, 11vh, 140px); position: relative; }
.section__head { margin-bottom: clamp(40px, 6vh, 72px); }

/* ---------- ABOUT ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "head media" "body media";
  gap: clamp(28px, 5vw, 72px) clamp(28px, 6vw, 90px);
  align-items: start;
}
.about__head { grid-area: head; }
.about__body { grid-area: body; align-self: start; }
.about__body p { margin: 0 0 1.15em; color: var(--muted); }
.about__body p:first-child { font-size: 1.16rem; color: var(--ink); }
.about__media { grid-area: media; margin: 0; position: sticky; top: 100px; }
.about__photo {
  aspect-ratio: 4/5; border-radius: var(--r); border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15,61,42,.12), rgba(15,61,42,.42)),
    url("../images/about-engineering.jpg");
  background-size: cover; background-position: center;
  box-shadow: 0 30px 60px -28px rgba(15,61,42,.45);
}
.about__media figcaption {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mid); margin-top: 1rem;
  display: flex; align-items: center; gap: .6em;
}
.tick { width: 22px; height: 1px; background: var(--mid); position: relative; }
.tick::after { content: ""; position: absolute; right: 0; top: -3px; width: 1px; height: 7px; background: var(--mid); }

/* ---------- EXPERTISE ---------- */
.expertise { background: linear-gradient(180deg, var(--paper), #eef3ee); border-top: 1px solid var(--line); }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 22px);
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(24px, 2.4vw, 34px);
  position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--sage));
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -26px rgba(15,61,42,.4); border-color: var(--sage); }
.card:hover::before { transform: scaleX(1); }
.card:nth-child(4), .card:nth-child(5) { grid-column: span 1; }
.card__icon {
  display: inline-flex; width: 56px; height: 56px; margin-bottom: 1.3rem;
  align-items: center; justify-content: center;
  border-radius: 12px; background: var(--mist); color: var(--brand);
  transition: background .4s var(--ease), color .4s var(--ease);
}
.card:hover .card__icon { background: var(--brand); color: #fff; }
.card__icon svg { width: 30px; height: 30px; }
.card__title {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  color: var(--forest); margin: 0 0 .5em; line-height: 1.15;
}
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- SERVICES ---------- */
.services { background: var(--forest); color: #fff; }
.services .section__title { color: #fff; }
.services__list { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line-dk); }
.service {
  display: grid; grid-template-columns: 120px 1fr; gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 3.4vw, 42px) 0;
  border-bottom: 1px solid var(--line-dk);
  align-items: baseline;
  transition: background .35s var(--ease), padding-inline .35s var(--ease);
}
.service:hover { background: rgba(121,176,131,.07); padding-inline: clamp(12px,2vw,28px); }
.service__no { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; color: var(--sage); }
.service__body h3 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin: 0 0 .35em; color: #fff; line-height: 1.1; letter-spacing: -.01em;
  transition: color .3s var(--ease);
}
.service:hover .service__body h3 { color: var(--sage); }
.service__body p { margin: 0; color: var(--mist); max-width: 62ch; }

/* ---------- WHY ---------- */
.why { background: linear-gradient(135deg, #0c3324, var(--brand)); color: #fff; position: relative; overflow: hidden; }
.why__grid-bg {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(90% 80% at 90% 10%, #000, transparent 75%);
          mask-image: radial-gradient(90% 80% at 90% 10%, #000, transparent 75%);
}
.why .wrap { position: relative; z-index: 1; }
.why__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px);
}
.why__item {
  padding: clamp(24px,2.6vw,34px); border: 1px solid var(--line-dk); border-radius: var(--r);
  background: rgba(255,255,255,.03); position: relative;
  transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.why__item:hover { transform: translateY(-4px); background: rgba(255,255,255,.06); border-color: rgba(121,176,131,.5); }
.why__k {
  font-family: var(--mono); font-size: .8rem; color: var(--sage); letter-spacing: .1em;
  display: block; margin-bottom: 1rem;
}
.why__item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 0 0 .4em; color: #fff; }
.why__item p { margin: 0; color: var(--mist); }

/* ---------- CONTACT ---------- */
.contact { background: var(--forest); color: #fff; position: relative; overflow: hidden; }
.contact__grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(rgba(121,176,131,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121,176,131,.08) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(100% 90% at 0% 100%, #000, transparent 70%);
          mask-image: radial-gradient(100% 90% at 0% 100%, #000, transparent 70%);
}
.contact__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.contact__title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08; letter-spacing: -.015em; color: #fff; margin: 0 0 2rem; max-width: 18ch;
}
.contact__card { border-top: 1px solid var(--line-dk); padding-top: 1.6rem; }
.contact__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 0; }
.contact__role { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); margin: .3rem 0 1rem; }
.contact__email {
  font-family: var(--mono); font-size: 1.05rem; color: #fff; border-bottom: 1px solid var(--sage);
  padding-bottom: 2px; transition: color .3s var(--ease);
}
.contact__email:hover { color: var(--sage); }

.contact__form {
  background: rgba(255,255,255,.04); border: 1px solid var(--line-dk);
  border-radius: var(--r); padding: clamp(24px, 3vw, 38px);
}
.field { margin-bottom: 1.2rem; }
.field label {
  display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage); margin-bottom: .5rem;
}
.field input, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: #fff;
  background: rgba(15,61,42,.5); border: 1px solid var(--line-dk); border-radius: 8px;
  padding: .85em 1em; transition: border-color .3s var(--ease), background .3s var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(220,235,224,.4); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--sage); background: rgba(15,61,42,.7);
  box-shadow: 0 0 0 3px rgba(121,176,131,.18);
}
.form__note { font-family: var(--mono); font-size: .72rem; color: var(--sage); margin: 1rem 0 0; letter-spacing: .04em; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #0a2c1d; color: var(--mist); padding-block: clamp(40px, 6vh, 64px); }
.footer__inner {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.brand--footer .brand__img { height: 40px; background: #fff; padding: 8px 14px; border-radius: 10px; }
.brand--footer .brand__text { color: #fff; }
.footer__meta { font-family: var(--mono); font-size: .8rem; margin: 0; line-height: 1.7; }
.footer__meta a { color: #fff; }
.footer__meta span { color: var(--sage); }
.footer__copy { font-family: var(--mono); font-size: .72rem; color: var(--sage); margin: 0; text-align: right; }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
/* Pure-CSS, no-JS reveal. Content is ALWAYS visible by default; the entrance
   animation is layered on only where scroll-driven timelines are supported,
   so the site degrades gracefully (and works under a strict CSP). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 22%;
    }
    @keyframes reveal-in {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* ---- Contact form: honeypot, status, error + button states ---- */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0 0 4px;
  min-height: 1.2em;
  font-size: 0.9rem;
  font-family: var(--mono, "JetBrains Mono", monospace);
}
/* Status text sits on the dark forest contact background — use light, AA-contrast colors. */
.form-status--ok  { color: var(--mist); }   /* #DCEBE0 on #0F3D2A ≈ 9.9:1 */
.form-status--err { color: #FFB4AB; }        /* soft rose on #0F3D2A ≈ 7.2:1 */

.field.err input,
.field.err textarea {
  border-color: #FFB4AB;   /* visible against the dark form, unlike a dark red */
  outline-color: #FFB4AB;
}

.btn--sent {
  background: #0F3D2A;
  border-color: #0F3D2A;
  color: #fff;
  cursor: default;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 920px) {
  /* Pure-CSS :target overlay menu — no JavaScript required */
  .nav-open { display: flex; z-index: 101; }
  .nav {
    position: fixed; inset: 0; z-index: 100;
    flex-direction: column; align-items: center; justify-content: center; gap: 1.8rem;
    background: rgba(246,248,245,.97); backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .35s var(--ease), visibility .35s var(--ease);
  }
  #menu:target { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav > a { font-size: 1.5rem; }
  .nav-close {
    display: block; position: absolute; top: 18px; right: 26px;
    font-size: 2.6rem; line-height: 1; color: var(--forest); font-weight: 300;
  }
  .nav__cta { margin-top: .4rem; font-size: .9rem !important; }
  .about__grid { grid-template-columns: 1fr; grid-template-areas: "head" "media" "body"; }
  .about__media { position: static; max-width: 460px; }
  .contact__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .cards { grid-template-columns: 1fr; }
  .why__list { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: .4rem; }
  .footer__inner { grid-template-columns: 1fr; text-align: left; }
  .footer__copy { text-align: left; }
}
