/* ═══════════════════════════════════════════════════════
   MGHM.IO — Salt Flats + Matte Glass
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --fg: rgba(255, 255, 255, 0.95);
  --fg-2: rgba(255, 255, 255, 0.7);
  --fg-3: rgba(255, 255, 255, 0.45);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background: #9B9285;
}

#salt {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════
   SCENE
   ═══════════════════════════════════════════════════════ */

.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ═══════════════════════════════════════════════════════
   GLASS CARD — shared
   ═══════════════════════════════════════════════════════ */

.glass {
  position: absolute;
  width: 360px;
  height: 520px;
  border-radius: 36px;
  will-change: transform;
  cursor: default;

  background: rgba(245, 242, 238, 0.08);
  backdrop-filter: blur(10px) saturate(1.4) brightness(1.005);
  -webkit-backdrop-filter: blur(10px) saturate(1.4) brightness(1.005);

  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.06),
    0 0 0 0.5px rgba(255, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03),
    inset -1px 0 0 rgba(0, 0, 0, 0.02);
}

.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.7) 70%,
    transparent
  );
  border-radius: 36px 36px 0 0;
  z-index: 2;
}

.glass-front {
  z-index: 2;
  opacity: 0;
  animation: glassIn 1.2s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-back {
  z-index: 1;
  visibility: hidden;
}

.glass-imp {
  z-index: 1;
  visibility: hidden;
}

/* ── Glass content ────────────────────────────────────── */

.glass-content {
  position: relative;
  z-index: 1;
  padding: 48px 40px 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Entrance animations (first load only) ────────────── */

.anim-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.anim-d2 { animation-delay: 1.0s; }
.anim-d3 { animation-delay: 1.3s; }
.anim-d4 { animation-delay: 1.5s; }
.anim-d5 { animation-delay: 1.8s; }

/* ── Brand ────────────────────────────────────────────── */

.g-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-logo {
  width: 55%;
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.g-logo-sm { width: 36% !important; }

/* ── Spacers ──────────────────────────────────────────── */

.g-spacer    { height: 36px; }
.g-spacer-sm { height: 32px; }
.g-spacer-xs { height: 20px; }

/* ── Quote ────────────────────────────────────────────── */

.g-quote {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

.g-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-3);
  margin-top: 12px;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */

.g-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px 14px 36px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.g-btn svg {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.5;
}

.g-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.g-btn:hover svg { transform: translateX(2px); opacity: 0.8; }
.g-btn:active { transform: translateY(0); transition-duration: 0.1s; }

.g-btn-login { width: 100%; justify-content: center; }

/* ── Back button ──────────────────────────────────────── */

.g-back, .imp-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-3);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.g-back:hover, .imp-close:hover {
  color: var(--fg-2);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.g-back svg, .imp-close svg { opacity: 0.5; transition: transform 0.3s; }
.g-back:hover svg, .imp-close:hover svg { transform: translateX(-2px); opacity: 0.8; }

/* ── Footer ───────────────────────────────────────────── */

.g-foot { margin-top: 32px; }

.g-impressum {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.g-impressum:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   LOGIN FORM
   ═══════════════════════════════════════════════════════ */

.login-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group { display: flex; flex-direction: column; gap: 6px; }

.input-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.03em;
  padding-left: 4px;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.input-field::placeholder { color: var(--fg-3); }

.input-field:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* ═══════════════════════════════════════════════════════
   IMPRESSUM CONTENT
   ═══════════════════════════════════════════════════════ */

.impressum-content {
  padding: 36px 32px 24px;
  justify-content: flex-start !important;
}

.imp-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 8px;
  -webkit-overflow-scrolling: touch;
}

.imp-scroll::-webkit-scrollbar { width: 3px; }
.imp-scroll::-webkit-scrollbar-track { background: transparent; }
.imp-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }

.imp-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 20px;
}

.imp-section { margin-bottom: 16px; }

.imp-heading {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.imp-section p {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--fg-3);
  margin-bottom: 6px;
}

.imp-link {
  color: var(--fg-2);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 2px;
  transition: color 0.3s;
}
.imp-link:hover { color: var(--fg); }

.imp-close {
  margin-top: 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glassIn {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 440px) {
  .glass {
    width: calc(100vw - 48px);
    height: 500px;
    border-radius: 28px;
  }
  .glass-content { padding: 36px 28px 28px; }
  .g-quote { font-size: 20px; }
  .g-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .glass-front, .anim-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   FALLBACK
   ═══════════════════════════════════════════════════════ */

@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(240, 236, 230, 0.92); }
  .g-btn { background: rgba(255, 255, 255, 0.7); backdrop-filter: none; }
}
