/* Enviro Smart Technologies — landing page styles */
/* ---------- Fonts ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("montserrat-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #133c4e;
  --navy-deep: #06283d;
  --green: #95c016;          /* brand green — decorative lines & accents */
  --green-text: #5a7d00;     /* darker green for small text (WCAG AA 4.8:1 on white) */
  --text: #5d6e77;           /* body grey (5.3:1 on white) */
  --line: #e3e8ea;
  --white: #fff;

  --gutter: clamp(1.5rem, 5vw, 6rem);
  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Fluid type — tuned to the 1456px / 390px comps */
  /* --u: 1vw, but shrinks on short screens so the desktop layout always fits the viewport */
  --u: min(1vw, 1.55vh);
  --fs-eyebrow: clamp(.6875rem, calc(.76 * var(--u)), 1rem);
  --fs-h1: clamp(2rem, calc(4.25 * var(--u)), 5.75rem);
  --fs-lead: clamp(.9375rem, calc(1.17 * var(--u)), 1.5rem);
  --fs-small: clamp(.75rem, calc(.84 * var(--u)), 1.0625rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }

.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;
}

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 50%);
  padding: clamp(1.5rem, calc(3.6 * var(--u)), 4.5rem) var(--gutter) clamp(1.25rem, calc(2.8 * var(--u)), 3.5rem);
}

/* Logo */
.brand { display: inline-block; text-decoration: none; }
.brand picture { display: block; }
.brand img { width: clamp(10.5rem, calc(19 * var(--u)), 23.5rem); }

/* Eyebrow */
.eyebrow {
  display: flex; align-items: center; gap: 1rem;
  margin: clamp(1rem, calc(3.4 * var(--u)), 4.5rem) 0 0;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--green-text);
}
.eyebrow::before {
  content: ""; flex: none;
  width: 2.5vw; min-width: 2rem; height: 2px;
  background: var(--green);
}

/* Headline */
h1 {
  margin: clamp(.875rem, calc(2.6 * var(--u)), 3.25rem) 0 0;
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--navy);
  text-wrap: balance;
}
h1 span { display: block; }
h1 span { white-space: nowrap; }
.lead__intro { display: block; }

.lead {
  margin: clamp(.875rem, calc(2 * var(--u)), 2.5rem) 0 0;
  max-width: 26em;
  text-wrap: pretty;
  font-size: var(--fs-lead);
  line-height: 1.65;
}

/* CTA */
.cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5rem;
  min-width: clamp(16rem, 20vw, 25rem);
  min-height: clamp(2.75rem, calc(3.45 * var(--u)), 4.25rem);
  margin-top: clamp(1rem, calc(2.6 * var(--u)), 3.25rem);
  padding: .75rem clamp(1.25rem, 1.4vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-size: var(--fs-lead);
  font-weight: 500;
  text-decoration: none;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.cta svg { flex: none; width: 1.125rem; height: 1.125rem; color: var(--green); transition: transform .25s var(--ease); }
.cta:hover { background: var(--navy-deep); box-shadow: 0 10px 24px -12px rgb(6 40 61 / .6); }
.cta:hover svg, .cta:focus-visible svg { transform: translate(3px, -3px); }

/* Pillars */
.pillars {
  position: relative;
  display: flex; flex-wrap: wrap; gap: .5rem clamp(1.5rem, 3vw, 3.5rem);
  margin: clamp(1rem, calc(3 * var(--u)), 3.75rem) 0 0;
  padding: clamp(.875rem, calc(1.8 * var(--u)), 2.25rem) 0 0;
  list-style: none;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--navy);
}
.pillars::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 2.5vw; min-width: 2rem; height: 2px; background: var(--green);
}

.soon { margin: clamp(.875rem, calc(2.3 * var(--u)), 2.75rem) 0 0; font-size: var(--fs-small); }

/* Interactive cube grid (assets/wave-grid.js) — sits behind content and photo */
.hero__waves {
  position: absolute; inset: 0; z-index: -2;
  display: block; width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  pointer-events: none;            /* pointer is tracked on window; content stays clickable */
}
.hero__waves.is-ready { opacity: 1; }
/* Once the photo is painted onto the cube tops, hide the flat copy (kept as no-JS fallback) */
.hero__media img { transition: opacity 1.2s var(--ease); }
.hero.has-grid-photo .hero__media img { opacity: 0; }
/* Soft veil so copy stays readable over the grid (waves still show through) */
.hero__waves.is-ready + .hero__veil { opacity: 1; }
.hero__veil {
  position: absolute; inset: 0; z-index: -2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  background: linear-gradient(90deg,
    rgb(255 255 255 / .55) 0%,
    rgb(255 255 255 / .45) 30%,
    rgb(255 255 255 / .15) 40%,
    rgb(255 255 255 / 0) 46%);
}

/* Media */
.hero__media {
  position: absolute; z-index: -1;
  inset: 0 0 0 auto;
  width: 58%;
  margin: 0;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 30% 50%;         /* keep in sync with photoFocusDesktop in wave-grid.js */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / .35) 14%, #000 34%);
          mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / .35) 14%, #000 34%);
}
.hero__media figcaption {
  position: absolute; right: 12vw; bottom: clamp(1.5rem, 2.9vw, 3.5rem);
  color: var(--white);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgb(0 0 0 / .45);
}

/* Footer */
.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-inline: var(--gutter);
  padding: clamp(.875rem, calc(1.5 * var(--u)), 1.75rem) 0 max(clamp(.875rem, calc(1.5 * var(--u)), 1.75rem), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--navy); font-weight: 500; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Large desktop: let content breathe ---------- */
/* Desktop / landscape: the page is exactly one screen tall — footer pinned to the bottom,
   no scrollbar. Everything above scales with --u so it fits. (Stacked layouts scroll normally.) */
@media (min-width: 761px) and (min-height: 650px) and (orientation: landscape),
       (min-width: 1025px) and (min-height: 650px) {
  html, body { height: 100%; }
  .page { height: 100vh; height: 100svh; min-height: 0; }
  .hero { min-height: 0; }
}

/* Mid widths: give the copy a little more room */
@media (min-width: 761px) and (max-width: 1100px) {
  .hero__content { width: 54%; }
  .hero__media { width: 52%; }
}

/* ---------- Mobile & portrait tablet: stack ---------- */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .hero { flex-direction: column; align-items: stretch; }

  .hero__content { width: 100%; padding-block: clamp(2.5rem, 7vw, 3.5rem) 0; }
  .brand img { width: clamp(16rem, 40vw, 22rem); max-width: 100%; }
  h1 { font-size: clamp(2.375rem, 7vw, 4rem); }
  h1 span { white-space: normal; }
  .lead { font-size: clamp(1rem, 2.4vw, 1.25rem); }
  .cta { font-size: clamp(1.0625rem, 2.4vw, 1.25rem); }
  .cta { min-height: 3.375rem; gap: 1rem; }

  .lead { max-width: 36ch; }
  .cta { display: flex; width: 100%; max-width: 30rem; }


  .hero__media {
    position: relative; inset: auto; z-index: 0;
    width: 100%;
    margin-top: clamp(1.5rem, 6vw, 2.5rem);
    aspect-ratio: 1420 / 1300;
    max-height: min(75svh, 42rem);
  }
  .hero__media img {
    object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .4) 9%, #000 22%);
            mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .4) 9%, #000 22%);
  }
  .hero__media figcaption { display: none; }
  .hero__veil {
    background: linear-gradient(180deg,
      rgb(255 255 255 / .5) 0%,
      rgb(255 255 255 / .45) 45%,
      rgb(255 255 255 / 0) 62%);
  }

  .site-footer {
    margin: 0;
    padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
    border: 0;
    background: var(--navy);
    color: var(--white);
    font-size: .875rem;
  }
  .site-footer .domain { display: none; }  /* domain is already stated above */
}

/* Phones: match the mobile comp */
@media (max-width: 600px) {
  .pillars { display: none; }
}

/* ---------- Entrance motion (respect user preference) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__content > * { animation: rise .8s var(--ease) both; }
  .hero__content > :nth-child(2) { animation-delay: .06s; }
  .hero__content > :nth-child(3) { animation-delay: .12s; }
  .hero__content > :nth-child(4) { animation-delay: .18s; }
  .hero__content > :nth-child(5) { animation-delay: .24s; }
  .hero__content > :nth-child(n+6) { animation-delay: .3s; }
  .hero__media { animation: fade 1.4s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes fade { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .hero__media, .pillars { display: none; }
  .cta { background: none; color: var(--navy); padding: 0; }
}
