/* ===== wasserfenster.css ===== */
:root{
  --bg:#0b0c10;
  --panel:#121319;
  --text:#e8eaed;
  --muted:#b6bcc6;
  --brand:#4da3ff;
  --ring:rgba(77,163,255,0.4);
  --radius:22px;
  --shadow:0 10px 30px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background: radial-gradient(1200px 800px at 15% -10%, #121827 0%, #0b0c10 55%, #0b0c10 100%);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, 'Helvetica Neue', Arial, 'Apple Color Emoji','Segoe UI Emoji';
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.site-header{
  position:sticky; top:0; z-index:5;
  backdrop-filter:saturate(140%) blur(6px);
  background:linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  padding:14px 18px;
}
.back-link{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
}
.back-link:hover{color:var(--text)}

.container{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding: clamp(18px, 3vw, 36px);
}

.hero h1{
  margin: clamp(8px, 1.2vw, 14px) 0 10px;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height:1.15;
  letter-spacing:-0.02em;
  text-wrap:balance;
}

.intro{
  color:var(--muted);
  font-size: clamp(16px, 1.4vw, 18px);
  max-width: 88ch;
}
.intro p{margin:0 0 14px}

.divider{
  border:0; height:1px;
  margin: 24px 0 8px;
  background:linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.22), rgba(255,255,255,.08));
}

.card-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 24px);
}
@media (max-width: 640px){
  .card-grid{ grid-template-columns: 1fr; }
}

.card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 50% -10%, rgba(77,163,255,.08), rgba(77,163,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration:none;
  color:var(--text);
  position:relative;
  isolation:isolate;
  outline: none;
}
.card:focus-visible{
  box-shadow: 0 0 0 4px var(--ring), var(--shadow);
}
.card .thumb{
  width:120px; height:120px;
  display:grid; place-items:center;
  overflow:hidden;
  border-radius: 20px;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  transition: transform .25s ease;
}
.card img{max-width:90%; height:auto; display:block}

.card-title{
  margin:6px 0 0;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight:700;
  letter-spacing:.2px;
}

.card:hover{
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(77,163,255,.35);
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.card:hover .thumb{ transform: scale(1.05); }

/* Overlay + Modal */
.overlay{
  position:fixed; inset:0;
  /* sichere, mobile-friendly Raender inkl. Notch */
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
           max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(0,0,0,.66);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:50;
}
.overlay[aria-hidden="false"]{ display:flex; }

.modal{
  position:relative;
  width:auto;
  max-width: 96vw;
  max-height: 92vh;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transform: translateY(16px) scale(.985);
  opacity:0;
  transition: transform .3s ease, opacity .3s ease;
}
.overlay[aria-hidden="false"] .modal{
  transform: translateY(0) scale(1);
  opacity:1;
}

/* Wrapper centers the iframe and lets it scale to fit */
.frame-wrap{
  position: relative;
  display: block;
  width: 960px;   /* Fallback */
  height: 540px;  /* Fallback */
  max-width: 96vw;
  max-height: 92vh;
  overflow: hidden;         /* clip to rounded corners */
  border-radius: 22px;
  background: transparent;
}

/* The iframe will be sized to its content and scaled via JS */
iframe{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
  background: transparent;
  transform-origin: top left;
}

/* Close button now INSIDE top-right and smaller, fitting into the frame */


.modal-close{
  position:absolute;
  top:-18px; right:-18px;
  width:48px; height:48px;
  border:0; background:transparent; padding:0; cursor:pointer;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.55));
  transition: transform .15s ease;
}
.modal-close:hover{ transform: scale(1.07); }
.modal-close img{ width:48px; height:48px; display:block }

/* Fly-in animation */
.fly-in{
  opacity:0; transform: translateY(18px);
  animation: flyUp .6s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes flyUp{
  to{ opacity:1; transform: translateY(0); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .card, .card .thumb, .modal{ transition:none; }
  .fly-in{ animation:none; opacity:1; transform:none }
}

@media (max-width: 480px){
  .frame-wrap{ border-radius: 16px; }
}
