/* ==========================================================================
   ECHO CONSTRUCTION - styles.css
   Commercial-GC brand. Navy / near-black base, dark-red accent,
   Archivo display + Inter body.
   ========================================================================== */

/* ----------------------------- Design tokens ----------------------------- */
:root {
  /* palette */
  --bg:        #0a0e17;   /* near-black base            */
  --bg-2:      #0f1828;   /* raised surface             */
  --bg-3:      #15223a;   /* card surface               */
  --line:      rgba(255,255,255,0.10);
  --line-2:    rgba(255,255,255,0.16);
  --text:      #eef1f6;   /* warm off-white             */
  --muted:     #9aa6b6;   /* secondary text             */
  --muted-2:   #6c7789;   /* tertiary / fine print      */
  --accent:    #b22334;   /* construction orange        */
  --accent-2:  #d23a4b;   /* hover / lighter            */
  --accent-ink:#ffffff;   /* text on accent             */

  /* type */
  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  /* metrics */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --radius-lg: 8px;
  --header-h: 76px;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------- Reset / base ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: var(--radius);
  font-weight: 600; z-index: 200; transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* ----------------------------- Typography -------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }

.section__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text);
}

.accent-text { color: var(--accent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.eyebrow__rule { width: 28px; height: 2px; background: var(--accent); display: inline-block; }
.eyebrow--light { color: var(--accent-2); }

/* ----------------------------- Buttons ----------------------------------- */
.btn {
  --pad-y: .85rem; --pad-x: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-2); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--text); background: rgba(255,255,255,0.04); }

.btn--sm { --pad-y: .6rem; --pad-x: 1.1rem; font-size: .85rem; }
.btn--lg { --pad-y: 1.05rem; --pad-x: 2.1rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--accent);
  transition: gap .2s var(--ease);
}
.link-arrow:hover { gap: .85rem; }

/* ----------------------------- Header ------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(8,14,26,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; gap: 1.5rem; width: 100%; }

/* brand / logo */
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand__logo { height: 40px; width: auto; display: block; }
.brand--footer .brand__logo { height: 48px; }
.brand__mark { color: var(--accent); width: 38px; height: 38px; flex: none; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__type { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 900; font-size: 1.32rem;
  letter-spacing: .02em; color: var(--text);
}
.brand__sub {
  font-family: var(--font-body); font-weight: 600; font-size: .58rem;
  letter-spacing: .42em; color: var(--muted); margin-top: 3px;
}

/* nav */
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 2rem; }
.nav__list a {
  position: relative; font-size: .92rem; font-weight: 500; color: var(--muted);
  padding: .25rem 0; transition: color .2s var(--ease);
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav__list a:hover { color: var(--text); }
.nav__list a:hover::after { width: 100%; }

.header__cta { margin-left: .25rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px; margin-left: auto;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------- Hero -------------------------------------- */
.hero {
  position: relative; min-height: clamp(560px, 100svh, 1000px);
  display: flex; align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  background: #131c2e url('../images/hero.jpg') center / cover no-repeat;
  transform: scale(1.04);
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,14,26,0.94) 0%, rgba(8,14,26,0.72) 38%, rgba(8,14,26,0.32) 70%, rgba(8,14,26,0.55) 100%),
    linear-gradient(0deg, rgba(8,14,26,0.85) 0%, rgba(8,14,26,0) 45%);
}
.hero__inner { position: relative; padding-block: clamp(3rem, 8vh, 6rem); }
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
  max-width: 16ch;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--muted); max-width: 54ch; margin-bottom: 2.2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem;
  padding-top: 1.75rem; border-top: 1px solid var(--line);
  max-width: 640px;
}
.hero__trust li {
  position: relative; padding-left: 1.4rem;
  font-size: .92rem; color: var(--muted); font-weight: 500;
}
.hero__trust li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; background: var(--accent); border-radius: 50%;
}

/* ----------------------------- Stats ------------------------------------- */
.stats { background: var(--bg-2); border-block: 1px solid var(--line); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
}
.stat { padding: .5rem clamp(1rem, 2vw, 2rem); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 3.25rem); color: var(--text);
  letter-spacing: -0.03em; line-height: 1;
}
.stat__label { display: block; margin-top: .55rem; font-size: .86rem; color: var(--muted); letter-spacing: .01em; }

/* ----------------------------- Section shell ----------------------------- */
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-2); }
.section__head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section__head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.section__intro { margin-top: 1.1rem; color: var(--muted); font-size: 1.06rem; }

/* ----------------------------- Service cards ----------------------------- */
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.9rem 1.75rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: #1b2942; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: var(--radius);
  background: rgba(178,35,52,0.12); color: var(--accent);
  margin-bottom: 1.25rem;
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: 1.28rem; margin-bottom: .55rem; }
.card__body { color: var(--muted); font-size: .98rem; }

/* ----------------------------- Split / craft ----------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.split__media {
  background: #131c2e url('../images/craft.jpg') center / cover no-repeat;
  min-height: 440px;
  position: relative;
}
.split__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,14,26,0) 60%, var(--bg) 100%), linear-gradient(0deg, rgba(178,35,52,0.10), rgba(8,14,26,0));
}
.split__body { display: flex; align-items: center; background: var(--bg); }
.split__content {
  max-width: 560px; margin-inline: auto;
  padding: clamp(3rem, 6vw, 5.5rem) var(--gutter);
}
.split__content p { color: var(--muted); margin-bottom: 1.5rem; }

.ticks { display: grid; gap: .85rem; margin-bottom: 2rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--text); font-weight: 500; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .15rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 13px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ----------------------------- Sectors ----------------------------------- */
.sectors { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.sector {
  padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-3); transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.section--alt .sector { background: var(--bg); }
.sector:hover { transform: translateY(-4px); border-color: var(--accent); }
.sector__icon { display: inline-flex; color: var(--accent); margin-bottom: 1rem; }
.sector__icon svg { width: 30px; height: 30px; }
.sector__title { font-size: 1.18rem; margin-bottom: .45rem; }
.sector__body { color: var(--muted); font-size: .94rem; }

/* ----------------------------- Work grid --------------------------------- */
.work-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.project {
  position: relative; min-height: 340px;
  border-radius: var(--radius-lg); overflow: hidden;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  isolation: isolate;
}
.project__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(6,11,20,0.92) 8%, rgba(6,11,20,0.30) 55%, rgba(6,11,20,0.12) 100%);
  transition: background .3s var(--ease);
}
.project::before {
  content: ""; position: absolute; inset: 0;
  background: var(--accent); opacity: 0; mix-blend-mode: multiply;
  transition: opacity .3s var(--ease);
}
.project:hover .project__overlay { background: linear-gradient(0deg, rgba(6,11,20,0.95) 12%, rgba(6,11,20,0.45) 65%, rgba(6,11,20,0.2) 100%); }
.project:hover::before { opacity: .14; }
.project__meta { position: relative; padding: 1.6rem; transform: translateY(0); transition: transform .3s var(--ease); }
.project:hover .project__meta { transform: translateY(-4px); }
.project__tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-2);
  background: rgba(178,35,52,0.14); padding: .3rem .7rem; border-radius: 999px;
  margin-bottom: .8rem;
}
.project__name { font-size: 1.4rem; margin-bottom: .25rem; }
.project__detail { color: var(--muted); font-size: .9rem; font-family: var(--font-body); }

/* ----------------------------- Process ----------------------------------- */
.process__layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.process__figure { margin-top: 2.25rem; }
.process__photo {
  background: #131c2e url('../images/preconstruction.jpg') center / cover no-repeat;
  border-radius: var(--radius-lg); aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}
.steps { display: grid; gap: 0; }
.step { display: flex; gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; padding-top: 0; }
.step__num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--accent); line-height: 1; flex: none; width: 2.5rem;
}
.step__title { font-size: 1.3rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .98rem; }

/* ----------------------------- CTA band ---------------------------------- */
.cta-band {
  position: relative; isolation: isolate;
  background: #0f1828 url('../images/cta.jpg') center / cover no-repeat;
  padding-block: clamp(4.5rem, 9vw, 7.5rem); text-align: center;
}
.cta-band__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,14,26,0.78), rgba(8,14,26,0.88));
}
.cta-band__title { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.cta-band__text { color: var(--muted); font-size: 1.1rem; max-width: 48ch; margin: 0 auto 2.2rem; }

/* ----------------------------- Focal image bands ------------------------- */
.focal {
  position: relative; isolation: isolate;
  min-height: clamp(420px, 62vh, 660px);
  display: flex; align-items: flex-end;
  background-color: #0f1828;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.focal::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(8,14,26,0.85) 0%, rgba(8,14,26,0.18) 50%, rgba(8,14,26,0.45) 100%);
}
.focal__inner { padding-block: clamp(2.75rem, 8vw, 6rem); }
.focal__title { font-size: clamp(1.9rem, 4.5vw, 3.4rem); max-width: 20ch; }

/* ----------------------------- Contact ----------------------------------- */
.contact__layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.contact__details { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
.contact__details li { display: grid; gap: .2rem; }
.contact__label { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.contact__value { color: var(--text); font-size: 1.04rem; transition: color .2s var(--ease); }
a.contact__value:hover { color: var(--accent); }

.contact__form {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.75rem, 3vw, 2.5rem);
  display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr;
}
.field { display: grid; gap: .45rem; grid-column: 1 / -1; }
.field--half { grid-column: span 1; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .8rem .9rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(178,35,52,0.18);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a2a7ae' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.contact__form .btn--block { grid-column: 1 / -1; margin-top: .25rem; }
.form-status { grid-column: 1 / -1; font-size: .92rem; min-height: 1.2em; margin: 0; }
.form-status.is-ok { color: #6ee7a8; }
.form-status.is-err { color: #ff8b6b; }

/* ----------------------------- Footer ------------------------------------ */
.site-footer { background: #070b14; border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem;
  padding-bottom: 3rem;
}
.brand--footer { margin-bottom: 1.1rem; }
.footer__blurb { color: var(--muted); font-size: .94rem; max-width: 36ch; margin-bottom: 1.25rem; }
.footer__col h4 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted-2); margin-bottom: 1.1rem; font-weight: 600; }
.footer__col ul { display: grid; gap: .7rem; }
.footer__col a, .footer__col li { color: var(--muted); font-size: .95rem; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__bar {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.6rem; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: .85rem;
}
.footer__affil { color: var(--muted-2); }

/* ----------------------------- Reveal animation -------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ----------------------------- Mobile nav -------------------------------- */
@media (max-width: 880px) {
  .header__cta { display: none; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: rgba(8,14,26,0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__list { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.5rem; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list a { display: block; padding: 1rem 0; font-size: 1.05rem; color: var(--text); }
  .nav__list a::after { display: none; }
}

/* ----------------------------- Responsive grids -------------------------- */
@media (max-width: 1024px) {
  .cards, .sectors, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 0; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 280px; }
  .process__layout, .contact__layout { grid-template-columns: 1fr; }
  .cta-band { background-attachment: scroll; }
  .footer__bar { flex-direction: column; gap: .4rem; }
}

@media (max-width: 560px) {
  .cards, .sectors, .work-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact__form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1 / -1; }
  .hero__title { font-size: clamp(1.85rem, 8vw, 3.2rem); letter-spacing: -0.02em; }
  .hero__lede { font-size: 1.02rem; }
  .eyebrow { font-size: .7rem; letter-spacing: .1em; }
}

/* ----------------------------- Reduced motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media { transform: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
