/* ==========================================================================
   RIVENHOLD — the gate
   The title screen rebuilt as a place rather than a page: a cinematic plate,
   an engraved iron plaque for the entry panel, a banner header that overhangs
   its edges, rivets, and controls cut as metal plates instead of web buttons.

   Scoped to #title. Loaded last.
   ========================================================================== */

:root {
  --rh-ink:    #07080c;
  --rh-iron:   #141720;
  --rh-iron2:  #1d212b;
  --rh-iron3:  #262b37;
  --rh-gold:   #d9b46a;
  --rh-gold2:  #8e6c2a;
  --rh-gold3:  #f6e3b0;
  --rh-ember:  #e8622a;
  --rh-text:   #e9e3d4;
  --rh-dim:    #9c9482;
}

/* ---------------------------------------------------------------- the plate */
#title { background: none; } /* the town canvas is a sibling BEHIND this */

#title::before {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 92% at 38% 42%, rgba(10,9,7,0) 0%, rgba(8,8,12,.34) 48%, rgba(5,6,10,.80) 100%),
    linear-gradient(180deg, rgba(6,7,12,.74) 0%, rgba(6,7,12,.06) 24%, rgba(5,6,11,.20) 64%, rgba(4,5,9,.84) 100%),
    radial-gradient(70% 55% at 74% 30%, rgba(232,98,42,.10), rgba(232,98,42,0) 70%);
}

/* the outer frame: a gold rule with notched corners carved out of it */
#title::after {
  content: '';
  position: absolute; inset: 12px; z-index: 6; pointer-events: none;
  border: 1px solid rgba(217,180,106,.34);
  box-shadow:
    inset 0 0 0 1px rgba(217,180,106,.10),
    inset 0 0 120px rgba(0,0,0,.72);
  clip-path: polygon(0 0, 34px 0, 34px 1px, 0 1px, 0 34px, 1px 34px, 1px 0, 100% 0, 100% 100%, 0 100%);
}

#title > canvas { filter: saturate(.80) brightness(.84) contrast(1.08); }

/* ---------------------------------------------------------------- the lockup */
#title .logo-img { display: none !important; }

#title .rh-lockup {
  position: absolute; left: 38px; top: 28px; z-index: 8;
  display: flex; align-items: center; gap: 18px;
  pointer-events: none;
  animation: rhIn .85s cubic-bezier(.2,1.1,.35,1) both;
}
@keyframes rhIn { from { opacity: 0; transform: translateY(-16px); } }

#title .rh-crest {
  width: 88px; height: 104px; flex: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.8)) drop-shadow(0 0 22px rgba(232,98,42,.20));
}
#title .rh-word { display: flex; flex-direction: column; gap: 3px; }

#title .rh-name {
  font-family: Cinzel, "Trajan Pro", Georgia, serif;
  font-weight: 900; font-size: clamp(30px, 3.5vw, 54px); line-height: .94;
  letter-spacing: .05em;
  background: linear-gradient(180deg, #fff8de 0%, #ebcd88 38%, #b0862f 64%, #f5ddaa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #241804) drop-shadow(0 5px 12px rgba(0,0,0,.95));
}

#title .rh-rule { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
#title .rh-rule i { display: block; height: 1px; width: clamp(36px, 5.6vw, 78px);
  background: linear-gradient(90deg, rgba(217,180,106,0), rgba(217,180,106,.9)); }
#title .rh-rule i:last-child { background: linear-gradient(90deg, rgba(217,180,106,.9), rgba(217,180,106,0)); }
#title .rh-rule b {
  font-family: Cinzel, Georgia, serif; font-weight: 700;
  font-size: clamp(10px, 1vw, 14px); letter-spacing: .54em; text-indent: .54em;
  color: var(--rh-gold); text-shadow: 0 1px 0 #241804, 0 0 14px rgba(217,180,106,.4);
}
#title .rh-tag {
  margin-top: 6px;
  font-family: Cinzel, Georgia, serif; font-weight: 700;
  font-size: 9.5px; letter-spacing: .36em; text-indent: .36em;
  color: rgba(217,180,106,.58);
}

/* ---------------------------------------------------------------- the dais */
/* ── the stage is gone: the gate is the only subject ─────────────────────── */
#title .cc-stage { right: 0; z-index: 3; }
#title .cc-pad,
#title #ccSprite,
#title #ccName,
#title #ccSub,
#title .arrow,
#title .cc-stage::before,
#title .cc-stage::after { display: none !important; }

#title .cc-plate {
  font-family: Cinzel, Georgia, serif; letter-spacing: .18em;
  background: linear-gradient(180deg, rgba(26,22,14,.94), rgba(10,9,7,.96));
  color: var(--rh-gold3);
  border: 1px solid rgba(217,180,106,.42);
  box-shadow: inset 0 1px 0 rgba(255,235,180,.16), 0 10px 26px rgba(0,0,0,.7);
}
#title .cc-sub { color: var(--rh-dim); letter-spacing: .2em; font-size: 9.5px; text-transform: uppercase; }

#title .arrow {
  background: linear-gradient(180deg, rgba(38,43,55,.9), rgba(14,16,22,.95));
  color: var(--rh-gold);
  border: 1px solid rgba(217,180,106,.34);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,235,180,.14), 0 4px 12px rgba(0,0,0,.6);
}
#title .arrow:hover { background: linear-gradient(180deg, rgba(217,180,106,.26), rgba(90,72,30,.9)); border-color: rgba(217,180,106,.8); }

/* ---------------------------------------------------------------- the plaque */
#title .cc-panel {
  width: 476px; right: 28px; top: 30px; bottom: 30px; z-index: 7;
  border-radius: 5px; padding: 0; overflow: visible;
  background:
    linear-gradient(180deg, #262b37 0%, #1b1f28 7%, #151922 42%, #0f1218 100%);
  border: 1px solid #05060a;
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,.12),
    inset 0 0 0 6px #10131a,
    inset 0 0 0 7px rgba(217,180,106,.26),
    inset 0 0 0 8px #0b0d13,
    0 34px 90px rgba(0,0,0,.85);
}
/* rivets, one per corner of the inner frame */
#title .cc-panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 5px;
  background:
    radial-gradient(circle at 13px 13px, #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 13px) 13px, #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at 13px calc(100% - 13px), #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 13px) calc(100% - 13px), #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px);
  background-repeat: no-repeat;
}

/* the plaque's cap: a slim gold rail. (A full banner header collided with the beta countdown, which
   is the first thing the panel body puts on screen.) */
#title .cc-panel::before {
  content: '';
  position: absolute; left: -6px; right: -6px; top: 9px; height: 7px;
  background: linear-gradient(180deg, #f5e0a8 0%, #dcc07a 40%, #a9832f 78%, #e9d196 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,.7);
}

#title .cc-panel > #titleBody { padding: 26px 26px 0; }
#title .cc-panel .fine {
  margin: 16px 26px 20px; padding-top: 13px;
  border-top: 1px solid rgba(217,180,106,.16);
  color: var(--rh-dim); font-size: 10.5px; line-height: 1.55; letter-spacing: .03em;
}

/* ---------------------------------------------------------------- the controls */
#title #titleBody { color: var(--rh-text); }
#title #titleBody h2, #title #titleBody h3, #title #titleBody h4, #title #titleBody .cc-title {
  font-family: Cinzel, Georgia, serif !important; font-weight: 700 !important;
  color: var(--rh-gold3); letter-spacing: .16em; text-transform: uppercase;
  font-size: 12.5px; margin: 2px 0 12px;
}
#title #titleBody label, #title #titleBody .lbl {
  color: var(--rh-dim); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase;
}

#title #titleBody input, #title #titleBody select {
  width: 100%;
  background: linear-gradient(180deg, #07080c, #0e1017);
  border: 1px solid #05060a;
  border-radius: 2px;
  color: var(--rh-text);
  padding: 11px 12px;
  font-size: 13px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.9), inset 0 0 0 1px rgba(217,180,106,.14), 0 1px 0 rgba(255,240,200,.06);
  transition: box-shadow .15s;
}
#title #titleBody input::placeholder { color: rgba(156,148,130,.6); }
#title #titleBody input:focus, #title #titleBody select:focus {
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.9), inset 0 0 0 1px rgba(217,180,106,.62), 0 0 16px rgba(217,180,106,.16);
}

/* buttons: cut metal plates, not rounded web pills */
#title #titleBody .btn,
#title #titleBody button.btn,
#title #titleBody button:not(.arrow) {
  border-radius: 2px;
  border: 1px solid #6d5a2c;
  background: linear-gradient(180deg, #3d3520 0%, #2a2416 52%, #191508 100%);
  color: var(--rh-gold3);
  font-family: Cinzel, Georgia, serif; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; font-size: 11px;
  padding: 11px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,.20),
    inset 0 -1px 0 rgba(0,0,0,.7),
    0 3px 0 #08060a,
    0 8px 18px rgba(0,0,0,.6);
  transition: filter .12s, transform .05s, box-shadow .12s;
}
#title #titleBody .btn:hover,
#title #titleBody button:not(.arrow):hover { filter: brightness(1.22); }
#title #titleBody .btn:active,
#title #titleBody button:not(.arrow):active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255,240,200,.14), 0 1px 0 #08060a, 0 3px 8px rgba(0,0,0,.6);
}
/* the primary action is a struck gold plate */
#title #titleBody .btn.primary,
#title #titleBody button.primary,
#title #titleBody .signin,
#title #titleBody button[type=submit] {
  background: linear-gradient(180deg, #f4dc9e 0%, #d3a94f 46%, #96701f 76%, #e3c682 100%);
  color: #1c1404; border-color: #f6e3b0;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
#title #titleBody a { color: var(--rh-gold); text-decoration: none; border-bottom: 1px solid rgba(217,180,106,.32); }
#title #titleBody a:hover { color: var(--rh-gold3); border-bottom-color: var(--rh-gold3); }
#title #titleBody .row { gap: 10px; }
#title #titleBody hr, #title #titleBody .sep {
  border: 0; height: 1px; margin: 15px 0;
  background: linear-gradient(90deg, rgba(217,180,106,0), rgba(217,180,106,.38), rgba(217,180,106,0));
}
#title #titleBody .beta, #title #titleBody .notice {
  border: 1px solid rgba(217,180,106,.3); border-radius: 2px;
  background: linear-gradient(180deg, rgba(217,180,106,.14), rgba(217,180,106,.03));
  color: var(--rh-gold3); letter-spacing: .06em;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.10);
}

#title .pcc-btn, #title #titleBody .pcc-btn {
  margin: 14px 26px 4px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(217,180,106,.16), rgba(217,180,106,.04));
  border: 1px solid rgba(217,180,106,.34);
  color: var(--rh-gold3);
  box-shadow: inset 0 1px 0 rgba(246,224,166,.12);
}
#title .pcc-btn:hover { background: linear-gradient(180deg, rgba(217,180,106,.26), rgba(217,180,106,.09)); }
#title .pcc-btn small { opacity: .72; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 900px) {
  #title .rh-lockup { left: 22px; top: 18px; gap: 12px; }
  #title .rh-crest { width: 58px; height: 70px; }
  #title .cc-panel { width: auto; left: 12px; right: 12px; top: auto; bottom: 12px; height: min(68vh, 560px); }
  #title .cc-panel::before { left: -10px; right: -10px; height: 38px; font-size: 12px; }
  #title .cc-panel > #titleBody { padding: 62px 18px 0; }
  #title .cc-stage { right: 0; }
}
