/* Project Avion alpha portal (/). Builds on common.css. */

body { display: flex; flex-direction: column; overflow-x: hidden; }
html { scroll-behavior: smooth; }

/* ───────────────────────────── Backdrop ───────────────────────────── */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% -10%, #0d1a33 0%, var(--bg) 60%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: float 22s var(--ease-in-out) infinite alternate; }
.orb-1 { width: 46vw; height: 46vw; min-width: 360px; min-height: 360px; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(47, 155, 255, 0.55), transparent 65%); }
.orb-2 { width: 38vw; height: 38vw; min-width: 300px; min-height: 300px; right: -10vw; top: 8vh; background: radial-gradient(circle, rgba(63, 224, 168, 0.32), transparent 65%); animation-duration: 26s; animation-delay: -7s; }
.orb-3 { width: 34vw; height: 34vw; min-width: 280px; min-height: 280px; left: 30vw; top: 46vh; background: radial-gradient(circle, rgba(154, 134, 255, 0.36), transparent 65%); animation-duration: 30s; animation-delay: -13s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -3vw) scale(1.1); }
  100% { transform: translate(-3vw, 2vw) scale(0.95); }
}
.grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: 0.6;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 18%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 18%, #000 15%, transparent 75%);
}

/* ───────────────────────────── Layout ───────────────────────────── */

.portal {
  flex: 1 0 auto; width: min(100% - 32px, 700px); margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 0 48px; display: grid; gap: 22px; align-content: start;
}

/* ───────────────────────────── Hero ───────────────────────────── */

.hero { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.hero-icon {
  width: 96px; height: 96px; border-radius: 22%; margin-bottom: 22px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 60px -10px var(--glow);
  animation: pop 1s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.7) rotate(-10deg); } to { opacity: 1; transform: none; } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(15, 24, 43, 0.6); color: var(--text-2);
  font: 650 0.76rem/1.2 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase;
  animation: fade-up 0.8s var(--ease) 0.1s both;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ivy); box-shadow: 0 0 10px var(--ivy); animation: pulse 2.4s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero-title {
  font-size: clamp(3rem, 11vw, 5.4rem); line-height: 0.98; letter-spacing: -0.02em; margin: 0 0 18px;
  animation: fade-up 0.9s var(--ease) 0.18s both;
}
.hero-title .gradient-text { padding-right: 0.04em; }
.hero-lead { max-width: 54ch; margin: 0 auto 10px; font-size: clamp(1.02rem, 2.2vw, 1.16rem); color: var(--text-2); animation: fade-up 0.9s var(--ease) 0.28s both; }
.hero-sub { max-width: 56ch; margin: 0 auto; color: var(--muted); font-size: 0.97rem; animation: fade-up 0.9s var(--ease) 0.36s both; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; margin-top: 24px; padding: 14px 16px;
  border-radius: 16px; border: 1px solid rgba(92, 200, 255, 0.35); background: linear-gradient(120deg, rgba(47, 155, 255, 0.14), rgba(15, 24, 43, 0.6));
  color: #d9f1ff; animation: fade-up 0.6s var(--ease) both;
}
.notice .i { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.notice-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }

/* ───────────────────────────── Cards ───────────────────────────── */

.card {
  position: relative; isolation: isolate; border-radius: var(--radius); padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line); background: var(--card);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow); animation: fade-up 0.9s var(--ease) 0.42s both;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at 0% 0%, rgba(92, 200, 255, 0.1), transparent 60%);
}
.card-redeem { border-color: rgba(92, 200, 255, 0.28); }
.card-redeem::after {
  content: ""; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), var(--ivy), var(--accent), transparent); opacity: 0.85;
}
.card-apply { animation-delay: 0.5s; }
.card-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.card-head h2 { font-size: 1.45rem; margin: 2px 0 6px; }
.card-sub { margin: 0; color: var(--text-2); font-size: 0.96rem; }
.card-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(92, 200, 255, 0.12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, 0.3);
}
.card-icon .i { width: 24px; height: 24px; }
.card-icon-ivy { background: rgba(63, 224, 168, 0.12); color: var(--ivy); box-shadow: inset 0 0 0 1px rgba(63, 224, 168, 0.3); }

.key-input.key-input {
  min-height: 56px; font: 600 1.15rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
}
.key-input::placeholder { letter-spacing: 0.12em; }

/* ───────────────────────────── Redeem result ───────────────────────────── */

.redeem-result { display: grid; gap: 22px; outline: none; animation: fade-up 0.6s var(--ease) both; }
.welcome { display: flex; gap: 16px; align-items: center; }
.welcome-badge {
  display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(63, 224, 168, 0.14); color: var(--ivy); box-shadow: inset 0 0 0 1px rgba(63, 224, 168, 0.4), 0 0 30px -6px rgba(63, 224, 168, 0.5);
}
.welcome-badge .i { width: 26px; height: 26px; stroke-width: 2.2; }
.welcome h2 { font-size: 1.6rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.welcome p { margin: 0; color: var(--text-2); }

.download { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 22px 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(6, 10, 19, 0.45); }
.download .btn { width: min(100%, 360px); }
.download-meta { margin: 0; color: var(--text-2); font-size: 0.92rem; }
.download-meta strong { color: var(--text); font-weight: 650; }
.download-warn { margin: 0; color: var(--warn); font-size: 0.86rem; }

.key-block { display: grid; gap: 8px; }
.key-block h3 { font-size: 1rem; margin: 0; }
.key-block .hint { font-size: 0.84rem; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; color: var(--text-2); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(92, 200, 255, 0.12); color: var(--accent); font: 700 0.95rem/1 var(--font-sans);
  box-shadow: inset 0 0 0 1px rgba(92, 200, 255, 0.32);
}
.steps strong { color: var(--text); font-weight: 650; }
.steps-wrap { display: grid; gap: 14px; }
.steps-title { font-size: 1rem; margin: 0; }

/* ───────────────────────────── Apply ───────────────────────────── */

.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.apply-done { display: flex; gap: 16px; align-items: flex-start; outline: none; animation: fade-up 0.6s var(--ease) both; }
.apply-done h3 { font-size: 1.2rem; margin: 4px 0 6px; }
.apply-done p { margin: 0; color: var(--text-2); }

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

.site-footer {
  flex-shrink: 0; width: min(100% - 32px, 700px); margin: 0 auto; padding: 26px 0 34px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; text-align: center;
}
.site-footer p { margin: 0 auto 8px; max-width: 62ch; }
.footer-copy { font-weight: 600; letter-spacing: 0.04em; }

.toast-stack { left: 50%; right: auto; transform: translateX(-50%); width: min(380px, calc(100vw - 32px)); }

@media (max-width: 560px) {
  .card-head { flex-direction: column; gap: 12px; }
  .welcome { align-items: flex-start; }
  .secret { flex-direction: column; }
  .secret .btn { align-self: stretch; }
  .toast-stack { left: 16px; right: 16px; transform: none; width: auto; }
}
