/* ==========================================================================
   Home Page — Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--color-jet-black);
  padding-block: var(--space-8);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
  width: 100%;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

/* --- Eyebrow logo --- */
.hero__eyebrow-logo {
  width: 80px;
  height: auto;
}

/* --- Left column: text --- */
.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero__heading {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-display-xl);
  line-height: var(--line-height-display);
  color: var(--color-white);
}

.hero__heading--accent {
  color: var(--color-frozen-blue);
}

.hero__body {
  font-family: var(--font-text);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-white);
  max-width: 48ch;
  opacity: 0.72;
}

/* --- Right column: image placeholder --- */
.hero__image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .hero__image-wrap {
    min-height: 0;
  }
}

.hero__image-placeholder {
  position: absolute;
  inset: 0;
  background-color: var(--color-dark-grey-2);
}

/* --------------------------------------------------------------------------
   Hero — Animated data-flow diagram
   -------------------------------------------------------------------------- */
.hero__flow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px var(--space-6);
  background-color: var(--color-dark-grey-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Entrance animation driven by --flow-delay custom property */
@keyframes heroFlowIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__flow-anim {
  opacity: 0;
  animation: heroFlowIn 0.45s ease-out forwards;
  animation-delay: var(--flow-delay, 0s);
}

/* Nodes */
.hero__flow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-dark-grey-2);
  background-color: var(--color-jet-black);
  text-align: center;
  min-width: 96px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hero__flow-node--source   { color: var(--color-light-grey-2); }
.hero__flow-node--contract { color: var(--color-frozen-blue); border-color: color-mix(in srgb, var(--color-frozen-blue) 28%, transparent); }
.hero__flow-node--product  { color: var(--color-white); border-color: color-mix(in srgb, var(--color-white) 18%, transparent); }
.hero__flow-node--catalog  { color: var(--color-light-grey-2); }
.hero__flow-node--dashboard { color: var(--color-frozen-blue); border-color: color-mix(in srgb, var(--color-frozen-blue) 22%, transparent); }

.hero__flow-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.hero__flow-label {
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

.hero__flow-sublabel {
  font-family: var(--font-text);
  font-size: 9px;
  color: var(--color-light-grey-2);
  opacity: 0.45;
  white-space: nowrap;
}

/* Pulsing ring — staggered per node */
@keyframes heroPulse {
  0%   { opacity: 0; transform: scale(1); }
  25%  { opacity: 0.35; }
  75%  { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; }
}

.hero__flow-pulse {
  position: absolute;
  inset: -5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-frozen-blue);
  opacity: 0;
  animation: heroPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

.hero__flow-node--source   .hero__flow-pulse { animation-delay: 0.0s; }
.hero__flow-node--contract .hero__flow-pulse { animation-delay: 0.9s; }
.hero__flow-node--product  .hero__flow-pulse { animation-delay: 1.8s; }

/* Vertical connectors */
.hero__flow-connector {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 12px;
  height: 40px;
  color: var(--color-dark-grey-2);
}

.hero__flow-line {
  width: 12px;
  height: 100%;
}

/* Split connector (1 top → 2 bottom) */
.hero__flow-split {
  width: 240px;
  height: 48px;
  display: flex;
  align-items: center;
  color: var(--color-dark-grey-2);
}

.hero__flow-split-svg {
  width: 100%;
  height: 100%;
}

/* Output row */
.hero__flow-outputs {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  align-items: flex-start;
}

/* ============================================================
   Demo CTA section (end-of-story)
   ============================================================ */

.demo-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.demo-cta__inner {
  max-width: 640px;
  margin: 0 auto;
}

.demo-cta__eyebrow {
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-frozen-blue);
  margin: 0 0 var(--space-2);
}

.demo-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 var(--space-2);
  line-height: 1.1;
}

.demo-cta__desc {
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark-grey-2);
  margin: 0 0 var(--space-4);
}

.demo-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-jet-black);
  background-color: var(--color-frozen-blue);
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.demo-cta__btn:hover {
  background-color: #07d9f7;
  transform: translateY(-1px);
}

.demo-cta__btn:focus-visible {
  outline: 2px solid var(--color-frozen-blue);
  outline-offset: 3px;
}

/* Granlund theme overrides */
[data-theme="granlund"] .demo-cta {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="granlund"] .demo-cta__title {
  color: var(--color-jet-black);
}

[data-theme="granlund"] .demo-cta__desc {
  color: #555;
}

[data-theme="granlund"] .demo-cta__btn {
  background-color: var(--color-frozen-blue);
  color: #fff;
}

[data-theme="granlund"] .demo-cta__btn:hover {
  background-color: #d4700a;
}
