/* ============================================================
   Graze Tech — Homepage (world-class landing) styles
   Loaded only on index.html, in addition to styles.css.
   Brand: forest green #007a13 + signal red #c71006 on clean white.
   ============================================================ */

.home {
  --hx-green: #007a13;
  --hx-green-deep: #04340f;
  --hx-green-soft: #0c8a22;
  --hx-red: #c71006;
  --hx-ink: #14201a;
  --hx-muted: #5c6960;
  --hx-line: rgba(4, 52, 15, 0.1);
}

.home main {
  overflow-x: clip;
}

/* Reveal-on-scroll primitives (richer than base) */
.home .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.home .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.home [data-delay="1"] { transition-delay: 0.08s; }
.home [data-delay="2"] { transition-delay: 0.16s; }
.home [data-delay="3"] { transition-delay: 0.24s; }
.home [data-delay="4"] { transition-delay: 0.32s; }

/* ===================== HERO ===================== */
.h-hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  margin-top: var(--nav-h);
  padding: 0 0 clamp(56px, 8vh, 88px);
  color: #fff;
}

.h-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.h-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 52, 15, 0.35) 0%, rgba(4, 52, 15, 0.15) 40%, rgba(4, 52, 15, 0.88) 100%),
    radial-gradient(90% 70% at 10% 90%, rgba(0, 122, 19, 0.25), transparent 55%);
}

.h-hero__inner {
  position: relative;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.h-hero__content {
  max-width: 720px;
}

.h-hero__title {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 4.8vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}

.h-hero__static {
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.h-hero__typed {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  min-height: 1.1em;
  opacity: 0;
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.h-hero__typed-text {
  display: inline-block;
  white-space: nowrap;
  color: var(--hx-red, #c71006);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.48s ease;
  will-change: opacity, transform, filter;
}

.h-hero__typed.is-exiting .h-hero__typed-text {
  opacity: 0;
  transform: translateY(-14px) scale(0.98);
  filter: blur(5px);
}

.h-hero__cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  vertical-align: -0.05em;
  background: var(--hx-red, #c71006);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(199, 16, 6, 0.45);
  animation: heroCursorPulse 1.05s ease-in-out infinite;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.h-hero__typed.is-exiting .h-hero__cursor {
  opacity: 0.25;
  transform: scaleY(0.6);
}

.h-hero__typed.is-done .h-hero__cursor {
  animation: heroCursorPulse 1.35s ease-in-out infinite;
}

.h-hero__tagline {
  max-width: 520px;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.h-hero__tagline.text-split {
  opacity: 1;
}

.h-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  opacity: 0;
  animation: heroFadeUp 0.75s ease 0.7s forwards;
}

@keyframes heroCursorPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.35; transform: scaleY(0.88); }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ===================== MARQUEE ===================== */
.h-marquee {
  background: var(--hx-green-deep);
  color: #fff;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}
.h-marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  padding: 18px 0;
  animation: marquee 28s linear infinite;
}
.h-marquee:hover .h-marquee__track { animation-play-state: paused; }
.h-marquee span {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
}
.h-marquee span::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hx-red);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ===================== SECTION SHELL ===================== */
.h-section {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 120px) 0;
}
.h-head {
  max-width: 760px;
  margin-bottom: 52px;
}
.h-head.center {
  margin-inline: auto;
  text-align: center;
}
.h-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0, 122, 19, 0.1);
  color: var(--hx-green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.h-kicker::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hx-red);
}
.h-title {
  margin: 0;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--hx-red);
}
.h-title .em { color: var(--hx-green); }
.h-sub {
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--hx-muted);
}

#pillars {
  padding-top: clamp(48px, 6vw, 80px);
}

/* ===================== PILLARS ===================== */
.h-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.h-pillar {
  position: relative;
  padding: 34px 30px 32px;
  border: 1px solid var(--hx-line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(4, 52, 15, 0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.h-pillar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--hx-green), var(--hx-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.h-pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 64px rgba(4, 52, 15, 0.13);
  border-color: rgba(0, 122, 19, 0.25);
}
.h-pillar:hover::before { transform: scaleX(1); }
.h-pillar__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 122, 19, 0.14), rgba(199, 16, 6, 0.12));
  color: var(--hx-green);
}
.h-pillar__icon svg {
  width: 30px; height: 30px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.h-pillar h3 {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 1.32rem;
  color: var(--hx-ink);
}
.h-pillar p {
  margin: 0 0 18px;
  color: var(--hx-muted);
  line-height: 1.6;
}
.h-pillar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--hx-green);
  font-weight: 700;
  text-decoration: none;
}
.h-pillar a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.h-pillar a:hover svg { transform: translateX(4px); }

/* ===================== FEATURE SPLIT ===================== */
.h-feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.h-feature__media {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(4, 52, 15, 0.2);
  aspect-ratio: 5 / 4;
}
.h-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.h-feature__media:hover img { transform: scale(1.06); }
.h-feature__badge {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(4, 52, 15, 0.2);
}
.h-feature__badge strong {
  font-family: "Sora", sans-serif;
  font-size: 1.7rem;
  color: var(--hx-green);
  line-height: 1;
}
.h-feature__badge span { font-size: 0.84rem; color: var(--hx-muted); }

/* ===================== IMPACT STATS ===================== */
.h-impact {
  background:
    linear-gradient(135deg, rgba(4, 52, 15, 0.96), rgba(0, 122, 19, 0.92)),
    radial-gradient(circle at 88% 12%, rgba(199, 16, 6, 0.4), transparent 40%);
  color: #fff;
}

.h-impact .h-impact__grid {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.h-stat strong {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
}

.h-stat strong .suffix {
  color: #8ef0a4;
}

.h-stat > span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

/* ===================== EXPLORE CARDS ===================== */
.h-explore {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.h-xcard {
  position: relative;
  display: block;
  min-height: 360px;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 22px 56px rgba(4, 52, 15, 0.16);
  isolation: isolate;
}
.h-xcard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.h-xcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 52, 15, 0) 30%, rgba(4, 52, 15, 0.85) 100%);
}
.h-xcard:hover img { transform: scale(1.08); }
.h-xcard__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px;
}
.h-xcard__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--hx-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.h-xcard h3 {
  margin: 0 0 6px;
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
}
.h-xcard p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.h-xcard__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-weight: 700;
}
.h-xcard__more svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.h-xcard:hover .h-xcard__more svg { transform: translateX(4px); }

/* ===================== SUSTAINABILITY ===================== */
.h-leaf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.h-leaf__card {
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--hx-line);
  background: linear-gradient(180deg, #ffffff, #f4fbf2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.h-leaf__card:hover { transform: translateY(-5px); box-shadow: 0 26px 56px rgba(4, 52, 15, 0.1); }
.h-leaf__num {
  font-family: "Sora", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(0, 122, 19, 0.25);
  line-height: 1;
}
.h-leaf__card h3 { margin: 14px 0 8px; font-family: "Sora", sans-serif; font-size: 1.2rem; color: var(--hx-ink); }
.h-leaf__card p { margin: 0; color: var(--hx-muted); line-height: 1.6; }

/* ===================== CTA BANNER ===================== */
.h-cta {
  position: relative;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto clamp(70px, 9vw, 120px);
  padding: clamp(40px, 6vw, 72px);
  border-radius: 34px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.h-cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.h-cta::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, rgba(4, 52, 15, 0.9), rgba(0, 122, 19, 0.82));
}
.h-cta h2,
.h-cta p,
.h-cta__btns {
  position: relative;
  z-index: 1;
}

.h-cta h2 {
  margin: 0 auto 14px;
  max-width: 720px;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.h-cta p {
  margin: 0 auto 30px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}
.h-cta__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .h-pillars,
  .h-explore,
  .h-leaf { grid-template-columns: 1fr 1fr; }
  .h-feature { grid-template-columns: 1fr; gap: 34px; }
  .h-impact .h-impact__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .h-hero {
    padding-bottom: 48px;
    min-height: min(88svh, 640px);
  }

  .h-hero__title {
    font-size: clamp(1.15rem, 5.2vw, 2.35rem);
    letter-spacing: -0.02em;
  }

  .h-hero__tagline {
    max-width: none;
  }

  .h-pillars,
  .h-explore,
  .h-leaf { grid-template-columns: 1fr; }
  .h-hero__cta,
  .h-cta__btns {
    flex-direction: column;
    align-items: stretch;
  }

  .h-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .reveal { opacity: 1; transform: none; transition: none; }
  .h-hero__static,
  .h-hero__typed,
  .h-hero__cta { animation: none; opacity: 1; transform: none; }
  .h-hero__typed-text { transition: none; filter: none; }
  .h-hero__cursor { display: none; }
  .h-marquee__track { animation: none; }
}
