/* Hero block — Figma 275-14867. Exact desktop values; responsive below. */
/* Content + logos are ONE group with a fixed gap, vertically centered in a
   ~90vh hero. A single gradient background spans the whole thing. */
.sun-hero2 {
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;                       /* center the whole group in 90vh */
  gap: 96px;                                     /* fixed gap: content ↔ logos */
  padding: clamp(80px, 10vh, 110px) 0 clamp(40px, 5vw, 80px);
  background: linear-gradient(180deg, var(--sun-base) 0%, var(--sun-border) 100%);
}
.sun-hero2__inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;                          /* center animation to the text block */
  gap: clamp(24px, 3vw, 44px);
}

/* Left column */
.sun-hero2__copy {
  width: 600px;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;                                   /* text-group spacing */
}
.sun-hero2__copy > * { margin: 0; }
.sun-hero2__cta { margin-top: clamp(16px, 2.3vw, 28px); }   /* → ~40px before the CTA */

/* Trustline */
.sun-hero2__trust {
  display: flex; flex-wrap: wrap; 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-bluegrey);
}
.sun-hero2__trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  /* Figma: light chip behind each trust item */
  padding: 4px 10px;
  background: var(--sun-surface);                 /* #f5f5f5 */
  border-radius: 4px;
}
.sun-hero2__trust-sep { color: var(--sun-primary); }
.sun-hero2__trust-badges { display: inline-flex; align-items: center; }
.sun-hero2__trust-badge { display: block; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--sun-base); }
.sun-hero2__trust-badge + .sun-hero2__trust-badge { margin-left: -4px; }   /* overlap, per Figma */

/* Headline / subtitle */
.sun-hero2__headline {
  font-family: var(--wp--preset--font-family--brand);
  font-size: clamp(34px, 2.92vw, 56px);
  font-weight: 500; line-height: 1.1429; letter-spacing: -0.56px;
  color: var(--sun-secondary);
  /* Hyphenate long German compounds instead of overflowing. Needs lang="de"
     on the element (set in template). A manual &shy; still takes precedence. */
  hyphens: auto; -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.sun-hero2__subtitle {
  max-width: 518px;
  font-size: var(--wp--preset--font-size--lg);   /* 18 */
  font-weight: 500; line-height: 1.3333; color: var(--sun-secondary);
}
.sun-hero2__subtitle p { margin: 0; }
.sun-hero2__cta { display: flex; }
.sun-hero2__cta .sun-btn svg { width: 16px; height: 16px; }

/* Right column: animation panel */
.sun-hero2__anim {
  width: 691px;
  max-width: 100%;
  flex-shrink: 1;
  align-self: center;                            /* centered to the text block */
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}
.sun-hero2__rive { display: block; width: 100%; height: auto; aspect-ratio: 627 / 494; }
.sun-hero2__anim-empty { width: 100%; aspect-ratio: 627 / 494; background:
  radial-gradient(circle at 60% 45%, rgba(255,113,10,.12), transparent 60%); }

/* Produkt header (Figma 326-4308). The illustration is deliberately CSS-built
   so each platform layer can animate independently without a canvas dependency. */
.sun-hero2--product { box-sizing: border-box; min-height: 700px; padding: clamp(148px, 16vh, 172px) 0 clamp(48px, 6vw, 80px); background: linear-gradient(180deg, var(--sun-base), #efefef); }
.sun-hero2--product .sun-hero2__inner { min-height: 429px; gap: 40px; }
.sun-hero2--product .sun-hero2__copy { width: auto; flex: 1 1 0; }
.sun-hero2--product .sun-hero2__headline { font-size: 48px; line-height: 56px; letter-spacing: -1px; }
.sun-hero2--product .sun-hero2__cta { margin-top: 28px; }
.sun-hero2--product .sun-hero2__anim { width: auto; flex: 1 1 0; height: 429px; max-width: none; }
.sun-product-diagram { position: relative; width: 620px; height: 429px; max-width: 100%; }
.sun-product-diagram__stack { position: absolute; left: 0; top: 0; width: 278px; height: 429px; }
.sun-product-diagram__layer { position: absolute; left: 9px; width: 259px; height: 150px; border-radius: 10px; clip-path: polygon(50% 0, 100% 33%, 100% 73%, 50% 100%, 0 73%, 0 33%); transform-origin: center; }
.sun-product-diagram__layer--base { top: 168px; height: 150px; background: linear-gradient(180deg, #ffc59b, #ff710a); }
.sun-product-diagram__layer--orange { top: 143px; height: 109px; background: #ff812e; }
.sun-product-diagram__layer--blue { top: 73px; height: 109px; background: linear-gradient(180deg, #8094e4, #4a67d2); }
.sun-product-diagram__layer--top { top: 4px; height: 112px; background: linear-gradient(180deg, #4d5a77, #263657); }
.sun-product-diagram__core { position: absolute; z-index: 1; top: 174px; left: 69px; width: 122px; height: 61px; border-radius: 50%; background: repeating-conic-gradient(from 3deg, #ff710a 0 4deg, transparent 4deg 10deg); -webkit-mask: radial-gradient(transparent 0 17px, #000 18px); mask: radial-gradient(transparent 0 17px, #000 18px); }
.sun-product-diagram__core::after { content: ''; position: absolute; width: 33px; height: 20px; top: 20px; left: 45px; border-radius: 50%; background: #ff812e; }
.sun-product-diagram__features { position: absolute; inset: 0; }
.sun-product-diagram__feature { position: absolute; left: 280px; width: 228px; display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; }
.sun-product-diagram__connector { position: absolute; left: 160px; width: 100px; height: 1px; background: var(--sun-muted); transform-origin: left center; }
.sun-product-diagram__connector::after { content: ''; position: absolute; right: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--sun-muted); }
.sun-product-diagram__connector--custom { top: 75px; }
.sun-product-diagram__connector--modules { top: 181px; }
.sun-product-diagram__connector--basic { top: 313px; }
.sun-product-diagram__feature--custom { top: 59px; }
.sun-product-diagram__feature--modules { top: 165px; }
.sun-product-diagram__feature--basic { top: 297px; }
.sun-product-diagram__feature img { display: block; width: 32px; height: 32px; }
.sun-product-diagram__feature h2 { margin: 3px 0 7px; color: var(--sun-secondary); font-family: var(--wp--preset--font-family--brand); font-size: 18px; font-weight: 500; line-height: 24px; }
.sun-product-diagram__feature p { margin: 0; color: var(--sun-bluegrey); font-size: 14px; font-weight: 400; line-height: 20px; }
.sun-product-diagram[data-motion-ready] .sun-product-diagram__layer,
.sun-product-diagram[data-motion-ready] .sun-product-diagram__core,
.sun-product-diagram[data-motion-ready] .sun-product-diagram__connector,
.sun-product-diagram[data-motion-ready] .sun-product-diagram__feature { opacity: 0; }

/* Customers — title on the left, 4×2 logo grid on the right (Figma 275-15084).
   No own background — it sits on the hero's shared gradient. */
.sun-hero2__customers-inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px); margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: start;
}
.sun-hero2__customers-title {
  font-size: var(--wp--preset--font-size--lg); font-weight: 500;
  line-height: 1.33; color: var(--sun-secondary); margin: 0; max-width: 13em;
}
.sun-hero2__logos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.sun-hero2__logo {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  /* Cell height = logo height + symmetric padding; the grid stretches every
     cell in a row to match, so no fixed min-height magic number is needed. */
  padding: 22px 32px;
  background: transparent;
  border: 1px solid var(--sun-muted);           /* #b6bac4 */
  border-radius: 4px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* Showcase (linked) cells: orange border + arrow ALWAYS; pill + white bg on hover. */
a.sun-hero2__logo { border-color: var(--sun-primary); }
.sun-hero2__logo:hover { box-shadow: 0 6px 20px -12px rgba(19, 33, 64, .25); }
a.sun-hero2__logo:hover { background: var(--sun-base); }        /* white bg on hover */
.sun-hero2__logo-img {
  display: block; height: 28px; width: auto; max-width: 100%; object-fit: contain;
}
/* "Case ansehen" pill — hidden until hover (shown by default on touch, below). */
.sun-hero2__logo-badge {
  position: absolute; top: -11px; left: 50%;
  transform: translate(-50%, -4px); opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 4px;
  background: var(--sun-base); border: 1px solid var(--sun-primary);
  color: var(--sun-secondary); font-size: 12px; font-weight: 500; white-space: nowrap;
}
a.sun-hero2__logo:hover .sun-hero2__logo-badge,
a.sun-hero2__logo:focus-visible .sun-hero2__logo-badge { opacity: 1; transform: translate(-50%, 0); }
/* Arrow — always visible in the top-right corner of a showcase cell. */
.sun-hero2__logo-arrow {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px; color: var(--sun-primary); pointer-events: none;
}
.sun-hero2__logo-arrow svg { width: 16px; height: 16px; display: block; transform: rotate(-45deg); }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .sun-hero2 { gap: clamp(40px, 8vw, 72px); }
  .sun-hero2__inner { flex-direction: column; align-items: stretch; }
  .sun-hero2__copy { width: 100%; padding-top: clamp(48px, 12vw, 80px); }
  .sun-hero2__anim { width: 100%; }
  .sun-hero2--product { min-height: 0; padding: 128px 0 56px; }
  .sun-hero2--product .sun-hero2__copy { padding-top: 0; }
  .sun-hero2--product .sun-hero2__anim { height: auto; }
  .sun-hero2__customers-inner { grid-template-columns: 1fr; }
  .sun-hero2__customers-title { max-width: none; }
  .sun-hero2__logos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  /* Figma 375w: 2-col logo grid with compact tiles (163×51), not full-width rows. */
  .sun-hero2__logos { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sun-hero2__logo { padding: 14px 16px; }
}

/* Touch devices OR narrow (mobile) viewports: show the full showcase affordance
   by default — pill + arrow + orange border — but keep the background until tap. */
@media (hover: none), (max-width: 980px) {
  .sun-hero2__logo-badge { opacity: 1; transform: translate(-50%, 0); }
  a.sun-hero2__logo { background: transparent; }
  a.sun-hero2__logo:active { background: var(--sun-base); }
}

/* Motion-templates variant of the product diagram. The bundle is one 620x429 SVG that
   scales itself, so the fixed 429px height must not apply. It is also an IN-FLOW child,
   unlike the CSS diagram whose layers are absolutely positioned: without min-width:0 its
   intrinsic 620px becomes the min-content width of this shrink-to-fit flex column and
   blows the hero out past the viewport on narrow screens. */
.sun-hero2--product .sun-hero2__anim--motion { height: auto; width: 100%; min-width: 0; max-width: 620px; }
.sun-product-diagram--motion { height: auto; width: 100%; }
.sun-product-diagram--motion .lvl-mt { max-width: 100% !important; }

/* Bundle chosen in the block (any headline, not only the product variant): the panel is
   a centering flex box and the bundle SVG has only a viewBox, so the wrapper needs an
   explicit width or it collapses to 0. */
.sun-hero2__anim--motion { height: auto; }
.sun-hero2__mt { width: 100%; min-width: 0; }
.sun-hero2__mt .lvl-mt { max-width: 100% !important; }
