/* Hero - Big radial Animation — Figma 2524-103399 (1920 frame, values below at that size).
   Top: navy→blue gradient, ray fan + orbit both converge on the bottom-centre of
   the top area, so the orbit is clipped exactly at its centre. Then customers on white. */

.sun-hrad {
  --orbit: min(650px, 92vw);                       /* orbit ring diameter (Figma 650) */
  background: var(--sun-base);
}

/* ---- Top: gradient stage ---- */
.sun-hrad__top {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 144px;                              /* Figma 96 + 48, header overlays it */
  /* Figma gradient spans the 1113 frame (37.3% / 74.6%); rebased onto the 836px top area. */
  background: linear-gradient(180deg, var(--sun-secondary) 0%, var(--sun-accent) 49.6%, #c7d0f1 99.3%); /* #c7d0f1: Figma end stop, no theme token */
}

/* Ray fan (Figma STRAHLEN 2480:96545, 2417×1209 at 1920). Convergence point =
   bottom centre of the SVG = bottom centre of this area. */
.sun-hrad__rays {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: max(126%, 1500px);
  aspect-ratio: 2417 / 1208.92;
  transform: translateX(-50%);
  pointer-events: none;
}
.sun-hrad__rays svg { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .sun-hrad__rays .hl { display: none; }
}

/* ---- Copy ---- */
.sun-hrad__copy {
  position: relative;                              /* above the rays */
  box-sizing: border-box;
  width: min(840px, 100% - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--sun-base);
}
.sun-hrad__copy > * { margin: 0; }

.sun-hrad__trust {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  list-style: none; margin: 0; padding: 0;
  font-size: var(--wp--preset--font-size--sm);   /* 14 */
  font-weight: 500; line-height: 1.43;
  color: var(--sun-border);                       /* Figma Light Grey #efefef */
}
.sun-hrad__trust-item { display: inline-flex; align-items: center; gap: 8px; padding: 4px; }
.sun-hrad__trust-sep { color: var(--sun-primary); }
.sun-hrad__trust-badges { display: inline-flex; align-items: center; }
.sun-hrad__trust-badge { display: block; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.sun-hrad__trust-badge + .sun-hrad__trust-badge { margin-left: -4px; }

.sun-hrad__headline {
  font-family: var(--wp--preset--font-family--brand);
  font-size: clamp(34px, 2.6vw + 14px, 56px);
  font-weight: 500; line-height: 1.1429; letter-spacing: -0.01em;
  color: var(--sun-base);
  hyphens: auto; -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.sun-hrad__subtitle {
  max-width: 640px;
  font-size: var(--wp--preset--font-size--lg);   /* 18 */
  font-weight: 500; line-height: 1.3333;
}
.sun-hrad__subtitle p { margin: 0; }
.sun-hrad__cta { display: flex; margin-top: 12px; }  /* 12 gap + 12 = Figma 24 */
.sun-hrad__cta .sun-btn svg { width: 16px; height: 16px; }

/* ---- Radial foreground ---- */
/* Half an orbit tall; the orbit is centred on the stage's bottom edge and the
   top area's overflow:hidden cuts it there. */
.sun-hrad__stage {
  position: relative;
  width: 100%;
  height: calc(var(--orbit) / 2);
  margin-top: 48px;
  pointer-events: none;
}
.sun-hrad__orbit {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(var(--orbit) * 750 / 650);          /* export box = 650 orbit + glow bleed */
  aspect-ratio: 1;
  transform: translate(-50%, 50%);
}
.sun-hrad__orbit-img { display: block; width: 100%; height: 100%; }
.sun-hrad__orbit--motion > * { width: 100%; height: 100%; }
/* stage is pointer-transparent; the animation itself takes hover/tap so it can replay */
.sun-hrad__orbit--motion .lvl-mt { pointer-events: auto; }

/* ---- Customers (Figma 2440:81043) — title = column 1 of a 5-col grid ---- */
.sun-hrad__customers { padding: 80px 0; }
.sun-hrad__customers-inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: calc((100% - 64px) / 5) 1fr;
  gap: 16px;
  align-items: start;
}
.sun-hrad__customers-title {
  margin: 0;
  font-size: var(--wp--preset--font-size--lg); font-weight: 500;
  line-height: 1.33; color: var(--sun-secondary);
}
.sun-hrad__logos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.sun-hrad__logo {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 32px;
  border: 1px solid var(--sun-muted);              /* #b6bac4 */
  border-radius: 4px;
  text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}
a.sun-hrad__logo { border-color: var(--sun-primary); }
a.sun-hrad__logo:hover,
a.sun-hrad__logo:focus-visible { background: var(--sun-border); }   /* Figma #efefef */
.sun-hrad__logo-img { display: block; height: 26px; width: auto; max-width: 100%; object-fit: contain; }

/* "Case ansehen" label (Figma LABEL 2440:81098), revealed on hover/focus. */
.sun-hrad__logo-badge {
  position: absolute; top: -14px; left: 50%;
  transform: translate(-50%, -4px); opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  display: inline-flex; align-items: center;
  height: 28px; box-sizing: border-box; padding: 0 8px; border-radius: 4px;
  background: #fff1e7;                             /* Figma orange/Light — no token */
  border: 1px solid var(--sun-primary);
  color: #733305;                                  /* Figma orange/Dark :active — no token */
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap;
}
a.sun-hrad__logo:hover .sun-hrad__logo-badge,
a.sun-hrad__logo:focus-visible .sun-hrad__logo-badge { opacity: 1; transform: translate(-50%, 0); }
.sun-hrad__logo-arrow {
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px; color: var(--sun-primary); pointer-events: none;
}
.sun-hrad__logo-arrow svg { width: 16px; height: 16px; display: block; transform: rotate(-45deg); }

@media (hover: none), (max-width: 980px) {
  .sun-hrad__logo-badge { opacity: 1; transform: translate(-50%, 0); }
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .sun-hrad__top { padding-top: calc(var(--sun-header-h) + 48px); }
  .sun-hrad__stage { margin-top: 40px; }
  .sun-hrad__customers { padding: 56px 0; }
  .sun-hrad__customers-inner { grid-template-columns: 1fr; gap: 24px; }
  .sun-hrad__logos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .sun-hrad__headline br { display: none; }        /* let it wrap naturally on phones */
  .sun-hrad__trust { column-gap: 16px; row-gap: 4px; }
  .sun-hrad__trust-sep { display: none; }         /* a wrapped slash would dangle at a line end */
  .sun-hrad__subtitle { font-size: var(--wp--preset--font-size--md); }
  .sun-hrad__logo { padding: 12px 16px; min-height: 52px; }
  .sun-hrad__logo-img { height: 22px; }
}

/* ---- Header over the dark hero (body.has-dark-hero, set in block.php) ----
   Only while the header is transparent; scrolled / open menu keep the white bar. */
.has-dark-hero .sun-header:not(.is-scrolled):not([data-open="1"]) :is(
  .sun-nav__list > li > a,
  .sun-nav__toplink,
  .sun-textlink,
  .sun-lang__toggle,
  .sun-header__toggle
) { color: var(--sun-base); }
.has-dark-hero .sun-header:not(.is-scrolled):not([data-open="1"]) :is(
  .sun-nav__list > li > a,
  .sun-nav__toplink,
  .sun-textlink,
  .sun-lang__toggle
):hover { color: var(--sun-primary); }
.has-dark-hero .sun-header:not(.is-scrolled):not([data-open="1"]) .sun-header__logo .sun-header__logo-dark { display: none; }
.has-dark-hero .sun-header:not(.is-scrolled):not([data-open="1"]) .sun-header__logo .sun-header__logo-light { display: block; }
