/* style.css */
:root{
  /* Standard (bunt) */
  --bg:#f6ff00;
  --fg:#0b0b0c;
  --accent:#0b0b0c;

  /* Bürokratisch fad (barrierefreundlich) */
  --bgB:#f6f6f6;
  --fgB:#111214;
  --panelB:#ffffff;

  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --r:18px;
  --gap:14px;
  --btnH:50px;
  --stroke: 2px;

  --topPad: 86px; /* Platz für Fixed-Header */

  /* Einheitliche Höhe für Statement & Ergebnis */
  --fitH: 170px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  overflow-x:hidden;
}

/* Skip link */
.skip{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip:focus{
  left:12px; top:12px;
  width:auto;height:auto;
  padding:10px 12px;
  background:#fff;
  color:#000;
  z-index:9999;
  border-radius:12px;
}

/* Grain overlay (Safari safe: always under UI) */
.grain{
  pointer-events:none;
  position:fixed;
  inset:0;
  z-index:0; /* IMPORTANT */
  opacity:.18;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* Mode: bland */
body.mode-bland{
  background: var(--bgB);
  color: var(--fgB);
}
body.mode-bland .grain{ display:none; }
body.mode-bland .panel,
body.mode-bland .info,
body.mode-bland .listenCard,
body.mode-bland .embedCard{
  background: var(--panelB);
  border-color: rgba(0,0,0,.14);
}

/* Topbar */
.topbar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:1000; /* IMPORTANT (Safari click fix) */
  padding: 14px 16px;
  display:flex;
  justify-content:flex-end;
}
.topbar__right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 999px;
  border: var(--stroke) solid rgba(0,0,0,.85);
  background: rgba(255,255,255,.2);
  color: inherit;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
body.mode-bland .pill{
  background: #fff;
  border-color: rgba(0,0,0,.25);
}
.pill__label{
  font-size: 11px;
  letter-spacing: .12em;
  text-transform:uppercase;
  opacity:.85;
}
.pill__value{
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 12px;
}

/* Menu */
.menu{
  position:fixed;
  inset:0;
  z-index:2000; /* IMPORTANT */
}
.menu__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}
.menu__panel{
  position:absolute;
  right: 14px;
  top: 14px;
  width: min(420px, calc(100% - 28px));
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  color:#0b0b0c;
  border: 2px solid rgba(0,0,0,.55);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  overflow:hidden;
}
body.mode-bland .menu__panel{ background:#fff; }
.menu__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px 10px;
}
.menu__title{
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 18px;
}
.menu__close{
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor:pointer;
  padding: 6px 10px;
  border-radius: 12px;
}
.menu__close:hover{ background: rgba(0,0,0,.06); }
.menu__nav{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 0 14px 12px;
}
.menu__link{
  display:block;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: inherit;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.12);
}
.menu__link:hover{ background: rgba(0,0,0,.06); }
.menu__sep{
  width: 100%;
  border: 0;
  height: 1px;
  background: rgba(0,0,0,.14);
  margin: 6px 0;
}
.menu__hint{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(0,0,0,.12);
}
.menu__hintTitle{
  font-weight: 900;
  font-size: 12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom: 8px;
}
.menu__hintList{
  margin:0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

/* Main spacing + Safari stacking: content over grain */
main{
  padding-top: var(--topPad);
  position: relative; /* IMPORTANT */
  z-index: 1;         /* IMPORTANT */
}

/* Hero */
.hero{
  padding: 56px 0 18px;
}

/* Full-screen first view (Hero) */
.hero--screen{
  min-height: calc(100vh - var(--topPad));
  display:flex;
  align-items:center;
}
.hero__inner{
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  display:grid;
  gap: 18px;
}
.hero__title{
  margin:0;
  font-size: clamp(52px, 9vw, 112px);
  line-height: .88;
  letter-spacing: -.03em;
  font-weight: 1000;
}
.hero__sub{
  margin:0;
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.55;
  opacity:.92;
}
.scroll{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-top: 8px;
  text-decoration:none;
  color: inherit;
  font-weight: 800;
  letter-spacing:.08em;
  font-size: 12px;
}
.scroll__arrow{
  font-size: 18px;
  transform: translateY(-1px);
}

/* Sections */
.section{
  padding: 22px 0 36px;
}

/* Sections that should occupy one full viewport (Generator / About / Listen) */
.section--screen{
  min-height: calc(100vh - var(--topPad));
  display:flex;
  align-items: center;
}
@media (max-width: 960px){
  .section--screen{ align-items: flex-start; }
}
.section--screen .wrap,
.section--screen .wrap--wide{
  padding-top: 6px;
  padding-bottom: 6px;
}
.wrap{
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}
.wrap--wide{
  width: min(1160px, calc(100% - 32px));
}
.section__kicker{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity:.85;
  margin-bottom: 10px;
}
.section__title{
  margin: 0 0 14px 0;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing:-.015em;
}
.app{
  margin-top: 6px;
}

/* Poster layout */
.poster{
  display:grid;
  grid-template-columns: .9fr 1.1fr;
  gap: var(--gap);
  align-items: stretch;
}
@media (max-width: 960px){
  .poster{ grid-template-columns: 1fr; }
}

/* Panels */
.panel{
  border-radius: 20px;
  border: var(--stroke) solid rgba(0,0,0,.85);
  background: rgba(255,255,255,.22);
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
  position:relative;
  overflow:hidden;
}
.panel--left{ min-height: 440px; }
.panel--right{ min-height: 440px; }

/* Blocks */
.block{ margin-bottom: 14px; }
.block--stretch{ margin-bottom: 12px; }
.block__label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.9;
  margin-bottom: 8px;
}

/* Fit boxes (same height statement/result) */
.fitbox{
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,.6);
  background: rgba(255,255,255,.55);
  min-height: var(--fitH);
  padding: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
body.mode-bland .fitbox{ background:#fff; border-color: rgba(0,0,0,.22); }
.fitbox--result{ min-height: var(--fitH); }

.fittext{
  font-size: 28px; /* JS passt an */
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -.01em;
  width:100%;
  border:0;
  background: transparent;
  color: inherit;
  cursor:pointer;
}

/* Statement button */
.statement{ font-family: var(--sans); }
.hintline{
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  opacity: .82;
}

/* Toggles */
.toggles{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.toggle{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 14px;
  user-select:none;
}
.toggle input{ position:absolute; opacity:0; pointer-events:none; }
.toggle__box{
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,.7);
  background: rgba(255,255,255,.3);
  display:inline-block;
}
.toggle input:checked + .toggle__box{ background: rgba(0,0,0,.85); }
.toggle__text{ opacity:.95; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: var(--btnH);
  padding: 0 14px;
  border-radius: 999px;
  border: var(--stroke) solid rgba(0,0,0,.85);
  background: rgba(255,255,255,.3);
  color: inherit;
  font-weight: 900;
  letter-spacing:.06em;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  cursor:pointer;
  text-decoration:none;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }
body.mode-bland .btn{ background:#fff; border-color: rgba(0,0,0,.25); }

.btn--primary{
  background: rgba(0,0,0,.86);
  color: #fff;
}
body.mode-bland .btn--primary{
  background:#111214;
  color:#fff;
}
.btn--big{
  height: 56px;
  font-size: 12px;
  letter-spacing:.06em;
  padding: 0 18px;
}

/* CTA buttons (HÖREN / Spotify teilen / Seite teilen): smaller text so nothing gets clipped */
.ctaBand .btn,
.listenCard__actions .btn{
  font-size: 10px;
  letter-spacing: .05em;
}

/* In tight widths, allow CTAs to shrink instead of overflowing */
.ctaBand .btn,
.listenCard__actions .btn{
  min-width: 0;
}

/* Equal-width action buttons */
.cta-row .btn,
.action-row .btn{
  flex: 1 1 0;
}

/* CTA row */
.cta-row{
  display:flex;
  gap: 10px;
}

/* Result panel: dock actions at bottom */
.resultShell{
  min-height: 100%;
  display:flex;
  flex-direction:column;
}
.actionsDock{
  margin-top:auto;
  padding-top: 8px;
}
.action-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.copyhint{
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  opacity: .9;
  min-height: 16px;
}

/* Result labels */
.result__sub{
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  opacity: .85;
}
.geninfo{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.22);
  background: rgba(255,255,255,.35);
  font-size: 13px;
  line-height: 1.45;
}
body.mode-bland .geninfo{ background:#fff; }

/* Info bar spanning both columns */
.info{
  grid-column: 1 / -1;
  border-radius: 20px;
  border: var(--stroke) solid rgba(0,0,0,.85);
  background: rgba(255,255,255,.2);
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.12);
}
.info__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.info__label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity:.9;
}
.info__grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 960px){
  .info__grid{ grid-template-columns: 1fr; }
}
.info__item{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.35);
  padding: 12px;
}
body.mode-bland .info__item{ background:#fff; }
.info__k{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing:.06em;
  margin-bottom: 6px;
}
.info__v{
  font-size: 13px;
  line-height: 1.5;
  opacity:.95;
}

/* About */
.section--about .prose{
  max-width: 92ch;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
}
.section--about .prose p{ margin: 0 0 18px 0; }
.ctaBand{
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: stretch;
}

/* Listen section */
.listenGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 960px){
  .listenGrid{ grid-template-columns: 1fr; }
}
.listenCard,
.embedCard{
  border-radius: 20px;
  border: var(--stroke) solid rgba(0,0,0,.85);
  background: rgba(255,255,255,.22);
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.12);
}
.listenCard__label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing:.18em;
  text-transform: uppercase;
  opacity:.9;
  margin-bottom: 10px;
}
.listenCard__copy{
  margin: 0 0 14px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  opacity: .92;
}

/* Paragraph spacing inside HÖREN copy */
.listenCard__copy p{ margin: 0 0 16px 0; }
.listenCard__copy p:last-child{ margin-bottom: 0; }

.listenCard__actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Equal-width share CTAs */
.listenCard__actions .btn,
.ctaBand .btn{
  flex: 1 1 0;
  min-width: 220px;
  text-align: center;
}

.embedCard iframe{ display:block; width:100%; }

/* Links intro */
.linksIntro{
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  opacity: .92;
  margin: 10px 0 14px 0;
  max-width: 78ch;
}

/* Links row */
.linksrow{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn--link{ background: rgba(255,255,255,.22); }

/* Footer */
.foot{
  position: sticky;
  bottom: 0;
  padding: 14px 0;
  background: rgba(255,255,255,.18);
  border-top: 1px solid rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}
body.mode-bland .foot{ background: rgba(255,255,255,.85); }

.foot__wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.foot__mid{
  text-align:center;
  font-family: var(--mono);
  font-size: 12px;
  opacity: .86;
}
.dot{ padding: 0 8px; }
.muted{ opacity:.8; }

.linkbtn{
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing:.12em;
  text-transform: uppercase;
  color: inherit;
  cursor:pointer;
  padding: 8px 10px;
  border-radius: 12px;
}
.linkbtn:hover{ background: rgba(0,0,0,.06); }
