/*
 * Module      : Gate (styles)
 * Description : Coming-soon gate: plaid stage and vignette, the cream marquee
 *               card with the waitlist form, the full-size ロック hero with a
 *               warm halo, the concealed keyhole staff entrance, the admin
 *               continue bar, and the drifting petals.
 */

body.gate-active { overflow: hidden; }

#gate-root { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
#gate-root:empty { display: none; }

.gate {
  position: absolute; inset: 0; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  overflow-x: hidden; overflow-y: auto;
  font-family: var(--font);
  color: var(--cream);
  background-color: #1a0c10;
  background-image:
    radial-gradient(120% 90% at 50% 0%, rgba(120, 60, 48, 0.28), transparent 60%),
    url('/imgs/plaid.png');
  background-size: auto, 360px;
  background-position: center top, center;
  isolation: isolate;
}

.gate-veil {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(130% 120% at 50% 42%, transparent 38%, rgba(12, 6, 8, 0.55) 100%),
    linear-gradient(180deg, rgba(12, 6, 8, 0.35), transparent 22%, transparent 70%, rgba(12, 6, 8, 0.5));
}

.gate-petals { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.gate-petal {
  position: absolute; top: -10vh; width: 11px; height: 13px;
  background: linear-gradient(150deg, var(--cream), var(--ochre));
  border-radius: 100% 0 100% 0;
  opacity: 0.45; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
  animation-name: gate-fall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes gate-fall {
  0%   { transform: translateY(-12vh) translateX(0) rotate(0deg) scale(var(--gp, 1)); opacity: 0; }
  10%  { opacity: 0.5; }
  50%  { transform: translateY(52vh) translateX(26px) rotate(220deg) scale(var(--gp, 1)); }
  90%  { opacity: 0.45; }
  100% { transform: translateY(118vh) translateX(-12px) rotate(460deg) scale(var(--gp, 1)); opacity: 0; }
}

.gate-stage {
  position: relative; z-index: 3;
  width: 100%; max-width: 1080px; min-height: 100%;
  display: flex; align-items: flex-end; justify-content: center; gap: 8px;
  padding: 40px 28px 0;
}

.gate-card {
  position: relative; flex: 0 1 460px; max-width: 460px; align-self: center;
  background: linear-gradient(180deg, var(--cream), var(--vellum));
  border: 1px solid rgba(156, 74, 58, 0.4);
  border-radius: var(--radius-lg);
  padding: 38px 40px 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  z-index: 4;
}
.gate-card::after {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid rgba(201, 138, 85, 0.4); border-radius: 6px;
}

.gate-logo { display: block; width: 196px; max-width: 70%; height: auto; margin: 0 0 18px; filter: drop-shadow(0 2px 10px rgba(156, 74, 58, 0.35)); }
.gate-kicker { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--sepia); opacity: 0.85; }
.gate-title { font-family: var(--font-title); font-weight: 600; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.05; color: var(--espresso); margin: 10px 0 12px; }
.gate-blurb { font-size: 15px; line-height: 1.6; color: var(--sepia); margin: 0 0 22px; max-width: 38ch; }
.gate-face { color: var(--rust); white-space: nowrap; }

.gate-form { display: flex; gap: 8px; }
.gate-input {
  flex: 1 1 auto; min-width: 0;
  background: rgba(255, 255, 255, 0.62); color: var(--espresso);
  border: 1px solid rgba(103, 85, 74, 0.35); border-radius: var(--radius);
  padding: 12px 14px; font-family: var(--font); font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.gate-input::placeholder { color: rgba(103, 85, 74, 0.55); }
.gate-input:focus { outline: none; border-color: var(--rust); background: #fff; box-shadow: 0 0 0 3px rgba(156, 74, 58, 0.16); }
.gate-input:disabled { opacity: 0.6; }

.gate-btn {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap;
  background: var(--rust); color: var(--cream);
  border: 1px solid var(--rust); border-radius: var(--radius);
  padding: 12px 20px; font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gate-btn:hover { background: var(--brick); box-shadow: 0 6px 18px rgba(122, 58, 42, 0.4); transform: translateY(-1px); }
.gate-btn:active { transform: translateY(0); }
.gate-btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.gate-btn--ghost { background: transparent; color: var(--rust); }
.gate-btn--ghost:hover { background: rgba(156, 74, 58, 0.1); box-shadow: none; }

.gate-msg { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--sepia); }
.gate-msg[data-tone="err"] { color: var(--rust); }
.gate-msg[data-tone="ok"] { color: #5f7a3f; }

.gate-done { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; animation: gate-rise 0.4s ease both; }
.gate-done-mark { font-size: 30px; line-height: 1; color: var(--rust); }
.gate-done p { margin: 2px 0 0; font-size: 15px; line-height: 1.55; color: var(--espresso); }
@keyframes gate-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.gate-rock { position: relative; flex: 0 0 auto; align-self: flex-end; display: flex; align-items: flex-end; justify-content: center; }
.gate-rock-halo {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  width: 78%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(201, 138, 85, 0.42), rgba(156, 74, 58, 0.18) 45%, transparent 70%);
  filter: blur(14px);
}
.gate-rock-img {
  position: relative; display: block; height: min(96vh, 1040px); width: auto; max-width: 52vw;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
  animation: gate-sway 7s ease-in-out infinite;
}
@keyframes gate-sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
.gate-rock-name {
  position: absolute; right: -2px; top: 40%;
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--font-title); font-size: 18px; letter-spacing: 0.1em;
  color: var(--ochre); opacity: 0.6;
}

.gate-keyhole {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 5; width: 26px; height: 34px; padding: 0;
  background: none; border: none; cursor: pointer; color: var(--driftwood);
  opacity: 0.26; transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}
.gate-keyhole svg { width: 100%; height: 100%; display: block; }
.gate-keyhole:hover, .gate-keyhole:focus-visible { opacity: 0.85; color: var(--ochre); transform: translateX(-50%) translateY(-3px); outline: none; }

.gate-staff { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; }
.gate-staff[hidden] { display: none; }
.gate-staff-scrim { position: absolute; inset: 0; background: rgba(10, 5, 7, 0.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.28s ease; }
.gate-staff-panel {
  position: relative; width: min(360px, calc(100vw - 36px));
  background: linear-gradient(180deg, var(--cream), var(--vellum));
  border: 1px solid rgba(156, 74, 58, 0.4); border-radius: var(--radius-lg);
  padding: 26px 26px 18px; text-align: left;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(22px) scale(0.97); transform-origin: bottom center;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gate[data-staff="open"] .gate-staff-scrim { opacity: 1; }
.gate[data-staff="open"] .gate-staff-panel { opacity: 1; transform: none; }
.gate-staff-title { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--espresso); }
.gate-staff-sub { margin: 8px 0 16px; font-size: 13px; line-height: 1.5; color: var(--sepia); }
.gate-staff-close { display: block; margin: 12px auto 0; background: none; border: none; cursor: pointer; font-family: var(--font); font-size: 12px; letter-spacing: 0.08em; color: var(--sepia); transition: color 0.18s ease; }
.gate-staff-close:hover { color: var(--rust); }

.gate-admin {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 10002;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--cream), var(--vellum));
  border: 1px solid rgba(156, 74, 58, 0.4); border-radius: 999px;
  padding: 8px 8px 8px 18px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  animation: gate-drop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gate-admin[hidden] { display: none; }
.gate-admin-hi { font-size: 13px; color: var(--espresso); letter-spacing: 0.02em; }
.gate-admin .gate-btn { padding: 9px 16px; border-radius: 999px; }
@keyframes gate-drop { from { opacity: 0; transform: translateX(-50%) translateY(-14px); } to { opacity: 1; transform: translateX(-50%); } }

@media (max-width: 900px) {
  .gate-stage { flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 30px 20px 72px; }
  .gate-rock { align-self: center; order: -1; margin-bottom: -4px; }
  .gate-rock-img { height: min(42vh, 380px); max-width: 80vw; }
  .gate-rock-name { display: none; }
  .gate-card { flex-basis: auto; width: 100%; max-width: 440px; padding: 30px 26px 26px; }
}

@media (max-width: 560px) {
  .gate-stage { padding: 22px 16px 76px; }
  .gate-rock-img { height: min(36vh, 320px); }
  .gate-card { padding: 26px 22px 24px; }
  .gate-form { flex-direction: column; }
  .gate-btn { width: 100%; }
  .gate-admin { left: 12px; right: 12px; transform: none; justify-content: center; }
  @keyframes gate-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
}
