/* ==========================================================================
   Startseite Fremdsprachenabend Französisch · GHS
   Gleiche Farbwelt wie Quiz und Lehrbuch-App: hell, warm, Trikolore-Akzente
   ========================================================================== */
:root {
  --paper: #FBF7F0; --paper-2: #F4EEE3; --white: #fff;
  --ink: #1E2433; --ink-2: #4A5266; --ink-3: #7A8194; --line: rgba(30, 36, 51, .10);
  --bleu: #2253B0; --bleu-deep: #173A80; --enamel: #14306B; --rouge: #E1463E; --or: #F2B53A; --or-deep: #C98A12;
  --shadow-sm: 0 2px 8px rgba(30, 36, 51, .08);
  --shadow: 0 10px 30px rgba(30, 36, 51, .14), 0 2px 6px rgba(30, 36, 51, .06);
  --shadow-lg: 0 30px 70px rgba(23, 58, 128, .28), 0 10px 22px rgba(30, 36, 51, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: 'Fraunces', Georgia, serif; --sans: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --vh: 1vh;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--sans); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; user-select: none;
  background: radial-gradient(120% 90% at 25% 15%, #FFFDF8 0%, #F6F0E4 55%, #EDE4D3 100%); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark { display: inline-grid; grid-template-columns: repeat(3, 1fr); width: 38px; height: 38px; border-radius: 11px; overflow: hidden; box-shadow: var(--shadow-sm); flex: none; }
.mark i:nth-child(1) { background: var(--bleu); } .mark i:nth-child(2) { background: #fff; } .mark i:nth-child(3) { background: var(--rouge); }

/* ---------- Hintergrund ---------- */
.blobs i { position: fixed; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.blobs i:nth-child(1) { width: 38vw; height: 38vw; right: 4vw; top: -10vw; background: #BFD6FA; animation: float 18s ease-in-out infinite; }
.blobs i:nth-child(2) { width: 26vw; height: 26vw; right: 34vw; bottom: -12vw; background: #FFD9D4; animation: float 22s ease-in-out infinite reverse; }
.blobs i:nth-child(3) { width: 22vw; height: 22vw; left: -6vw; top: 30vh; background: #FBE7B0; animation: float 26s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(3vw, 2vw) scale(1.08); } }
#globe { position: fixed; top: 0; bottom: 0; right: -9vw; width: 66vw; z-index: 1; opacity: 0; transform: scale(.9) translateX(6vw); transition: opacity 1.4s var(--ease) .2s, transform 1.8s var(--ease) .2s; }
body.in #globe { opacity: 1; transform: none; }
#globe canvas { outline: none; }

/* ---------- Kopfzeile ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3.4vw, 54px); }
.ghs { display: flex; align-items: center; gap: 13px; } .ghs b { display: block; font: 700 19px/1.1 var(--serif); letter-spacing: -.01em; } .ghs small { font-weight: 800; font-size: 12.5px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.web { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; background: rgba(255, 255, 255, .8); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); font-weight: 800; font-size: 14.5px; color: var(--ink-2); }
.web .icon { color: var(--bleu); font-size: 17px; }

/* ---------- Inhalt ---------- */
.stage { position: fixed; z-index: 10; top: 66px; bottom: 34px; left: 0; width: min(64vw, 960px); padding: 1.2vh clamp(20px, 3.4vw, 54px) 1vh; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 3.4vh, 38px); }
.stage::-webkit-scrollbar { display: none; }
.hero > *, .choose > h2, .door { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
body.in .hero > *, body.in .choose > h2, body.in .door { opacity: 1; transform: none; }
body.in .hero > :nth-child(2) { transition-delay: .12s; } body.in .hero > :nth-child(3) { transition-delay: .24s; } body.in .hero > :nth-child(4) { transition-delay: .36s; }
body.in .choose > h2 { transition-delay: .45s; } body.in .door.quiz { transition-delay: .55s; } body.in .door.buch { transition-delay: .7s; }
.eyebrow { font: italic 600 clamp(17px, 2.5vh, 26px) var(--serif); color: var(--rouge); margin-bottom: .6vh; }
.hero h1 { font: 700 clamp(38px, 7.6vh, 96px)/.95 var(--serif); letter-spacing: -.035em; margin: 0; hyphens: manual; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--bleu); }
.when { display: flex; align-items: center; gap: 14px; margin: clamp(10px, 2.2vh, 24px) 0 clamp(8px, 1.8vh, 18px); padding: 9px 22px 9px 9px; width: fit-content; max-width: 100%; border-radius: 22px; background: #fff; box-shadow: var(--shadow); border-left: 6px solid var(--rouge); }
.cal { width: 66px; height: 70px; border-radius: 16px; display: grid; place-items: center; align-content: center; text-align: center; flex: none; color: #fff; background: linear-gradient(160deg, #2F63C6, var(--bleu-deep)); box-shadow: 0 8px 16px -8px var(--bleu); }
.cal small { font: 800 11px/1 var(--sans); letter-spacing: .12em; opacity: .85; } .cal b { font: 700 32px/1.05 var(--serif); }
.when-t { display: grid; gap: 2px; } .when-t b { font: 700 clamp(17px, 2.3vh, 22px)/1.15 var(--serif); } .when-t span { font-weight: 800; font-size: 14.5px; color: var(--ink-3); }
.lead { font: 500 clamp(16px, 2.3vh, 23px)/1.4 var(--serif); color: var(--ink-2); margin: 0; max-width: 570px; }

.choose > h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(8px, 1.8vh, 16px); font: 800 14px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.choose > h2::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.8vw, 26px); }

/* ---------- Die beiden Türen ---------- */
.door { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%; position: relative; height: clamp(262px, 41vh, 380px); border-radius: 30px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-lg); outline: none;
  transform-style: preserve-3d; will-change: transform; }
body.in .door { transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--ease), box-shadow .35s, opacity .9s var(--ease); }
body.in .door:hover, body.in .door:focus-visible { transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-8px) scale(1.018); box-shadow: 0 40px 80px rgba(23, 58, 128, .34), 0 12px 26px rgba(30, 36, 51, .16); }
body.in .door:focus-visible { box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--bleu), var(--shadow-lg); }
.door .art { position: absolute; inset: -4%; transition: transform .8s var(--ease); }
.door:hover .art { transform: scale(1.07) translate(calc((var(--mx) - 50%) * -.04), calc((var(--my) - 50%) * -.04)); }
.door .shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .34), transparent 60%); }
.door:hover .shine { opacity: 1; }
.door .inner { position: absolute; inset: 0; padding: clamp(16px, 2.4vh, 26px) clamp(18px, 1.6vw, 26px); display: grid; grid-template-rows: auto 1fr auto; transform: translateZ(30px); }
.badge { width: clamp(46px, 7vh, 62px); height: clamp(46px, 7vh, 62px); border-radius: 50%; display: grid; place-items: center; font-size: clamp(24px, 3.6vh, 32px); }
.txt { align-self: end; } .kicker { font: 900 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; opacity: .85; }
.door h3 { margin: 0 0 6px; font: 700 clamp(24px, 3.5vh, 36px)/1.05 var(--serif); letter-spacing: -.02em; }
.door p { margin: 0 0 10px; font-weight: 700; font-size: clamp(13.5px, 1.9vh, 16.5px); line-height: 1.4; max-width: 380px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; padding: 0; } .chips li { padding: 5px 13px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.go { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 11px 20px; border-radius: 999px; font-weight: 900; font-size: clamp(15px, 2.1vh, 18px); transition: gap .3s var(--ease), padding .3s var(--ease); }
.door:hover .go { gap: 16px; padding-right: 26px; } .go .icon { font-size: 20px; stroke-width: 2.6; }

.door.quiz { color: #fff; background: #0A1A4A; }
.door.quiz .art { background: linear-gradient(165deg, rgba(14, 40, 112, .30) 0%, rgba(6, 18, 58, .72) 55%, rgba(5, 14, 48, .96) 100%), url('../../quiz/assets/img/fra.webp') center 30% / cover; }
.door.quiz .badge { background: rgba(255, 255, 255, .95); color: var(--bleu); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.door.quiz .chips li { background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.door.quiz .go { background: var(--rouge); box-shadow: 0 14px 26px -10px rgba(225, 70, 62, .9); }
.door.quiz .mini { position: absolute; top: clamp(16px, 2.4vh, 26px); right: clamp(14px, 1.4vw, 22px); display: grid; gap: 7px; justify-items: end; }
.mini span { --cut: 14px; display: block; padding: 7px 24px; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(180deg, #1E46B0, #0A2468); border: 0; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%); box-shadow: inset 0 0 0 2px #F2B53A; }
.mini span:nth-child(2) { margin-right: 14px; } .mini b { color: #FFA927; }

.door.buch { color: var(--enamel); background: #F7D98A; }
.door.buch .art { background: radial-gradient(90% 70% at 85% 0%, rgba(255, 255, 255, .7), transparent 60%), linear-gradient(165deg, #FFF3D1 0%, #F8DC8F 50%, #EFB93C 100%); }
.door.buch .line { position: absolute; left: -2%; right: -2%; top: calc(clamp(16px, 2.4vh, 26px) + clamp(23px, 3.5vh, 31px) - 7px); height: 14px; border-radius: 99px; background: var(--enamel); display: flex; justify-content: space-around; align-items: center; opacity: .92; }
.door.buch .line i { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 6px solid #fff; box-shadow: 0 0 0 5px var(--enamel); animation: blink 3.6s infinite; }
.door.buch .line i:nth-child(2) { animation-delay: .6s } .door.buch .line i:nth-child(3) { animation-delay: 1.2s } .door.buch .line i:nth-child(4) { animation-delay: 1.8s } .door.buch .line i:nth-child(5) { animation-delay: 2.4s } .door.buch .line i:nth-child(6) { animation-delay: 3s }
@keyframes blink { 0%, 80%, 100% { background: #fff; } 90% { background: var(--rouge); } }
.door.buch .badge { background: var(--enamel); color: var(--or); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25), 0 8px 18px rgba(20, 48, 107, .4); } .door.buch .badge b { font: 900 clamp(24px, 3.8vh, 34px) var(--sans); }
.door.buch .chips li { background: rgba(20, 48, 107, .12); }
.door.buch .go { background: var(--enamel); color: #fff; box-shadow: 0 14px 26px -10px rgba(20, 48, 107, .9); }

.foot { position: fixed; z-index: 10; left: clamp(20px, 3.4vw, 54px); bottom: 10px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); opacity: .85; }

/* ---------- Vollbild-Ansicht ---------- */
.viewer { position: fixed; inset: 0; z-index: 100; background: var(--paper); visibility: hidden; --ox: 50vw; --oy: 70vh;
  clip-path: circle(0 at var(--ox) var(--oy)); transition: clip-path .85s var(--ease), visibility 0s linear .85s; }
.viewer.on { visibility: visible; clip-path: circle(160vmax at var(--ox) var(--oy)); transition: clip-path 1s var(--ease), visibility 0s; }
.vbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 14px; background: rgba(251, 247, 240, .97); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(30, 36, 51, .06); }
.back { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--bleu-deep); color: #fff; font-weight: 900; font-size: 15px; box-shadow: 0 8px 18px -8px var(--bleu-deep); transition: transform .2s var(--ease); }
.back:hover { transform: translateX(-3px); } .back .icon { font-size: 19px; stroke-width: 2.4; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(30, 36, 51, .06); }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--ink-2); transition: background .25s, color .25s; }
.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .6); } .seg button.active { background: #fff; color: var(--bleu-deep); box-shadow: var(--shadow-sm); } .seg .icon { font-size: 17px; }
.vinfo { font-weight: 800; font-size: 13px; color: var(--ink-3); white-space: nowrap; min-width: 200px; text-align: right; }
#frame { position: absolute; top: 54px; left: 0; width: 100%; height: calc(100% - 54px); border: 0; background: var(--paper); opacity: 0; transition: opacity .5s; }
#frame.loaded { opacity: 1; }
.vload { position: absolute; inset: 54px 0 0; display: none; place-items: center; z-index: 2; pointer-events: none; } .vload.on { display: grid; }
.vload span { width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(34, 83, 176, .15); border-top-color: var(--bleu); border-right-color: var(--rouge); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-height: 800px) { .lead { display: none; } .door p { font-size: 13px; margin-bottom: 8px; } .chips { margin-bottom: 9px; } }
@media (max-width: 1100px) {
  .stage { width: 100vw; } #globe { opacity: .35 !important; right: -30vw; width: 90vw; }
  .vinfo { display: none; } .seg button span { display: none; } .back span { display: inline; }
}
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } .web { display: none; } body { overflow: auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
