/* Variante B „Hell“ aus dem Canvas-Entwurf, Farben aus der GE-Vernova-Website (Evergreen, Urgency Green, Neutrals). */
:root {
  --bg: #FFFFFF;
  --stage: #EAEBEB;
  --panel: #F5F5F5;
  --line: #EAEBEB;
  --line-strong: #D7DBDB;
  --text: #212121;
  --muted: #595959;
  --soft: #737373;
  --brand: #005E60;
  --brand-line: #519595;
  --cta: #C8FF08;
  --cta-text: #005E60;
  --disabled-bg: #E7EEEE;
  --disabled-text: #5C898A;
  --font: 'Inter', system-ui, sans-serif;
  /* Hausschrift für Überschriften, vom Kunden geliefert (Klim-Lizenz von GE Vernova), auf Latin reduziert */
  --display: 'Sons Condensed', 'Arial Narrow', sans-serif;
}

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sons Condensed'; font-weight: 800; font-display: swap; src: url(fonts/sons-condensed-extrabold-latin.woff2) format('woff2'); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Grid statt Flex: die 1fr-Zeile streckt sich auf min-height, die Bühne füllt den Bildschirm. */
.page { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--soft); }

/* Mobil: Panel löst sich auf, Reihenfolge über Grid-Bereiche */
.layout {
  display: grid;
  grid-template-areas: "intro" "variants" "stage" "actions";
  grid-template-rows: auto auto minmax(300px, 1fr) auto;
  padding: 0 20px;
}
.panel { display: contents; }
.intro { grid-area: intro; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 16px; }
.segmented { grid-area: variants; }
.stage { grid-area: stage; margin-top: 16px; }
.actions { grid-area: actions; padding-top: 16px; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
h1 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.lead { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--text); }
.desc { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.product-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 3px;
}

.segmented { display: flex; gap: 8px; }
.segmented button {
  flex: 1 1 0; min-height: 44px; border: 1px solid var(--brand-line); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--brand); font-size: 15px; font-weight: 500;
}
.segmented button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-weight: 600; }

.stage { position: relative; border-radius: 16px; overflow: hidden; background: var(--stage); min-height: 300px; }
model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; background-color: var(--stage); --poster-color: var(--stage); }
.chip {
  position: absolute; z-index: 1; padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.88); color: var(--text); font-size: 12px; font-weight: 500; pointer-events: none;
}
.chip-top { top: 12px; left: 12px; }
.chip-bottom { bottom: 12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; white-space: nowrap; padding: 6px 12px; }

.overlay {
  position: absolute; inset: 0; z-index: 2; margin: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(234, 235, 235, 0.72); text-align: center; padding: 24px;
}
.overlay-title { font-size: 16px; font-weight: 600; }
.bar { width: 200px; height: 6px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
#progress-bar { width: 0; height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.2s; }
#progress-text { font-size: 13px; color: var(--muted); }
#load-error { font-size: 15px; line-height: 1.45; }

#ar-panel, #noar-panel, #qr-panel { display: none; flex-direction: column; gap: 10px; }

/* Primärbutton wie auf gevernova.com: Urgency Green, Evergreen-Schrift, weißer Kreis mit Icon */
.primary {
  min-height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--cta); color: var(--cta-text); font-size: 17px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 24px;
}
.icon-circle { width: 44px; height: 44px; border-radius: 999px; background: #FFFFFF; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.primary:disabled { background: var(--disabled-bg); color: var(--disabled-text); cursor: default; }
.primary:disabled .icon-circle { color: var(--disabled-text); }
@media (hover: hover) {
  .primary:not(:disabled):hover { background: var(--brand); color: #FFFFFF; }
  .secondary:hover { background: var(--brand); color: #FFFFFF; }
  .foot a:hover { color: var(--brand); }
}
.note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); text-align: center; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--brand); }
.notice svg { flex: none; margin-top: 1px; }
.notice div { display: flex; flex-direction: column; gap: 4px; }
.notice strong { font-size: 15px; font-weight: 600; color: var(--text); }
.notice span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.secondary {
  min-height: 48px; border: 1px solid var(--brand-line); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--brand); font-size: 15px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#link-field {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #FFFFFF; color: var(--text); font: 13px var(--font);
}

#qr-panel { flex-direction: row; gap: 20px; align-items: center; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
#qr-img { flex: none; background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; }
#qr-panel div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#qr-panel strong { font-size: 17px; font-weight: 600; }
#qr-panel span { font-size: 14px; line-height: 1.45; color: var(--muted); }
#qr-panel #qr-url { font-size: 12px; font-weight: 600; color: var(--brand); overflow-wrap: break-word; }

.foot { display: flex; justify-content: center; gap: 20px; padding: 14px 20px 18px; font-size: 12px; }
.foot a { color: var(--muted); }

/* Sichtbarkeit nur über den Seitenzustand (Spec 6) */
body[data-state="loading"] #loading { display: flex; }
body[data-state="error"] #load-error { display: flex; }
body[data-state="ar"] #ar-panel,
body[data-state="error"] #ar-panel,
body[data-state="loading"] #ar-panel { display: flex; }
body[data-state="unsupported"] #noar-panel { display: flex; }
body[data-state="qr"] #qr-panel { display: flex; }

/* iFrame-Einbettung (?embed): nur Bühne und Panel. Eine Grid-Zeile, sonst bleibt die leere 1fr-Zeile
   von Kopf/Fuß stehen. Schmaler Rand statt 20/40 px, damit Fokusrahmen am iFrame-Rand sichtbar bleiben. */
.embed .top, .embed .foot, .embed #product-link { display: none; }
.embed .page { grid-template-rows: 1fr; }
.embed .layout { padding: 8px; }

/* Ab 768 px: breitere Ränder und größere Typografie, Inhalt untereinander und zentriert */
@media (min-width: 768px) {
  .top, .layout, .foot { width: 100%; max-width: 760px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
  .top { padding-top: 24px; padding-bottom: 24px; }
  .layout { grid-template-rows: auto auto minmax(420px, 1fr) auto; padding-bottom: 40px; }
  .stage { border-radius: 20px; }
  .intro { gap: 8px; }
  h1 { font-size: 52px; line-height: 0.98; margin-bottom: 8px; }
  .lead { font-size: 19px; }
  .desc { font-size: 16px; line-height: 1.5; }
  .product-link { font-size: 16px; }
  .foot { justify-content: flex-start; font-size: 13px; padding-bottom: 28px; }
  body[data-state="loading"] #ar-panel { display: none; }
}

/* Ab 1100 px nebeneinander. Eine Zeile, beide Spalten gleich hoch: die Bühne hat eine Mindesthöhe
   und wächst mit, wenn die Textspalte höher ist. align-content: start verhindert, dass sich die
   Zeile auf die Fensterhöhe streckt (sonst Luft über der Überschrift und Überhang unter der Bühne). */
@media (min-width: 1100px) {
  .top, .layout, .foot { max-width: 1200px; }
  .layout {
    grid-template-areas: "stage panel";
    grid-template-columns: minmax(0, 1.6fr) minmax(400px, 1fr);
    grid-template-rows: minmax(min(620px, 72vh), auto);
    align-content: start;
    gap: 40px;
  }
  .stage { margin-top: 0; }
  /* Oben bündig mit der Bühne: Einleitung und Umschalter; unten bündig: AR- bzw. QR-Block */
  .panel { grid-area: panel; display: flex; flex-direction: column; gap: 28px; }
  .intro { padding: 0; }
  .actions { padding-top: 0; margin-top: auto; }
  #qr-panel { gap: 16px; }
  #qr-img { width: 112px; height: 112px; }
}
