/* owned by WP1 — see docs/design-system.md */

/* ═══ HERO ═══ */
.hero{min-height:100vh;display:flex;align-items:center;position:relative;z-index:var(--z-raised);overflow-x:hidden;background:var(--color-navy-abyss)}

/* video variant (homepage) */
.hero--video{--hero-video-focus:50% 50%}
.hero--video .hero-spline{position:absolute;top:0;right:0;width:50%;height:100%;z-index:var(--z-raised);pointer-events:none;overflow:hidden}
.hero--video .hero-spline video{width:100%;height:100%;object-fit:cover;object-position:var(--hero-video-focus);display:block}
.hero--video::after{content:'';position:absolute;top:0;left:0;width:55%;height:100%;background:linear-gradient(to right,rgba(0,0,0,.7) 0%,rgba(0,0,0,.4) 70%,transparent 100%);z-index:2;pointer-events:none}


.hero-inner{max-width:var(--container);margin-inline:auto;width:100%;padding:var(--space-36) var(--space-10) var(--space-28);position:relative;z-index:3;display:flex;align-items:center}
.hero-content{max-width:560px}
.hero-title{margin:0;font-weight:inherit}
.hero-title>span{display:block}
.hero-title-text{font-family:var(--font-heading);font-size:var(--fs-display);font-weight:var(--fw-medium);line-height:var(--lh-display);letter-spacing:var(--ls-tightest);color:var(--fg-strong);margin-bottom:var(--space-8)}

.hero-lead{font-size:var(--fs-hero-lead);line-height:var(--lh-relaxed);color:var(--fg);max-width:var(--measure);margin-bottom:var(--space-2)}
.hero-lead--light{font-weight:var(--fw-light);font-size:var(--fs-base);line-height:var(--lh-loose);max-width:520px}

/* verb rotator */
.di-rotator{height:clamp(2.2rem,3.8vw,3rem);overflow:hidden;perspective:300px;max-width:520px;margin-bottom:var(--space-12)}
.di-track{position:relative;height:100%;transform-style:preserve-3d}
.di-verb{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;font-family:var(--font-heading);font-size:clamp(1.6rem,3vw,2.2rem);font-weight:var(--fw-regular);color:var(--fg-strong);line-height:var(--lh-tight);letter-spacing:var(--ls-tight);padding-left:var(--space-4);border-left:3px solid var(--v-color);backface-visibility:hidden;opacity:0;transform:rotateX(90deg);transition:opacity var(--dur-slower) var(--ease-standard),transform var(--dur-slower) var(--ease-standard)}
.di-verb.active{opacity:1;transform:rotateX(0deg)}
.di-verb.out{opacity:0;transform:rotateX(-90deg)}

.hero-ctas{margin-top:var(--space-8)}

/* ═══ SHOWCASE (engine_showcase.html.twig) ═══ */
/* Normal section rhythm by default. The reduced clearance is only correct when a video block
   actually precedes the showcase and overlaps it upward (see .video-section below) — the video
   block is optional content, so the compensation is scoped to that case rather than baked in. */
.showcase{padding-top:var(--section-pad-y)}
.video-section + .showcase{padding-top:var(--space-10)}
/* Bottom padding already equals the site's --section-pad-y rhythm, but this section's text
   column (core card + addon grid + CTAs) is the taller of the two showcase-inner columns, so
   that rhythm-matching padding is exactly what the CTA row lands against — bumped one step
   further since the dense grid above reads tight against it. */
.showcase{padding-bottom:var(--space-36)}
.showcase-inner{align-items:center}

.engine-cards{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-8)}
.engine-card-core{cursor:pointer;text-align:left;width:100%}
.engine-card-core-name{display:flex;align-items:center;gap:var(--space-2-5)}
.engine-card-core-desc{margin-top:var(--space-1-5);line-height:var(--lh-relaxed)}

/* addon tiles: --accent comes from the addon's stored colour; ink/tint always compute from it */
.engine-card{--accent-fg:var(--color-ink);--accent-tint:color-mix(in srgb,var(--accent) 10%,white)}
.engine-card-desc{margin-top:var(--space-1)}

/* CTA row previously butted straight up against the addon grid with 0 clearance;
   match the same margin-top .hero-ctas already uses for an analogous CTA row. */
.showcase-ctas{margin-top:var(--space-8)}

.hero-visual{position:relative;padding:var(--space-4)}

/* dashboard mock */
.dashboard{background:var(--bg-card);border-radius:var(--radius-xl);padding:var(--space-8);box-shadow:var(--shadow-md);position:relative;border:var(--border-w) solid var(--line)}
.dash-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-6)}
.dash-title{font-size:var(--fs-xs);font-weight:var(--fw-bold);color:var(--heading);text-transform:uppercase;letter-spacing:.06em}
.dash-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);margin-bottom:var(--space-6)}
.metric{background:var(--bg-panel);border-radius:var(--radius-sm);padding:var(--space-5);border:var(--border-w) solid var(--line);display:flex;flex-direction:column;justify-content:center;min-height:100px}
.metric-label{font-size:var(--fs-2xs);color:var(--fg-muted);text-transform:uppercase;letter-spacing:var(--ls-wide);margin-bottom:var(--space-1-5);font-weight:var(--fw-bold);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.metric-value{font-size:1.85rem;font-weight:var(--fw-black);color:var(--heading)}
.metric-change{font-size:var(--fs-xs);font-weight:var(--fw-bold);margin-top:var(--space-1);color:var(--color-green);white-space:nowrap}

.dash-chart{position:relative;height:130px;overflow:hidden;border-radius:var(--radius-sm);background:var(--bg-panel);border:var(--border-w) solid var(--line);padding:var(--space-4) var(--space-4) var(--space-2)}
.dash-chart-label{font-size:var(--fs-2xs);font-weight:var(--fw-bold);color:var(--fg-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--space-1-5)}
.dash-chart svg{width:100%;height:85px;display:block}

/* floating notification cards */
.float-card{position:absolute;background:var(--bg-card);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4);box-shadow:0 2px 12px rgba(5,43,93,.08);border:var(--border-w) solid var(--line);display:flex;align-items:center;gap:var(--space-2-5);z-index:var(--z-float);animation:floatIn var(--dur-slower) ease .8s both}
.float-card-top{top:-12px;right:-8px}
.float-card-bottom{bottom:-10px;left:-8px}
@keyframes floatIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.float-dot{width:8px;height:8px;border-radius:var(--radius-full);flex-shrink:0}
.float-text{font-size:var(--fs-2xs);color:var(--fg);font-weight:var(--fw-medium);line-height:1.3}
.float-text strong{font-weight:var(--fw-bold);color:var(--heading);display:block;font-size:var(--fs-2xs)}

/* ═══ VIDEO SECTION (video.html.twig) ═══
   Fixed positioning bug: legacy `.video-section{position:absolute;top:-180px}` relied on a
   `position:relative` wrapper that only existed in web/index.html, not in the flat Sulu block
   render, which left the embed pinned to the top of the document under the fixed nav. Flow +
   negative margin achieves the same overlap without needing a wrapper. */
.video-section{position:relative;z-index:var(--z-float);margin-top:-180px;padding:0 var(--space-8) 0}
.video-section .container{display:flex;justify-content:flex-end}
.video-embed-wrap{width:min(100%,50%);aspect-ratio:16/9;border-radius:var(--radius-xl);overflow:hidden;border:1px solid rgba(255,255,255,.28);background:var(--color-black);box-shadow:var(--shadow-lg)}
.video-embed-wrap iframe{width:100%;height:100%;display:block;border:0}

/* ═══ RESPONSIVE ═══ */
@media(max-width:1400px){
  .hero--video .hero-spline{width:100%;left:0}
}
@media(max-width:1024px){
  .video-section{margin-top:0;padding:var(--space-8) var(--space-8) var(--space-5)}
  .video-embed-wrap{width:min(100%,70%)}
  .video-section + .showcase{padding-top:var(--section-pad-y)}

  .hero-inner{flex-direction:column;text-align:center;padding:var(--space-28) var(--space-8) var(--space-20)}
  .hero--video::after{width:100%;background:linear-gradient(to bottom,rgba(0,0,0,.6) 0%,rgba(0,0,0,.3) 60%,transparent 100%)}
  .hero-content{max-width:100%;margin:0 auto}
  .hero-lead{margin:0 auto var(--space-2)}
  .di-rotator{margin-left:auto;margin-right:auto}
  .hero-ctas{justify-content:center}
  .hero-visual{max-width:480px;margin:0 auto}

  .showcase-inner{grid-template-columns:1fr;gap:var(--space-10);text-align:center}
  .showcase-inner .eyebrow,.showcase-inner .section-title,.showcase-inner .section-lead{text-align:center}
  .showcase-inner .section-lead{margin-inline:auto}
  .showcase-ctas{justify-content:center}
  .engine-cards{max-width:600px;margin:var(--space-8) auto 0}
}
@media(max-width:640px){
  .hero{min-height:auto}
  .hero--video .hero-spline{display:none}
  .hero-inner{padding:6.5rem var(--space-5) var(--space-14)}
  .hero-title-text{font-size:clamp(2rem,7vw,2.8rem);margin-bottom:var(--space-6)}
  .hero-lead--light{font-size:var(--fs-sm)}
  .di-rotator{height:2.2rem;margin-bottom:var(--space-8)}
  .di-verb{font-size:1.3rem;padding-left:var(--space-3)}
  .hero-visual{padding:var(--space-2)}

  .dashboard{padding:var(--space-5) var(--space-4)}
  .dash-header{margin-bottom:var(--space-4)}
  .dash-metrics{gap:var(--space-1-5);margin-bottom:var(--space-4)}
  .metric{padding:var(--space-2-5) var(--space-2);min-height:auto}
  .metric-label{font-size:var(--fs-3xs)}
  .metric-value{font-size:1.2rem}
  .metric-change{font-size:var(--fs-3xs)}
  .dash-chart{height:110px;padding:var(--space-3) var(--space-3) var(--space-1-5)}
  .dash-chart-label{font-size:var(--fs-3xs);margin-bottom:var(--space-1)}
  .float-card{display:none}

  .showcase{padding:var(--space-16) var(--space-5) var(--space-20)}
  .showcase-inner{gap:var(--space-8)}
  .showcase-ctas{gap:var(--space-2)}

  .video-section{margin-top:0;padding:var(--space-5) var(--space-5) var(--space-3)}
  .video-section .container{justify-content:center}
  .video-embed-wrap{width:100%}
}
@media(max-width:480px){
  .hero-visual{max-width:100%;width:100%}
  .metric-value{font-size:var(--fs-lg)}
  .dashboard{padding:var(--space-4) var(--space-3-5)}
  /* Two metrics per row from here down, not just under 380px: a 1fr track takes its floor from
     the item's min-content, and three German labels ("Absichtssignale") kept the whole dashboard
     -- and with it the showcase grid -- wider than a 390px phone. min-width:0 plus break-word
     removes that floor so the labels wrap instead of setting the page width. */
  .dash-metrics{grid-template-columns:1fr 1fr;gap:var(--space-1-5)}
  .metric{flex-direction:column;min-height:auto;padding:var(--space-2-5) var(--space-3);min-width:0}
  .metric-label{margin-bottom:var(--space-1);white-space:normal;font-size:var(--fs-3xs);overflow-wrap:break-word}
  .metric-change{white-space:normal}
}
@media(max-width:380px){
  .hero-inner{padding:var(--space-24) var(--space-4) var(--space-12)}
  .hero-title-text{font-size:1.8rem}
  .di-verb{font-size:var(--fs-lg)}
  .metric-value{font-size:1.05rem}
  .metric-change{font-size:var(--fs-3xs)}
}
@media(max-width:320px){
  .hero-inner{padding:5.5rem var(--space-3-5) var(--space-12)}
  .showcase{padding:var(--space-12) var(--space-3-5) var(--space-14)}
  .showcase-ctas{gap:var(--space-1-5)}

  .dashboard{padding:var(--space-3-5) var(--space-3)}
  .dash-header{margin-bottom:var(--space-3);flex-wrap:wrap;gap:var(--space-1-5)}
  .dash-title{font-size:var(--fs-2xs)}
  .dash-metrics{grid-template-columns:1fr 1fr;gap:var(--space-1);margin-bottom:var(--space-3)}
  .metric{padding:var(--space-2)}
  .metric-label{font-size:.52rem}
  .metric-value{font-size:var(--fs-md)}
  .metric-change{font-size:.52rem}
  .dash-chart{height:90px;padding:var(--space-2-5) var(--space-2-5) var(--space-1-5)}
  .dash-chart-label{font-size:var(--fs-3xs)}

  .engine-card-core{padding:1rem 1.1rem}
  .engine-card-core-name{font-size:var(--fs-base)}
  .engine-card-core-desc{font-size:var(--fs-xs)}
  .engine-card{padding:var(--space-3-5)}
  .engine-card-name{font-size:var(--fs-sm)}
}
