/* ==========================================================
   JR杰瑞 · 首屏开场 gate（H2 三间并排门廊）v2 / 2026-09-08
   ------------------------------------------------------------
   形态：fixed 覆盖层，三列布局（左文案 / 中画面 / 右三扇门）
   退出：整体 opacity 0 + scale(1.04) 淡出，露出下方官网
   载入顺序：必须放在 landing.css 之后（同名规则以本文件为准）
   ========================================================== */

.gate:not(.is-ready) { animation: none; }          /* 关掉旧版 3s 兜底隐藏 */
.gate.is-off { display: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 9990;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  background-color: #F7F3EA;
  background-image: url("/assets/brand/gate-rooms.webp");
  background-size: cover;
  background-position: center;
  transition: opacity .7s ease, transform .7s ease;
}
@supports (height: 100dvh) { .gate { height: 100dvh; } }

.gate::after {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(247,243,234,.40) 0%, rgba(247,243,234,.10) 22%,
    rgba(247,243,234,.10) 78%, rgba(247,243,234,.52) 100%);
}

.gate.is-opening { opacity: 0; transform: scale(1.04); pointer-events: none; }
.gate.is-done { visibility: hidden; pointer-events: none; }

.g-l, .g-r {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  padding: clamp(28px, 4vw, 64px);
}
.g-l::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(95deg,
    rgba(247,243,234,.94) 0%, rgba(247,243,234,.88) 60%, rgba(247,243,234,.46) 100%);
}
.g-r::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(95deg,
    rgba(247,243,234,.40) 0%, rgba(247,243,234,.86) 60%, rgba(247,243,234,.92) 100%);
}
.g-r { align-items: flex-end; text-align: right; }
.g-m { position: relative; z-index: 2; }

/* ---------- 品牌标 ---------- */
.g-brand { display: flex; align-items: center; gap: 12px; margin-bottom: auto; }
.g-brand svg { width: 42px; height: auto; display: block; }
.g-brand svg path { fill: url(#jrGradGate); }
.g-brand .bn {
  font-family: var(--font); font-size: 20px; font-weight: 800;
  letter-spacing: .04em; line-height: 1.2; color: var(--text);
}
.g-brand .bn small {
  display: block; font-size: 9.5px; letter-spacing: .24em;
  color: var(--muted); font-weight: 400; margin-top: 2px;
}

/* ---------- 主文案 ---------- */
.gtitle {
  font-family: var(--serif);
  font-size: clamp(32px, 3.7vw, 54px);
  font-weight: 900; line-height: 1.3;
  margin: 0 0 14px; letter-spacing: .015em; color: var(--text);
}
.gsub {
  font-size: 13px; line-height: 1; color: var(--text);
  margin: 0; display: flex; flex-direction: column; max-width: 24em;
}
.gsub .gline {
  display: grid; grid-template-columns: 62px 1fr 14px; align-items: center;
  column-gap: 14px; padding: 11px 0; border-top: 1px solid rgba(28,26,23,.18);
}
.gsub .gline:last-child { border-bottom: 1px solid rgba(28,26,23,.18); }
.gsub .k {
  font-size: 10.5px; letter-spacing: .22em; color: var(--muted);
  font-weight: 700; text-transform: uppercase;
}
.gsub .t {
  font-size: 16px; font-weight: 900; line-height: 1.2;
  letter-spacing: .015em; font-family: var(--serif);
}
.gsub .t em { font-style: normal; color: var(--accent); }
.gsub .r2 .t em { color: var(--accent-t); }
.gsub .r3 .t em { color: var(--accent-2); }
.gsub .i { width: 8px; height: 8px; border-radius: 50%; justify-self: end; }
.gsub .r1 .i { background: var(--accent); }
.gsub .r2 .i { background: var(--accent-t); }
.gsub .r3 .i { background: var(--accent-2); }
.gsub .tn {
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
  margin-top: 12px; letter-spacing: .02em;
}

/* ---------- 进入按钮 ---------- */
.genter {
  margin-top: auto; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 10px; background: #B4532A; color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; border: none; align-self: flex-start;
  box-shadow: 0 8px 26px rgba(180,83,42,.34);
  transition: transform .2s var(--e-io, ease), box-shadow .2s var(--e-io, ease);
}
.genter:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(180,83,42,.42); }
.genter .ar { font-size: 17px; line-height: 1; }

/* ---------- 右侧三扇门 ---------- */
.doors {
  display: flex; flex-direction: column; gap: 11px;
  margin-top: auto; width: min(300px, 100%);
}
.door {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,253,248,.92);
  border: 1px solid rgba(28,26,23,.12);
  cursor: pointer; transition: .2s; text-align: left; text-decoration: none;
  color: inherit;
}
.door:hover {
  background: #FFFDF8; transform: translateX(-3px);
  border-color: rgba(180,83,42,.4); box-shadow: 0 8px 22px rgba(28,26,23,.10);
}
.door i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.door .dt { display: block; font-family: var(--font); font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.door .dd { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; letter-spacing: .03em; }

.gfoot {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  text-align: center; font-size: 10.5px; color: var(--muted); letter-spacing: .14em;
}

/* ---------- 入场：与旧版一致的逐层上浮 ---------- */
.gate.is-ready .g-brand,
.gate.is-ready .g-titlewrap,
.gate.is-ready .genter,
.gate.is-ready .doors { animation: jr-gate-rise 700ms var(--e-out, cubic-bezier(.16,.84,.44,1)) backwards; }
.gate.is-ready .g-brand     { animation-delay: 60ms; }
.gate.is-ready .g-titlewrap { animation-delay: 150ms; }
.gate.is-ready .doors       { animation-delay: 240ms; }
.gate.is-ready .genter      { animation-delay: 330ms; }

@keyframes jr-gate-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .gate { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .g-m { display: none; }
  .g-l::before, .g-r::before {
    background: linear-gradient(180deg, rgba(247,243,234,.92) 0%, rgba(247,243,234,.94) 100%);
  }
  .g-r { align-items: stretch; text-align: left; padding-top: 0; }
  .doors { width: 100%; margin-top: 8px; }
  .gfoot { display: none; }
  .gtitle { font-size: clamp(28px, 7vw, 40px); }
  .g-brand { margin-bottom: 24px; }
  .genter { margin-top: 18px; align-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .gate { transition: opacity 300ms linear; }
  .gate.is-opening { transform: none; }
  .gate.is-ready .g-brand,
  .gate.is-ready .g-titlewrap,
  .gate.is-ready .genter,
  .gate.is-ready .doors { animation: none; }
}
@media print { .gate { display: none !important; } }
.no-js .gate { display: none !important; }
