/* ==========================================================================
   Gateway pages: the hub (choose your world) and the Resurrected page.
   Materials come from sanctuary.css; this sheet is composition only.
   ========================================================================== */

.gateway-main { width: auto; padding-top: 0; }
.gateway-page .page-main { padding-top: 0; }

/* Full-height entrance with the Sanctuary panorama. */
.gate-hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: calc(100vh - var(--header-height)); padding: 90px 24px 120px; text-align: center; overflow: hidden; }
.gate-hero-art { position: absolute; inset: 0; z-index: -3; }
.gate-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(1.05) contrast(1.06) brightness(.82); transform: scale(1.02); animation: gate-settle 14s ease-out both; }
@keyframes gate-settle { from { transform: scale(1.08); } to { transform: scale(1.02); } }
.gate-hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 48% 60% at 50% 48%, rgba(6, 4, 4, .72), rgba(6, 4, 4, .35) 60%, transparent 100%),
    linear-gradient(180deg, rgba(6, 4, 4, .72), transparent 24%, transparent 62%, var(--void) 100%);
}
.gate-hero .embers { z-index: -1; }
.gate-hero .hero-grain { z-index: -1; }
.gate-hero-copy { position: relative; z-index: 1; max-width: 860px; }
.gate-kicker { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 22px; color: var(--gold-bright); font: 600 10px/1.3 var(--label); letter-spacing: .34em; text-transform: uppercase; text-shadow: 0 1px 2px #000, 0 0 14px rgba(176, 132, 60, .4); }
.gate-kicker span { color: var(--ember); }
.gate-seal {
  position: relative; width: 96px; height: 96px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #7a0a0f 0, #2d0509 45%, #0c0607 72%);
  box-shadow: 0 0 0 2px #141210, 0 0 0 4px var(--gold-deep), 0 0 0 6px #0a0605, inset 0 0 30px rgba(220, 20, 60, .5), 0 0 50px rgba(139, 0, 0, .6);
}
.gate-seal::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(233, 197, 106, .45); border-radius: 50%; }
.gate-seal::after { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(233, 197, 106, .3); transform: rotate(45deg); }
.gate-seal span { position: relative; z-index: 1; color: var(--gold-bright); font: 400 42px/1 var(--display); text-shadow: 0 0 20px rgba(176, 132, 60, .9), 0 2px 0 #000; }
.gate-seal-mana { background: radial-gradient(circle at 50% 38%, #2c4bb5 0, #0f1c58 45%, #060910 72%); box-shadow: 0 0 0 2px #0a0d20, 0 0 0 4px rgba(125, 162, 255, .6), 0 0 0 6px #0a0605, inset 0 0 30px rgba(65, 105, 225, .6), 0 0 50px rgba(65, 105, 225, .5); }
.gate-seal-mana span { color: #e4ecff; text-shadow: 0 0 20px rgba(125, 162, 255, .95), 0 2px 0 #000; }
.gate-hero h1 { margin: 0 0 22px; font-size: clamp(60px, 10vw, 136px); line-height: .9; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-pale); text-shadow: 0 3px 0 #2b2720, 0 0 50px rgba(176, 132, 60, .35), 0 10px 30px rgba(0, 0, 0, .95); }
.gate-hero h1 em { display: block; font-style: normal; font-size: .72em; letter-spacing: .18em; color: var(--gold-bright); text-shadow: 0 3px 0 #2b2720, 0 0 30px rgba(176, 132, 60, .5), 0 10px 30px rgba(0, 0, 0, .95); }
.gate-hero-d2r h1 em { color: #a9c1ff; text-shadow: 0 3px 0 #0b1535, 0 0 30px rgba(65, 105, 225, .75), 0 10px 30px rgba(0, 0, 0, .95); }
.gate-hero-d2r h1 { text-shadow: 0 3px 0 #0b1535, 0 0 50px rgba(65, 105, 225, .4), 0 10px 30px rgba(0, 0, 0, .95); }
.gate-lead { max-width: 640px; margin: 0 auto 36px; color: #e0d3b5; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; text-shadow: 0 1px 2px #000, 0 0 20px rgba(0, 0, 0, .9); }
.gate-lead strong { color: var(--gold-pale); font-weight: 600; }
.gate-scroll { display: inline-grid; justify-items: center; gap: 8px; color: var(--gold-bright); font: 400 13px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; text-shadow: 0 1px 2px #000; }
.gate-scroll b { font-size: 22px; animation: gate-bounce 2s ease-in-out infinite; }
@keyframes gate-bounce { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(6px); opacity: 1; } }
.gate-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.gate-note { margin: 24px 0 0; }
.gate-hero-d2r .gate-hero-art img { object-position: 82% 40%; filter: saturate(1.1) contrast(1.06) brightness(.8) hue-rotate(-6deg); }
.gate-hero-d2r .gate-hero-shade { background: radial-gradient(ellipse 48% 60% at 50% 48%, rgba(4, 6, 14, .74), rgba(4, 6, 14, .4) 60%, transparent 100%), linear-gradient(180deg, rgba(6, 4, 4, .72), transparent 24%, transparent 62%, var(--void) 100%); }
.gate-hero-d2r .gate-kicker { color: var(--mana-bright); text-shadow: 0 1px 2px #000, 0 0 14px rgba(65, 105, 225, .6); }
.gate-hero-d2r .gate-kicker span { color: #cfe0ff; }

/* The two gates. */
.gate-choice { position: relative; z-index: 2; margin-top: -70px; }
.gate-heading { text-align: center; margin-bottom: 34px; }
.gate-heading h2 { margin: 10px 0 0; font-size: clamp(34px, 4.6vw, 56px); color: var(--gold-pale); text-shadow: 0 2px 0 #2b2720, 0 0 30px rgba(176, 132, 60, .25); }
.gate-heading .rune-divider { margin-top: 22px; }
.gate-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.gate-door {
  position: relative; display: flex; flex-direction: column; border: 1px solid rgba(199, 154, 60, .35); border-radius: 4px 4px 2px 2px;
  background: linear-gradient(rgba(19, 18, 17, .96), rgba(9, 8, 8, .99)), var(--stone-tile) center / 480px;
  box-shadow: var(--inset), inset 0 0 0 2px rgba(0, 0, 0, .6), inset 0 0 80px rgba(0, 0, 0, .6), 0 40px 90px rgba(0, 0, 0, .7);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.gate-door:hover { transform: translateY(-6px); border-color: var(--gold); }
.gate-door-lod:hover { box-shadow: var(--inset), inset 0 0 0 2px rgba(0, 0, 0, .6), inset 0 0 80px rgba(139, 0, 0, .25), 0 0 50px rgba(220, 20, 60, .25), 0 40px 90px rgba(0, 0, 0, .7); }
.gate-door-d2r:hover { box-shadow: var(--inset), inset 0 0 0 2px rgba(0, 0, 0, .6), inset 0 0 80px rgba(65, 105, 225, .2), 0 0 50px rgba(65, 105, 225, .3), 0 40px 90px rgba(0, 0, 0, .7); }
.gate-door-arch {
  position: relative; height: 250px; margin: 10px 10px 0; border: 1px solid rgba(233, 197, 106, .3); border-bottom: 0; border-radius: 160px 160px 0 0;
  background-color: #080808; background-image: url("/assets/sanctuary/sanctuary-gates.webp"); background-size: 300% auto; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .8), inset 0 0 60px rgba(0, 0, 0, .8), inset 0 -60px 60px -30px #080808;
}
.gate-door-arch::after { content: ""; position: absolute; inset: 6px 6px 0; border: 1px solid rgba(233, 197, 106, .18); border-bottom: 0; border-radius: 154px 154px 0 0; }
.gate-door-lod .gate-door-arch { background-position: 3% 32%; }
.gate-door-d2r .gate-door-arch { background-position: 97% 32%; }
.gate-door-body { display: flex; flex-direction: column; flex: 1; padding: 26px 30px 30px; }
.gate-door-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gate-door-num { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-bright); font: 400 16px/1 var(--display); box-shadow: 0 0 14px rgba(176, 132, 60, .35), inset 0 0 10px rgba(0, 0, 0, .8); }
.gate-door-d2r .gate-door-num { border-color: var(--mana-bright); color: var(--mana-bright); box-shadow: 0 0 14px rgba(65, 105, 225, .45), inset 0 0 10px rgba(0, 0, 0, .8); }
.gate-door-top small { color: var(--dim); font: 600 9px/1 var(--label); letter-spacing: .3em; text-transform: uppercase; }
.gate-door h3 { margin: 0 0 14px; font-size: clamp(30px, 3vw, 42px); line-height: 1; color: var(--gold-pale); text-shadow: 0 2px 0 #2b2720, 0 0 24px rgba(176, 132, 60, .25); }
.gate-door h3 span { display: block; margin-bottom: 6px; color: var(--ember); font-size: .42em; letter-spacing: .3em; text-transform: uppercase; text-shadow: 0 0 10px rgba(176, 132, 60, .5); }
.gate-door-d2r h3 { text-shadow: 0 2px 0 #0b1535, 0 0 24px rgba(65, 105, 225, .4); }
.gate-door-d2r h3 span { color: var(--mana-bright); text-shadow: 0 0 10px rgba(65, 105, 225, .6); }
.gate-door p { margin: 0 0 16px; color: var(--ash); line-height: 1.7; }
.gate-door p code { color: var(--gold-pale); }
.gate-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.gate-facts li { padding: 6px 10px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .35); color: var(--bone); font: 400 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.gate-door-d2r .gate-facts li { border-color: rgba(125, 162, 255, .3); }
.gate-live { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 22px; padding: 6px; border: 1px solid rgba(199, 154, 60, .3); background: linear-gradient(#161514, #0a0908); box-shadow: var(--inset), inset 0 0 30px rgba(0, 0, 0, .7); }
.gate-live > div { padding: 10px 12px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8); }
.gate-live dt { color: var(--dim); font: 600 8px/1.3 var(--label); letter-spacing: .2em; text-transform: uppercase; }
.gate-live dd { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold-pale); font: 400 17px/1.1 var(--display); }
.gate-live dd[data-season-name] { color: var(--poison); text-shadow: 0 0 10px rgba(95, 242, 90, .4); white-space: normal; font-size: 14px; }
.gate-live-muted { border-color: rgba(125, 162, 255, .22); }
.gate-live-muted dd { color: var(--frost); font-size: 14px; white-space: normal; }
.gate-door-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: auto; }
.gate-door-actions .text-link { margin: 0; }
.gate-domain { display: block; margin-top: 16px; color: var(--dim); font: 10px/1 Consolas, "Cascadia Mono", monospace; letter-spacing: .1em; }

/* Realm sheet and covenant. */
.gate-sheet { margin-top: 70px; }
.gate-covenant { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 30px; align-items: center; margin-top: 80px; }
.gate-covenant h2 { margin: 10px 0 12px; font-size: clamp(30px, 4vw, 46px); }
.gate-covenant > div > p { max-width: 640px; margin: 0; font-size: 16px; }
.gate-covenant-actions { display: grid; justify-items: start; gap: 14px; }
.gate-covenant-actions .text-link { margin: 0; }

/* Resurrected journal. */
.d2r-journal { margin-top: -40px; position: relative; z-index: 2; }
.d2r-journal-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .9fr); gap: 34px; align-items: start; }
.d2r-scroll h3 { margin: 10px 0 14px; font-size: 34px; }
.d2r-scroll .d2-button { margin-top: 10px; }
.char-sheet-mana .char-sheet-col { padding: 10px 26px; }

@media (min-width: 2000px) {
  .gate-door-arch { background-image: url("/assets/sanctuary/sanctuary-gates-3072.webp"); }
}
@media (max-width: 1180px) {
  .gate-hero { min-height: 0; padding: 70px 20px 110px; }
  .gate-covenant { grid-template-columns: 1fr; }
  .d2r-journal-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .gate-doors { grid-template-columns: 1fr; gap: 26px; }
  .gate-choice { margin-top: -40px; }
  .gate-door-arch { height: 180px; }
}
@media (max-width: 760px) {
  .gate-hero { padding: 50px 16px 90px; }
  .gate-hero h1 { font-size: clamp(44px, 14vw, 72px); }
  .gate-seal { width: 76px; height: 76px; }
  .gate-seal span { font-size: 32px; }
  .gate-lead { font-size: 15px; }
  .gate-door-body { padding: 20px 18px 24px; }
  .gate-live { grid-template-columns: 1fr; }
  .gate-hero-actions .d2-button { flex: 1 1 100%; }
  .gate-door-actions .d2-button { flex: 1 1 100%; }
  .gate-sheet { margin-top: 50px; }
  .gate-covenant { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-hero-art img, .gate-scroll b { animation: none; }
}

/* Round 7 — grim palette on the gateway pages. */
.gate-hero-art img { filter: saturate(.8) contrast(1.05) brightness(.7); }
.gate-hero h1 { color: #ddd1b8; text-shadow: 0 3px 0 #000, 0 10px 30px rgba(0, 0, 0, .95); }
.gate-hero h1 em { color: #c2a464; text-shadow: 0 3px 0 #000, 0 10px 30px rgba(0, 0, 0, .95); }
.gate-kicker { color: #a08a5c; }
.gate-seal { background: radial-gradient(circle at 50% 38%, #4a0d0d 0, #1c0606 50%, #090606 74%); box-shadow: 0 0 0 2px #0d0c0b, 0 0 0 4px #5d564b, 0 0 0 6px #070707, inset 0 0 26px rgba(120, 10, 10, .45), 0 0 34px rgba(0, 0, 0, .8); }
.gate-seal span { color: #cfc5b1; text-shadow: 0 0 16px rgba(120, 10, 10, .9), 0 2px 0 #000; }
.gate-door { background: linear-gradient(rgba(13, 13, 13, .96), rgba(7, 7, 7, .99)) padding-box; }
.gate-door:hover { border-color: transparent; }
.gate-door-lod:hover { box-shadow: 0 0 40px rgba(110, 11, 11, .3), 0 34px 80px rgba(0, 0, 0, .7); }
.gate-door-d2r:hover { box-shadow: 0 0 40px rgba(58, 94, 196, .22), 0 34px 80px rgba(0, 0, 0, .7); }
.gate-door-arch { margin: 0; border-color: rgba(185, 176, 160, .25); }
.gate-door h3 { color: #ddd1b8; text-shadow: 0 2px 0 #000; }
.gate-door h3 span { color: #a08a5c; text-shadow: none; }
.gate-door-d2r h3 span { color: #8a9ee0; }
.gate-live { background: linear-gradient(#111, #080808); border-color: rgba(168, 136, 74, .25); }
.gate-live dd { color: #ddd1b8; }
.gate-live dd[data-season-name] { color: #d9c79c; text-shadow: none; }
.gate-facts li { border-color: rgba(168, 136, 74, .28); color: #c2b9a6; }
.d2r-scroll h3 { color: #ddd1b8; }

/* Round 8 — centred titles. The copy column must be wide enough for the
   title (it used to overflow to the right at 860 px), and letter-spacing
   adds space after the last glyph, so the same amount goes on the left. */
.gate-hero-copy { max-width: min(1180px, 100%); }
.gate-hero h1 { padding-left: .06em; }
.gate-hero h1 em { padding-left: .18em; }
.gate-lead { max-width: 640px; }
/* Phones: "SANCTUARY" in the display font is 7.15 font-sizes wide, so at
   14vw it filled the whole screen and the 16 px gutters did not fit; the
   grid track grew to the title's min-content width and the hero (title,
   lead, seal) shifted right and was clipped. The column is held to the
   screen and the title sized to the space left (7.4 keeps a margin). */
.gate-hero-copy { min-width: 0; width: 100%; }
@media (max-width: 760px) {
  .gate-hero h1 { font-size: min(72px, calc((100vw - 48px) / 7.4)); }
}
