/* Zervinar homepage — v2026 (hero, trust, why-feat, home services/process, sol tabs)
   Loaded only on front page; depends on main.css tokens */

/* Home header starts transparent; homepage.js toggles .scrolled */
.zerv-home .header,
.header--home {
  position: fixed;
  top: var(--proposal-bar-h, 0px);
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  box-shadow: none;
  padding: 14px 0;
}

.zerv-home .header .logo-dark,
.header--home .logo-dark { display: none; }
.zerv-home .header .logo-light,
.header--home .logo-light { display: block; }

.zerv-home .header.scrolled,
.zerv-home .header.is-solid,
.header--home.scrolled,
.header--home.is-solid {
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.zerv-home .header.scrolled .logo-dark,
.zerv-home .header.is-solid .logo-dark,
.header--home.scrolled .logo-dark,
.header--home.is-solid .logo-dark { display: block; }
.zerv-home .header.scrolled .logo-light,
.zerv-home .header.is-solid .logo-light,
.header--home.scrolled .logo-light,
.header--home.is-solid .logo-light { display: none; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--forest, #1E3A34);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0.1) 60%, transparent 78%),
    var(--hero-img, none);
  background-size: auto, auto, cover;
  background-position: center, center, 58% center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  animation: none;
}
.hero-bg--solid {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 40%),
    linear-gradient(105deg, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
}
.hero-bg.is-animating {
  animation: softDrift 22s var(--ease) infinite alternate;
}
@keyframes softDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, 0.4%, 0); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 38%,
    rgba(0, 0, 0, 0.1) 60%,
    transparent 78%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--wrap);
  margin: 0 auto;
  padding: 140px 0 100px;
}

.hero .eyebrow,
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.hero h1,
.hero-title {
  font-size: clamp(40px, 5.5vw, 56px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
  max-width: 14ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero p,
.hero-sub {
  font-size: clamp(18px, 1.5vw, 20px);
  color: rgba(255, 255, 255, 0.88);
  max-width: 650px;
  margin-bottom: 28px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
  line-height: 1.65;
}

.hero-actions,
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero buttons: primary/light white; ghost/outline-white on dark */
.hero .btn-ghost,
.hero .btn-outline-white,
.hero-cta .btn-outline-white {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: transparent;
}
.hero .btn-ghost:hover,
.hero .btn-outline-white:hover,
.hero-cta .btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}
.hero .btn-primary,
.hero .btn-light,
.hero .btn-white,
.hero-cta .btn-white,
.hero-cta .btn-primary {
  background: #fff;
  color: var(--forest);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border: none;
}
.hero .btn-primary:hover,
.hero .btn-light:hover,
.hero .btn-white:hover,
.hero-cta .btn-white:hover,
.hero-cta .btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest-hover);
}

/* ── Trust (WP .trust-bar + v2026 .trust) ── */
.trust,
.trust-bar {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.trust-row,
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
}
.trust-item,
.trust-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 16px;
  text-align: center;
  position: relative;
}
.trust-item:not(:last-child)::after,
.trust-grid > div:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--line);
}
.trust-item strong,
.trust-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--forest);
  line-height: 1.1;
}
.trust-item span,
.trust-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  line-height: 1.35;
}

/* ── Video section (home) ── */
.video-section { padding: 0 0 var(--section); }
.video-wrap {
  width: var(--wrap);
  margin: 0 auto;
}

/* ── Why features (v2026 photo cards; no numbers) ── */
.why-band { padding: var(--section) 0; }
.why-lead {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  max-width: 820px;
}
.section-forest .why-lead { color: #fff; }

.why-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.why-feat {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f1f1c;
  cursor: default;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.why-feat:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}
.why-feat-bg {
  position: absolute;
  inset: 0;
  background-image: var(--why-img);
  background-size: cover;
  background-position: var(--why-pos, center);
  transform: scale(1.02);
  filter: brightness(0.92) saturate(0.95);
  transition: transform 1.1s var(--ease), filter .5s var(--ease);
}
.why-feat-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 31, 28, 0.08) 0%,
    rgba(15, 31, 28, 0.12) 42%,
    rgba(15, 31, 28, 0.55) 72%,
    rgba(15, 31, 28, 0.88) 100%
  );
  pointer-events: none;
  transition: opacity .45s var(--ease);
}
.why-feat-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 52%;
  z-index: 1;
  padding: 8px 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.why-feat h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.why-feat h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
  border-radius: 1px;
  transition: width .45s var(--ease), background .45s var(--ease);
}
.why-feat p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
  margin: 0;
  max-width: 28ch;
  opacity: 1;
  max-height: none;
  overflow: visible;
}

@media (hover: hover) and (pointer: fine) {
  .why-feat:hover .why-feat-bg {
    transform: scale(1.08);
    filter: brightness(0.78) saturate(1);
  }
  .why-feat:hover .why-feat-shade {
    background: linear-gradient(
      180deg,
      rgba(15, 31, 28, 0.12) 0%,
      rgba(15, 31, 28, 0.2) 38%,
      rgba(15, 31, 28, 0.62) 70%,
      rgba(15, 31, 28, 0.92) 100%
    );
  }
  .why-feat:hover h3::before {
    width: 44px;
    background: rgba(255, 255, 255, 0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .why-feat,
  .why-feat-bg,
  .why-feat h3::before { transition: none; }
  .why-feat:hover { transform: none; }
  .hero-bg.is-animating { animation: none; }
}

.why-feat--solid .why-feat-bg {
  background-image: none;
  background-color: rgba(255, 255, 255, 0.06);
}
.why-feat--solid .why-feat-shade {
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
}

/* ── Home product category cards (WP overlay style, v2026 tokens) ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-soft);
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.product-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.product-card:hover > img { transform: scale(1.04); }
.product-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 31, 28, 0.88) 0%, rgba(15, 31, 28, 0.35) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 28px;
  color: #fff;
}
.product-overlay h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.product-overlay p {
  font-size: 14px;
  opacity: .88;
  margin-bottom: 14px;
  line-height: 1.55;
}
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.product-tags span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--btn-radius);
}
.product-link {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* ── Home services models + process track ── */
.services-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.service-model {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.service-model h3 {
  color: var(--forest);
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.service-model p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0;
}

/* Home process: centered steps; process-dot margin auto */
.process-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  position: relative;
}
.process-track::before,
.process-track .process-line-fill { display: none; }

.process-track .process-step {
  text-align: center;
  padding: 22px 18px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
  position: relative;
  z-index: 1;
}
.process-track .process-step.revealed {
  opacity: 1;
  transform: translateY(0);
}
.process-track .process-dot {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.process-track .process-step span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}
.process-track .process-step h4,
.process-track .process-step p {
  text-align: center;
}

/* Also style bare .process on home if templates switch to v2026 markup */
.zerv-home .process {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.zerv-home .process .process-step { text-align: center; }
.zerv-home .process .process-dot { margin: 0 auto 14px; }

/* ── Home solution stack tabs ── */
.zerv-home .solution-stack-tabs {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 400px;
  margin-top: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
  overflow: hidden;
  border: none;
}
.zerv-home .solution-tab-stack {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 24px 0;
}
.zerv-home .solution-tab-stack [data-stack-tab] {
  text-align: left;
  padding: 18px 24px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all .35s var(--ease);
  font-family: inherit;
  color: var(--ink-3);
}
.zerv-home .solution-tab-stack [data-stack-tab] .tab-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.zerv-home .solution-tab-stack [data-stack-tab].active {
  background: var(--bg-soft);
  border-left-color: var(--forest);
  color: var(--forest);
}
.zerv-home .solution-tab-stack [data-stack-tab]:not(.active) {
  transform: translateX(6px);
  opacity: .6;
}
.zerv-home .solution-tab-panels { position: relative; background: var(--white); }
.zerv-home .solution-tab-panels [data-stack-panel] {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, transform .4s ease, visibility .4s;
  transform: translateX(12px);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-template-columns: none;
}
.zerv-home .solution-tab-panels [data-stack-panel].active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.zerv-home .solution-tab-panels [data-stack-panel] h3 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--forest);
}
.zerv-home .solution-tab-panels [data-stack-panel] > p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 24px;
}
.zerv-home .solution-icon-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
}
.zerv-home .solution-icon-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.zerv-home .solution-icon-box {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--forest-soft);
  border: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--forest);
}
.zerv-home .solution-icon-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--ink);
}
.zerv-home .solution-icon-item p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* Home sol-tabs / sol-panel (if markup switches to v2026) */
.zerv-home .sol-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.zerv-home .sol-tabs button {
  padding: 12px 22px;
  border-radius: var(--btn-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: background .35s, color .35s, transform .35s var(--ease);
}
.zerv-home .sol-tabs button:hover { transform: translateY(-1px); }
.zerv-home .sol-tabs button.active {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30, 58, 52, 0.22);
}

/* Home blog featured layout */
.zerv-home .blog-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
}
.zerv-home .blog-card--featured .blog-img { aspect-ratio: 16/11; }
.zerv-home .blog-card--featured .blog-body h3 { font-size: 24px; }

/* Home CTA: white button on dark */
.cta-section .btn-white,
.cta .btn-white,
.cta-section .btn-primary,
.cta .btn-primary {
  background: #fff;
  color: var(--forest);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.cta-section .btn-white:hover,
.cta .btn-white:hover,
.cta-section .btn-primary:hover,
.cta .btn-primary:hover {
  background: var(--forest-soft);
  color: var(--forest-hover);
}

.action-section { padding: var(--section) 0; }

@media (max-width: 960px) {
  .hero { min-height: 70vh; }
  .hero-inner { padding: 120px 0 64px; }
  .trust-row, .trust-grid { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .trust-item:nth-child(2)::after,
  .trust-grid > div:nth-child(2)::after { display: none; }
  .why-features,
  .products-grid,
  .services-models { grid-template-columns: 1fr; }
  .process-track,
  .zerv-home .process { grid-template-columns: repeat(3, 1fr); }
  .zerv-home .solution-stack-tabs { grid-template-columns: 1fr; }
  .zerv-home .solution-tab-stack {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .zerv-home .solution-tab-stack [data-stack-tab]:not(.active) { transform: none; }
  .zerv-home .blog-grid { grid-template-columns: 1fr; }
  .zerv-home .header .logo-dark,
  .zerv-home .header .logo-light,
  .header--home .logo-dark,
  .header--home .logo-light { height: 64px; }
}

@media (max-width: 600px) {
  .process-track,
  .zerv-home .process { grid-template-columns: repeat(2, 1fr); }
  .why-features { grid-template-columns: 1fr 1fr; }
}
