/* The DART Channel — the Frutiger Aero front porch (invite gate + "Bap to begin"), after thedord.com's home page */
@font-face { font-family: "Rubik Mono One"; src: url(fonts/RubikMonoOne.woff2) format("woff2"); font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", "Trebuchet MS", Tahoma, Verdana, sans-serif;
  color: #0b3d6e; background: #2d82e6; overflow: hidden;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}

/* ---------- sky ---------- */
.aero-scene { position: fixed; inset: 0; overflow: hidden; }
.aero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 14%, rgba(255,246,210,.75), rgba(255,240,200,.25) 35%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #0f56c4 0%, #2d82e6 30%, #6bb5f7 58%, #b4e0ff 78%, #e8f8ff 100%);
}
.aero-sun { position: absolute; left: 80%; top: 14%; width: 0; height: 0; }
.aero-sun i { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.aero-sun .bloom { width: 90vmin; height: 90vmin; background: radial-gradient(circle, rgba(255,250,225,.9) 0%, rgba(255,240,190,.45) 8%, rgba(255,225,160,.16) 22%, rgba(255,220,150,0) 50%); }
.aero-sun .core { width: 15vmin; height: 15vmin; background: radial-gradient(circle, #fff 0 22%, #fffef6 30%, rgba(255,250,215,.85) 40%, rgba(255,236,170,.35) 56%, rgba(255,230,160,0) 72%); }
.aero-sun .spikes {
  width: 60vmin; height: 60vmin; border-radius: 50%; animation: spin 90s linear infinite;
  background: repeating-conic-gradient(from 8deg, rgba(255,255,245,.6) 0deg .7deg, rgba(255,255,255,0) 1.6deg 45deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.4) 18%, transparent 55%);
          mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.4) 18%, transparent 55%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.aero-cloud {
  position: absolute; left: -40vw; border-radius: 50%; filter: blur(2px);
  background:
    radial-gradient(ellipse 30% 45% at 30% 60%, #fff 60%, rgba(255,255,255,0) 62%),
    radial-gradient(ellipse 28% 55% at 52% 45%, #fff 60%, rgba(255,255,255,0) 62%),
    radial-gradient(ellipse 26% 40% at 72% 62%, #f3f8ff 60%, rgba(255,255,255,0) 62%),
    radial-gradient(ellipse 48% 22% at 50% 78%, #dce9f7 60%, rgba(255,255,255,0) 62%);
  animation: drift linear infinite;
}
@keyframes drift { to { transform: translateX(180vw); } }

.aero-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46vh; }

.aero-bubble {
  position: absolute; bottom: -90px; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,0) 22%),
    radial-gradient(circle at 70% 78%, rgba(255,255,255,.35) 0 10%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 50% 50%, rgba(160,230,255,.05) 55%, rgba(120,210,255,.35) 72%, rgba(255,255,255,.75) 78%, rgba(255,255,255,0) 80%);
  animation: rise linear infinite;
}
@keyframes rise { to { transform: translateY(-120vh) translateX(6vw); } }

/* ---------- aero window ---------- */
.aero-main { position: relative; z-index: 2; height: 100%; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.window {
  width: min(460px, 100%); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(200,236,255,.3) 40%, rgba(170,220,255,.22) 60%, rgba(220,245,255,.4));
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 1px rgba(20,80,160,.35), 0 18px 50px rgba(0,40,100,.4), inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.titlebar {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px;
  color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 2px rgba(0,30,90,.6);
  background: linear-gradient(180deg, #6db4ff 0%, #2f86f2 45%, #1665dc 55%, #3a95ff 100%);
  border-bottom: 1px solid rgba(0,40,110,.4);
}
.titlebar img { width: 18px; height: 18px; }
.titlebar .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar .btn {
  width: 24px; height: 20px; border-radius: 4px; display: grid; place-items: center;
  font: 700 12px/1 Tahoma, sans-serif; color: #fff; border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(180deg, #8cc6ff, #3f8cf0 50%, #2470dc 52%, #4a9cff);
}
.titlebar .btn.close { background: linear-gradient(180deg, #f8a88e, #e0522c 50%, #c63a14 52%, #e8653d); }
.window .body {
  position: relative; padding: 22px 22px 20px; text-align: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(244,251,255,.93), rgba(206,238,255,.82));
}
.gate-logo { width: min(220px, 60%); height: auto; filter: drop-shadow(0 6px 10px rgba(0,40,100,.25)); }
.window h1 {
  margin: 6px 0 4px; font-size: clamp(26px, 6vw, 34px); line-height: 1.05; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(180deg, #ffd8a8 0%, #ff8a1f 48%, #d9480f 52%, #ff9a3c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 #fff) drop-shadow(0 2px 3px rgba(120,40,0,.25));
}
.window .sub { margin: 0 0 16px; font-size: 15px; color: #2a5d8f; }
.window .sub b { color: #c2410c; }

.sig { display: flex; gap: 8px; }
.sig input {
  flex: 1; min-width: 0; font: 700 17px/1 "Segoe UI", Tahoma, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  color: #0b3d6e; padding: 12px 14px; border-radius: 10px; border: 1px solid #7fb4e6; outline: none;
  background: linear-gradient(180deg, #fff, #eef8ff);
  box-shadow: inset 0 2px 4px rgba(0,50,110,.15), 0 1px 0 #fff;
}
.sig input:focus { border-color: #ff8a1f; box-shadow: inset 0 2px 4px rgba(0,50,110,.15), 0 0 0 3px rgba(255,138,31,.3); }
.gel {
  --c: #ff7a1a;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; min-height: 46px; border-radius: 23px; cursor: pointer; font: 700 16px "Segoe UI", Tahoma, sans-serif;
  border: 1px solid color-mix(in srgb, var(--c) 55%, #3a1000); color: #fff;
  text-shadow: 0 1px 1px color-mix(in srgb, var(--c) 40%, #000);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c) 45%, #fff) 0%, color-mix(in srgb, var(--c) 92%, #fff) 48%,
    color-mix(in srgb, var(--c) 82%, #000) 52%, var(--c) 78%, color-mix(in srgb, var(--c) 60%, #fff) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -3px 8px color-mix(in srgb, var(--c) 50%, #fff), 0 3px 8px color-mix(in srgb, var(--c) 45%, transparent), 0 1px 2px rgba(0,30,70,.35);
}
.gel::before { content: ""; position: absolute; left: 10px; right: 10px; top: 2px; height: 45%; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.15)); pointer-events: none; }
.gel:hover { filter: brightness(1.08) saturate(1.15); }
.gel:active { transform: translateY(1px); }
.gel:disabled { filter: grayscale(.4); cursor: wait; }
.gate-msg { min-height: 22px; margin: 12px 0 0; font-size: 14px; font-weight: 700; color: #2a5d8f; }
.gate-msg.bad { color: #c62828; }
.gate-msg.good { color: #2a7a2a; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.foot { margin-top: 14px; font-size: 12px; color: #5f82a6; }

/* ---------- "Bap to begin" ---------- */
.bap {
  position: relative; display: grid; place-items: center; gap: 4px; cursor: pointer; border: 0; padding: 0;
  width: min(74vmin, 520px); aspect-ratio: 1; border-radius: 50%; color: inherit; font: inherit;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.95) 0 7%, rgba(255,255,255,0) 20%),
    radial-gradient(circle at 70% 82%, rgba(255,255,255,.45) 0 8%, rgba(255,255,255,0) 26%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 0%, rgba(210,240,255,.35) 58%, rgba(140,210,255,.45) 72%, rgba(255,255,255,.9) 79%, rgba(255,255,255,0) 81%);
  box-shadow: 0 30px 60px -20px rgba(0,40,100,.45);
  animation: wobble 4.2s ease-in-out infinite;
  transition: transform .18s;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.bap::after {
  /* rainbow sheen on the bubble's skin */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: conic-gradient(from 210deg, rgba(255,120,160,0), rgba(255,170,90,.28), rgba(255,240,120,.2), rgba(120,255,180,.2), rgba(110,190,255,.28), rgba(200,130,255,.22), rgba(255,120,160,0));
  -webkit-mask-image: radial-gradient(circle, transparent 66%, #000 76%, transparent 80%);
          mask-image: radial-gradient(circle, transparent 66%, #000 76%, transparent 80%);
}
.bap img { width: 72%; height: auto; margin-top: 4%; filter: drop-shadow(0 6px 12px rgba(0,40,100,.3)); pointer-events: none; }
.bap .label {
  position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 400 clamp(15px, 3.4vmin, 24px) "Rubik Mono One", "Arial Black", sans-serif; color: #fff; letter-spacing: 1px;
  padding: .55em 1.1em; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, #ffb36b 0%, #ff7a1a 48%, #e0560c 52%, #ff9a3c 100%);
  border: 1px solid #a83a00; text-shadow: 0 2px 0 rgba(140,40,0,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 12px rgba(200,70,0,.45);
  animation: pulse 1.6s ease-in-out infinite;
}
.bap:hover { transform: scale(1.03); }
.bap:active { transform: scale(.97); }
.bap:focus-visible { outline: 4px solid #ffb36b; outline-offset: 6px; }
.bap.popped { animation: pop .32s ease-out forwards; }
@keyframes wobble {
  0%, 100% { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; translate: 0 0; }
  33% { border-radius: 52% 48% 51% 49% / 48% 52% 49% 51%; translate: 0 -10px; }
  66% { border-radius: 48% 52% 49% 51% / 51% 49% 52% 48%; translate: 0 4px; }
}
@keyframes pulse { 50% { filter: brightness(1.15); transform: translateX(-50%) scale(1.05); } }
@keyframes pop { to { transform: scale(1.5); opacity: 0; filter: blur(4px); } }
.bap-hint { margin-top: 18px; text-align: center; color: #fff; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,30,90,.7); }

@media (prefers-reduced-motion: reduce) {
  .aero-cloud, .aero-bubble, .aero-sun .spikes, .bap, .bap .label { animation: none; }
}
