/* "Sturm im Außen, Ruhe im Inneren": a stormy sky above still water, a code
   word at the door, a fan of cards around a calm light, and the drawn card
   turning over in front. Nothing on this page is set in italics. */

@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/wp-content/themes/gcafe/fonts/marcellus-v14-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/wp-content/themes/gcafe/fonts/alegreya-v41-latin-variable.woff2') format('woff2');
}

:root {
  --tiefe: #0f1520;
  --sturm: #2f4466;
  --see: #1f6670;
  --gold: #d8b45c;
  --gold-hell: #f1dc9e;
  --schnee: #eef1f6;
  --nebel: #a9b6c8;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --font-body: "Alegreya", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--tiefe);
  color: var(--schnee);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#himmel { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 36px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.kopf { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 8.5vw, 3rem);
  line-height: 1.08;
  margin: 0.3em 0 0.45em;
  color: var(--gold-hell);
  text-wrap: balance;
  text-shadow: 0 0 24px rgba(216, 180, 92, 0.35), 0 2px 12px rgba(15, 21, 32, 0.5);
}
.intro { margin: 0; max-width: 34em; color: var(--schnee); text-wrap: pretty; text-shadow: 0 1px 10px rgba(15, 21, 32, 0.6); }

/* buttons */
.knopf {
  font: inherit;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--tiefe);
  cursor: pointer;
}
.knopf:hover { background: var(--gold-hell); }
.leise {
  font: inherit;
  font-size: 0.9rem;
  color: var(--gold-hell);
  background: transparent;
  border: 1px solid rgba(216, 180, 92, 0.45);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
}
.leise:hover { background: rgba(216, 180, 92, 0.12); }
.knopf:focus-visible, .leise:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 3px; }

/* the door */
body.verschlossen { overflow: hidden; }
.tor {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  padding: 24px 18px;
  overflow-y: auto;
}
.tor-inhalt {
  width: 100%;
  max-width: 360px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.tor-auge {
  width: 150px;
  color: var(--gold);
  filter: drop-shadow(0 0 18px rgba(216, 180, 92, 0.4));
  margin-bottom: 6px;
  animation: auge-drehen 60s linear infinite;
}
@keyframes auge-drehen { to { transform: rotate(-360deg); } }
.tor-titel {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.12;
  color: var(--gold-hell);
  text-wrap: balance;
}
.tor-text { margin: 0 0 8px; color: var(--nebel); }
.tor-label { font-size: 0.9rem; color: var(--gold); }
.tor input {
  font: inherit;
  width: 100%;
  text-align: center;
  color: var(--schnee);
  background: rgba(15, 21, 32, 0.8);
  border: 1px solid rgba(216, 180, 92, 0.5);
  border-radius: 10px;
  padding: 11px 14px;
}
.tor input:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 2px; }
.tor-hinweis { margin: 4px 0 0; min-height: 1.5em; font-size: 0.95rem; color: var(--gold-hell); }

/* drawing: the fan sits in the calm light of the storm's eye */
.ziehen { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.anleitung { margin: 0; max-width: 30ch; text-align: center; font-weight: 600; color: var(--gold-hell); text-wrap: balance; text-shadow: 0 1px 10px rgba(15, 21, 32, 0.6); }
.anleitung[hidden], .faecher[hidden], .gezogen[hidden] { display: none; }
.auge-licht {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(380px, 92vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 220, 158, 0.22), rgba(216, 180, 92, 0.06) 45%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.faecher { position: relative; width: 100%; max-width: 440px; height: 215px; }
.fkarte {
  position: absolute;
  left: 50%;
  bottom: 52px;
  width: 84px;
  height: 130px;
  margin-left: -42px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
  transform-origin: 50% 160%;
  transform: rotate(var(--w)) translateY(0);
  transition: transform 0.25s ease, opacity 0.3s ease;
}
.fkarte:hover, .fkarte:focus-visible { transform: rotate(var(--w)) translateY(-18px); }
.fkarte:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 3px; }
.fkarte.gezogen { transform: rotate(var(--w)) translateY(-60px); opacity: 0; }
.ruecken {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 50%, rgba(241, 220, 158, 0.2), transparent 60%),
    linear-gradient(170deg, #3d5a85, var(--sturm) 45%, var(--see));
  border: 1.5px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 0 0 4px var(--sturm), inset 0 0 0 5px rgba(216, 180, 92, 0.5);
  display: grid;
  place-items: center;
}
.ruecken svg { width: 80%; height: auto; color: var(--gold); }

.gezogen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  width: 100%;
  border: 1px solid rgba(216, 180, 92, 0.4);
  border-radius: 18px;
  background: rgba(31, 60, 92, 0.6);
  text-align: center;
}
.gezogen p { margin: 0; }
.gezogen strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--gold-hell); }
.geraet-hinweis { font-size: 0.88rem; color: var(--nebel); max-width: 30em; }

/* the drawn card */
.schleier {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(28, 42, 66, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  padding: 16px;
  overflow-y: auto;
}
.schleier[hidden] { display: none; }
.dialog { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: auto; }
.kartenhalter { perspective: 1400px; }
.kartenhalter.auftauchen { animation: auftauchen 0.75s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.kartenhalter.auftauchen .seite.ruecken { animation: leuchten 2s ease-in-out both; }
@keyframes auftauchen {
  from { transform: scale(0.5) translateY(60px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes leuchten {
  0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 0 0 4px var(--sturm), inset 0 0 0 5px rgba(216, 180, 92, 0.5); }
  55% { box-shadow: 0 0 70px rgba(241, 220, 158, 0.55), inset 0 0 0 4px var(--sturm), inset 0 0 0 5px rgba(241, 220, 158, 0.9); }
}
.dialog-aktionen { transition: opacity 0.6s ease; }
.dialog.wartet .dialog-aktionen { opacity: 0; pointer-events: none; }
.grosskarte {
  position: relative;
  width: min(330px, 88vw);
  aspect-ratio: 5 / 7.4;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 1.9s cubic-bezier(0.45, 0, 0.2, 1);
}
.grosskarte.offen { transform: rotateY(180deg); }
.seite {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.seite.ruecken svg { width: 76%; }
.vorderseite {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 20%, rgba(241, 220, 158, 0.25), transparent 45%),
    linear-gradient(175deg, #34507a, #27405f 55%, #1d5560);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 50px rgba(216, 180, 92, 0.3), inset 0 0 0 6px #27405f, inset 0 0 0 7px rgba(216, 180, 92, 0.55);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
}
.kdeck { margin: 0; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.motiv {
  width: 22%;
  height: auto;
  margin: 12px 0 4px;
  color: var(--gold-hell);
  filter: drop-shadow(0 0 10px rgba(241, 220, 158, 0.45));
}
.vorderseite h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 7vw, 1.85rem);
  line-height: 1.1;
  margin: 2px 0 4px;
  color: var(--gold-hell);
  text-wrap: balance;
}
.kwort { margin: 0; font-weight: 700; color: var(--gold); text-wrap: balance; }
.ktext { margin: 10px 0 0; font-size: 0.96rem; line-height: 1.45; text-wrap: pretty; }
.kimpuls {
  margin-top: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(216, 180, 92, 0.4);
  font-size: 0.9rem;
  line-height: 1.4;
}
.kimpuls p { margin: 0; }
.kimpuls-titel { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px !important; }
.kfuer { margin: auto 0 0; padding-top: 10px; font-size: 0.78rem; color: var(--nebel); }

footer { margin-top: auto; align-self: center; text-align: center; font-size: 0.85rem; color: var(--schnee); display: flex; flex-direction: column; gap: 2px; padding: 12px 22px; border-radius: 16px; background: rgba(16, 60, 69, 0.55); }
footer strong { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 1rem; }
footer a { color: var(--schnee); text-underline-offset: 3px; }
footer a:hover { color: var(--gold-hell); }
.zurueck { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .fkarte, .grosskarte { transition: none; }
  .kartenhalter.auftauchen, .kartenhalter.auftauchen .seite.ruecken, .tor-auge { animation: none; }
}
