/**
 * Grove Web Digital — Enterprise Hero (home page only)
 * Uses brand tokens from tokens.css — light premium by default.
 */

.gw-hero-enterprise {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -30%, rgb(19 0 154 / 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgb(0 0 174 / 0.05), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 80%, rgb(19 127 21 / 0.04), transparent 50%),
    var(--color-surface-body);
}

.gw-hero-enterprise__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  z-index: 0;
}

.gw-hero-enterprise__glow--1 {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  right: -6rem;
  background: rgb(19 0 154 / 0.12);
}

.gw-hero-enterprise__glow--2 {
  width: 22rem;
  height: 22rem;
  bottom: 10%;
  left: -5rem;
  background: rgb(19 127 21 / 0.1);
}

.gw-hero-enterprise__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
  }

  .gw-hero-enterprise__content,
  .gw-hero-enterprise__visual {
    min-width: 0;
  }
}

/* —— Left column —— */
.gw-hero-enterprise__content {
  text-align: center;
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__content {
    text-align: left;
  }
}

.gw-hero-enterprise__badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-heading);
  background: var(--color-surface-raised);
  border: 1px solid rgb(19 0 154 / 0.12);
  box-shadow: 0 4px 24px rgb(19 0 154 / 0.06);
  margin: 0 0 1.25rem;
}

.gw-hero-enterprise__badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-button-primary-bg, #137f15);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-button-primary-bg, #137f15) 18%, transparent);
}

.gw-hero-enterprise__title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text-heading);
  margin: 0;
}

.gw-hero-enterprise__subtitle {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--color-text-body);
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__subtitle {
    margin-left: 0;
    margin-right: 0;
  }
}

.gw-hero-enterprise__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-top: 1.75rem;
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__actions {
    justify-content: flex-start;
  }
}

.gw-hero-enterprise__btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--color-button-primary-text);
  background: var(--color-button-primary-bg);
  box-shadow: 0 0 24px rgb(19 127 21 / 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gw-hero-enterprise__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgb(19 127 21 / 0.35);
}

.gw-hero-enterprise__btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--color-text-heading);
  background: rgb(var(--surface-rgb) / 0.9);
  border: 1px solid rgb(19 0 154 / 0.15);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gw-hero-enterprise__btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgb(19 0 154 / 0.28);
  box-shadow: 0 8px 32px rgb(19 0 154 / 0.1);
}

.gw-hero-enterprise__trust-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__trust-list {
    justify-content: flex-start;
  }
}

.gw-hero-enterprise__trust-list li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-body);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gw-hero-enterprise__trust-list li::before {
  content: "✓";
  color: var(--color-button-primary-bg);
  font-weight: 700;
}

/* —— Right: visual composition —— */
.gw-hero-enterprise__visual {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 28rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__visual {
    max-width: 100%;
    min-height: 24rem;
    margin: 0;
    padding-inline: 0.5rem;
  }
}

.gw-hero-visual__stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
}

.gw-hero-visual__card {
  border-radius: 1rem;
  background: color-mix(in srgb, var(--color-surface-raised) 88%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid color-mix(in srgb, var(--color-text-heading) 10%, transparent);
  box-shadow:
    0 4px 6px color-mix(in srgb, var(--color-text-heading) 4%, transparent),
    0 20px 48px color-mix(in srgb, var(--color-text-heading) 10%, transparent);
  padding: 0.875rem;
}

.gw-hero-visual__card--main {
  grid-column: 1 / -1;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .gw-hero-visual__stage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
  }

  .gw-hero-visual__card--main {
    grid-column: 1 / 3;
  }

  .gw-hero-visual__card--seo {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (min-width: 1024px) {
  .gw-hero-visual__stage {
    display: block;
    position: relative;
    min-height: 24rem;
    max-width: 100%;
    margin: 0 auto;
    isolation: isolate;
  }

  .gw-hero-visual__card {
    position: absolute;
    max-width: calc(100% - 1rem);
    animation: gw-hero-float 6s ease-in-out infinite;
  }

  .gw-hero-visual__card--main {
    inset: 12% 8% 16% 8%;
    z-index: 2;
    max-width: none;
    animation-delay: 0s;
  }

  .gw-hero-visual__card--seo {
    top: 2%;
    right: 4%;
    width: min(36%, 11rem);
    z-index: 4;
    animation-delay: -1.5s;
  }

  .gw-hero-visual__card--python {
    top: 20%;
    left: 4%;
    width: min(34%, 10.5rem);
    z-index: 3;
    animation-delay: -3s;
  }

  .gw-hero-visual__card--wp {
    bottom: 30%;
    right: 4%;
    width: min(30%, 9.5rem);
    z-index: 4;
    animation-delay: -2s;
  }

  .gw-hero-visual__card--ai {
    bottom: 10%;
    left: 10%;
    width: min(32%, 10rem);
    z-index: 5;
    animation-delay: -4s;
  }

  .gw-hero-visual__card--meta {
    top: 44%;
    right: 12%;
    width: min(28%, 9rem);
    z-index: 3;
    animation-delay: -2.5s;
  }

  .gw-hero-visual__card--analytics {
    bottom: 2%;
    right: 14%;
    width: min(36%, 11rem);
    z-index: 4;
    animation-delay: -1s;
  }
}

.gw-hero-visual__card-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-heading);
}

.gw-hero-visual__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-button-primary-bg);
}

.gw-hero-visual__dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 3.5rem;
  padding-top: 0.25rem;
}

.gw-hero-visual__dash-bars span {
  flex: 1;
  border-radius: 0.25rem 0.25rem 0 0;
  background: linear-gradient(180deg, var(--brand-fill), color-mix(in srgb, var(--color-text-heading) 50%, transparent));
  animation: gw-hero-bar 2.4s ease-in-out infinite alternate;
}

.gw-hero-visual__dash-bars span:nth-child(1) { height: 45%; animation-delay: 0s; }
.gw-hero-visual__dash-bars span:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.gw-hero-visual__dash-bars span:nth-child(3) { height: 55%; animation-delay: 0.4s; }
.gw-hero-visual__dash-bars span:nth-child(4) { height: 90%; animation-delay: 0.6s; }
.gw-hero-visual__dash-bars span:nth-child(5) { height: 65%; animation-delay: 0.8s; }

.gw-hero-visual__chart-line {
  width: 100%;
  height: 2.5rem;
  color: var(--color-text-heading);
}

.gw-hero-visual__chart-line polyline:first-child {
  stroke: currentColor;
}

.gw-hero-visual__chart-line polyline:last-child {
  fill: color-mix(in srgb, var(--color-text-heading) 12%, transparent);
}

.gw-hero-visual__code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.5625rem;
  line-height: 1.5;
  color: var(--color-text-heading);
  margin: 0;
}

.gw-hero-visual__code .kw { color: var(--color-button-primary-bg); }
.gw-hero-visual__code .fn { color: var(--color-text-heading); font-weight: 600; }

.gw-hero-visual__icon-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-heading);
}

.gw-hero-visual__icon-row svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  stroke: var(--color-text-heading);
}

.gw-hero-visual__metric {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-button-primary-bg);
  line-height: 1.2;
}

.gw-hero-visual__metric-label {
  font-size: 0.5625rem;
  color: var(--color-text-body);
  opacity: 0.75;
}

/* —— Trust bar —— */
.gw-hero-enterprise__trust-bar {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgb(19 0 154 / 0.08);
  border-bottom: 1px solid rgb(19 0 154 / 0.08);
}

.gw-hero-enterprise__trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gw-hero-enterprise__trust-badges li {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-heading);
  background: var(--color-surface-raised);
  border: 1px solid rgb(19 0 154 / 0.1);
  box-shadow: 0 2px 12px rgb(19 0 154 / 0.04);
  white-space: nowrap;
}

/* —— Feature cards —— */
.gw-hero-enterprise__features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .gw-hero-enterprise__features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gw-hero-enterprise__features {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.gw-hero-enterprise__feature {
  padding: 1.25rem 1.375rem;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity 0.2s ease;
}

.gw-hero-enterprise__feature:hover {
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0.92;
}

.gw-hero-enterprise__feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  margin-bottom: 0.875rem;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--color-text-heading) 16%, transparent);
  color: var(--color-text-heading);
}

.gw-hero-enterprise__feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.gw-hero-enterprise__feature h3 {
  margin: 0 0 0.5rem;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-heading);
}

.gw-hero-enterprise__feature p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-body);
  max-width: none;
}

/* —— Animations —— */
@keyframes gw-hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes gw-hero-bar {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.gw-hero-enterprise__content > * {
  animation: gw-fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gw-hero-enterprise__badge { animation-delay: 0.05s; }
.gw-hero-enterprise__title { animation-delay: 0.1s; }
.gw-hero-enterprise__subtitle { animation-delay: 0.18s; }
.gw-hero-enterprise__actions { animation-delay: 0.26s; }
.gw-hero-enterprise__trust-list { animation-delay: 0.34s; }
.gw-hero-enterprise__visual { animation: gw-fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }

@media (prefers-reduced-motion: reduce) {
  .gw-hero-visual__card,
  .gw-hero-visual__dash-bars span,
  .gw-hero-enterprise__content > *,
  .gw-hero-enterprise__visual {
    animation: none !important;
  }
}

/* —— Dark mode: same night tokens as the rest of the site —— */
html.dark .gw-hero-enterprise {
  background:
    radial-gradient(ellipse 90% 60% at 50% -30%, var(--color-dm-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 10%, color-mix(in srgb, var(--color-chrome-0) 16%, transparent), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 80%, color-mix(in srgb, var(--color-button-primary-bg) 10%, transparent), transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    var(--color-dm-canvas);
  background-size: auto, auto, auto, 48px 48px, 48px 48px, auto;
  position: relative;
}

html.dark .gw-hero-enterprise__title,
html.dark .gw-hero-enterprise__feature h3 {
  color: var(--color-dm-text);
}

html.dark .gw-hero-enterprise__subtitle,
html.dark .gw-hero-enterprise__feature p,
html.dark .gw-hero-enterprise__trust-list li {
  color: var(--color-dm-text-muted);
}

html.dark .gw-hero-enterprise__badge,
html.dark .gw-hero-enterprise__trust-badges li,
html.dark .gw-hero-visual__card {
  background: color-mix(in srgb, var(--color-dm-card) 88%, transparent);
  border-color: var(--color-dm-border);
  box-shadow:
    0 12px 40px rgb(0 0 0 / 0.4),
    0 0 40px var(--color-dm-glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .gw-hero-visual__card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

html.dark .gw-hero-visual__card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgb(0 0 0 / 0.45),
    0 0 56px var(--color-dm-glow);
}

html.dark .gw-hero-enterprise__feature {
  background: transparent;
  background-color: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.dark .gw-hero-enterprise__feature-icon {
  background: color-mix(in srgb, var(--color-chrome-0) 18%, transparent);
  color: var(--color-dm-accent);
  border: 1px solid color-mix(in srgb, var(--color-dm-accent) 28%, transparent);
  box-shadow: 0 0 20px var(--color-dm-glow);
}

html.dark .gw-hero-enterprise__feature:hover {
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

html.dark .gw-hero-enterprise__btn-secondary {
  background: color-mix(in srgb, var(--color-dm-elevated) 55%, transparent);
  color: var(--color-dm-text);
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

html.dark .gw-hero-enterprise__btn-secondary:hover {
  background: color-mix(in srgb, var(--color-dm-elevated) 80%, transparent);
  border-color: color-mix(in srgb, var(--color-chrome-0) 40%, transparent);
  box-shadow: 0 0 28px var(--color-dm-glow);
}

html.dark .gw-hero-enterprise__trust-bar {
  border-color: var(--color-dm-border);
}
