/* Nerdcave guild site: the front door for visitors who aren't logged in
   (login.html). The owner's look (2026-11-16): Stormwind's gate on a
   stormy night with lightning, NERDCAVE in a fancy font with lightning, the
   panel in the gateway, after the game's own login screen.

   Layers, back to front: .login-bg (the night picture, and the lit copy that
   js/login.js fades in at each strike), .login-fx (the storm canvas: lightning
   over the sky only, rain), then the wordmark and the panel. Builds on
   guild.css (.glass, .gbtn, .hv-kicker). No site bar here. */

.login-body { background: #04060c; }
.login { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; }

/* the picture fills the screen; the gate stays in the middle at every size */
.login-bg { position: absolute; inset: 0; z-index: -2; background: #04060c; }
.lbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.lbg-lit { opacity: 0; will-change: opacity; }
/* a little extra dark at the top (the wordmark) and the bottom (the footer) */
.login-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 5, 12, .45) 0%, transparent 26%, transparent 70%, rgba(3, 5, 12, .7) 100%); }
.login-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.storm { display: block; width: 100%; height: 100%; }
/* the sparks on the wordmark's letters: above everything, never in the way */
.spark { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }

.login-stage { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: var(--head-room, 24vh) clamp(16px, 4vw, 48px) 56px; }
/* the wordmark and its line, up in the sky: js/login.js measures where the
   castle starts on this screen and sets --head-top and --word-size */
.login-head { position: absolute; left: 0; right: 0; top: var(--head-top, 24px); z-index: 1; display: grid; justify-items: center; gap: 12px; padding: 0 16px; }

/* NERDCAVE: Cinzel Decorative, cold steel with an electric glow; js/login.js
   adds .zap for a moment when lightning strikes */
.login-word { margin: 0; font: 900 var(--word-size, clamp(40px, min(7vw, 9vh), 110px))/1 "Cinzel Decorative", "Cinzel", var(--font-display); letter-spacing: .05em; margin-right: -.05em;
  color: transparent; background: linear-gradient(180deg, #ffffff 0%, #eef3ff 30%, #b8c9ee 56%, #7b90c4 78%, #d6e2ff 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 1px rgba(225, 235, 255, .95)) drop-shadow(0 0 18px rgba(120, 160, 255, .6)) drop-shadow(0 0 60px rgba(80, 120, 255, .38)); }
.login-word.zap { animation: zap .5s steps(1) 1;
  filter: brightness(1.45) drop-shadow(0 0 2px #ffffff) drop-shadow(0 0 22px rgba(200, 222, 255, 1)) drop-shadow(0 0 90px rgba(130, 170, 255, .9)); }

@keyframes zap {
  0% { transform: translate(0, 0); } 20% { transform: translate(-1.5px, 1px); } 40% { transform: translate(1.5px, -1px); }
  60% { transform: translate(-1px, 0); } 80% { transform: translate(1px, 1px); } 100% { transform: none; }
}
.login-kicker { justify-content: center; font-size: 12px; color: rgba(214, 226, 255, .82); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }

/* the panel in the gateway: a gold-framed card like the game's own login
   frame (2026-11-18, the owner: "a bit dull, make it fancy"). Layers: the
   frame's gold edge (the border-box gradient), a thin inner line with gold
   corner diamonds (::before, ::after), the guild's shield on top. --flash
   (js/site/login.js) lights the rim up with each lightning strike. */
.login-panel { --flash: 0; position: relative; width: min(100%, 452px); margin-top: 38px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 50px 36px 26px; border: 1px solid transparent; border-radius: 16px; text-align: center;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(126, 150, 255, .17), transparent 62%) padding-box,
    linear-gradient(180deg, rgba(17, 21, 37, .93), rgba(8, 10, 19, .95)) padding-box,
    linear-gradient(180deg, #f8e2a2 0%, #c79b45 22%, #5d4519 50%, #8d6a2c 78%, #e9c56f 100%) border-box;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 34px 90px -24px rgba(0, 0, 0, .9), 0 0 46px -10px rgba(233, 196, 106, .28),
    0 0 calc(var(--flash) * 80px) calc(var(--flash) * 10px) rgba(176, 204, 255, calc(var(--flash) * .7)); }
/* the inner line, and the gold corner diamonds on it */
.login-panel::before, .login-panel::after { content: ""; position: absolute; inset: 8px; border-radius: 9px; pointer-events: none; }
.login-panel::before { border: 1px solid rgba(233, 196, 106, .26); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.login-panel::after { inset: 2px; border-radius: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M15 6.5h19M6.5 15v19' stroke='%23f0cd78' stroke-width='1.4'/%3E%3Cpath d='M6.5 1.5 11.5 6.5 6.5 11.5 1.5 6.5Z' fill='%23f8e2a2' stroke='%2314100a' stroke-width='.8'/%3E%3C/svg%3E") left top / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cg transform='matrix(-1 0 0 1 34 0)'%3E%3Cpath d='M15 6.5h19M6.5 15v19' stroke='%23f0cd78' stroke-width='1.4'/%3E%3Cpath d='M6.5 1.5 11.5 6.5 6.5 11.5 1.5 6.5Z' fill='%23f8e2a2' stroke='%2314100a' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E") right top / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cg transform='matrix(1 0 0 -1 0 34)'%3E%3Cpath d='M15 6.5h19M6.5 15v19' stroke='%23f0cd78' stroke-width='1.4'/%3E%3Cpath d='M6.5 1.5 11.5 6.5 6.5 11.5 1.5 6.5Z' fill='%23f8e2a2' stroke='%2314100a' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E") left bottom / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cg transform='matrix(-1 0 0 -1 34 34)'%3E%3Cpath d='M15 6.5h19M6.5 15v19' stroke='%23f0cd78' stroke-width='1.4'/%3E%3Cpath d='M6.5 1.5 11.5 6.5 6.5 11.5 1.5 6.5Z' fill='%23f8e2a2' stroke='%2314100a' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E") right bottom / 34px no-repeat; }
.login-panel > * { position: relative; z-index: 1; }

/* the guild's shield, in a medallion on the frame's top edge */
.login-crest { position: absolute; top: -40px; left: 50%; width: 80px; height: 80px; margin-left: -40px; padding: 11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #232849, #0b0d19 70%) padding-box, linear-gradient(180deg, #f8e2a2, #9a7430 55%, #e9c56f) border-box;
  border: 2px solid transparent; box-shadow: 0 0 0 4px rgba(6, 8, 15, .85), 0 10px 30px -6px rgba(0, 0, 0, .8), 0 0 34px rgba(233, 196, 106, .35); }

.login-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; font: 700 12px/1 "Cinzel", var(--font-display); letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; color: #e9c56f; white-space: nowrap; }
.login-eyebrow::before, .login-eyebrow::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 197, 111, .8)); }
.login-eyebrow::after { transform: scaleX(-1); margin-right: .3em; }
.login-title { margin: -6px 0 0; font: 700 clamp(23px, 6.6vw, 30px)/1.15 "Cinzel", var(--font-display); letter-spacing: .02em; white-space: nowrap;
  color: transparent; background: linear-gradient(180deg, #fffaf0 0%, #f6dfa0 55%, #d9a94b 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(233, 196, 106, .28)); }

/* what members get: three, side by side, one line each */
.login-perks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 0; padding: 4px 0 2px; }
.login-perks li { display: flex; flex-direction: column; align-items: center; gap: 9px; font: 600 13px/1.2 "Inter", var(--font-ui); color: rgba(232, 236, 250, .86); white-space: nowrap; }
.login-perk-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #f0cd78;
  background: radial-gradient(circle at 50% 30%, rgba(233, 196, 106, .2), rgba(233, 196, 106, .04) 70%); border: 1px solid rgba(233, 196, 106, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 16px -4px rgba(233, 196, 106, .45); }
.login-perk-ic .ic { width: 19px; height: 19px; }

/* the way in: Discord's own colour (blurple) with a light running over it now
   and then; our chat icon, not Discord's logo */
.login-go { position: relative; overflow: hidden; isolation: isolate; width: 100%; height: 56px; margin-top: 4px; padding: 0 52px; border-radius: 12px; font-size: 16px; }
.gbtn-discord { color: #fff; background: linear-gradient(180deg, #7480ff 0%, #5865f2 55%, #4651d0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(20, 24, 90, .45), 0 0 0 1px rgba(150, 160, 255, .35), 0 14px 40px -12px rgba(88, 101, 242, .95); }
.gbtn-discord:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(20, 24, 90, .45), 0 0 0 1px rgba(170, 180, 255, .55), 0 18px 52px -12px rgba(98, 112, 255, 1); }
.gbtn-discord .ic { width: 20px; height: 20px; }
.login-go-arrow { position: absolute; right: 20px; top: 50%; margin-top: -10px; opacity: .85; transition: transform .25s; }
.login-go:hover .login-go-arrow, .login-go:focus-visible .login-go-arrow { transform: translateX(4px); }
.login-go::after { content: ""; position: absolute; inset: -20% auto -20% -40%; width: 34%; z-index: -1; transform: skewX(-20deg) translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); animation: sheen 6s ease-in-out 1.2s infinite; }
@keyframes sheen { 0% { transform: skewX(-20deg) translateX(-120%); } 22%, 100% { transform: skewX(-20deg) translateX(520%); } }

/* what login.js has to say (a failed login, "opens soon", who is logged in):
   nothing, and no room taken, until then */
.login-said { width: 100%; margin: -6px 0 0; padding: 10px 14px; border-radius: 10px; font: 500 14px/1.5 "Inter", var(--font-ui); color: #e6e9ff; text-wrap: pretty;
  background: rgba(88, 101, 242, .14); border: 1px solid rgba(124, 136, 255, .38); }
.login-said:empty { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; clip-path: inset(50%); }

.login-or { display: flex; align-items: center; gap: 14px; width: 100%; margin: -4px 0; font: 600 12px/1 "Inter", var(--font-ui); letter-spacing: .22em; text-transform: uppercase; color: rgba(225, 230, 248, .55); }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 196, 106, .4)); }
.login-or::after { transform: scaleX(-1); }
/* no backdrop blur: the rain behind would make the browser re-blur it every frame */
.login-guest { width: 100%; height: 48px; border-radius: 12px; font-size: 15px; backdrop-filter: none; -webkit-backdrop-filter: none;
  border-color: rgba(233, 196, 106, .3); background: rgba(255, 255, 255, .05); }
.login-guest:hover { border-color: rgba(233, 196, 106, .55); background: rgba(233, 196, 106, .08); }
.login-guest .ic { width: 18px; height: 18px; color: #f0cd78; }

.login-join { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; margin-top: 0; font: 500 14px/1.4 "Inter", var(--font-ui); color: rgba(255, 255, 255, .7); }
.login-join .ic { width: 16px; height: 16px; color: rgba(255, 255, 255, .5); }
.login-join a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Blizzard's notice behind the "!" (guild.css .legal-corner): in the screen's
   bottom-right corner here */
.login-foot { position: absolute; right: 0; bottom: 0; z-index: 60; padding: 0 clamp(12px, 2vw, 22px) calc(12px + env(safe-area-inset-bottom)); }
.login-foot .legal-tip { right: clamp(12px, 2vw, 22px); }

@media (max-width: 760px) {
  .login-stage { gap: 12px; padding: var(--head-room, 26vh) 14px calc(52px + env(safe-area-inset-bottom)); justify-content: flex-end; }
  .login-panel { gap: 16px; margin-top: 36px; padding: 46px 20px 22px; }
  .login-crest { top: -36px; width: 72px; height: 72px; margin-left: -36px; padding: 10px; }
}
/* short screens (laptops at 1280 x 720 or 1366 x 768): a tighter panel, the
   perks' icons smaller, so it all fits without scrolling */
@media (max-height: 820px) and (min-width: 761px) {
  .login-stage { gap: 10px; padding-bottom: 26px; }
  .login-panel { gap: 13px; margin-top: 34px; padding: 44px 36px 20px; }
  .login-crest { top: -34px; width: 68px; height: 68px; margin-left: -34px; padding: 9px; }
  .login-perks { padding: 0; }
  .login-perks li { gap: 6px; }
  .login-perk-ic { width: 32px; height: 32px; }
  .login-perk-ic .ic { width: 16px; height: 16px; }
  .login-go { height: 52px; }
  .login-guest { height: 44px; }
}
/* short phones: the same tightening */
@media (max-width: 760px) and (max-height: 760px) {
  .login-stage { gap: 10px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .login-panel { gap: 12px; margin-top: 32px; padding-top: 40px; padding-bottom: 18px; }
  .login-crest { top: -32px; width: 64px; height: 64px; margin-left: -32px; padding: 8px; }
  .login-perks { padding: 0; }
  .login-perks li { gap: 6px; }
  .login-perk-ic { width: 32px; height: 32px; }
  .login-perk-ic .ic { width: 16px; height: 16px; }
  .login-go { height: 50px; }
  .login-guest { height: 44px; }
}
@media (max-width: 400px) {
  .login-panel { padding-inline: 16px; }
  .login-perks { gap: 4px; }
  .login-perks li { font-size: 12.5px; }
  .login-go { padding: 0 44px; font-size: 15px; }
  .login-go-arrow { right: 16px; }
}

/* still: no glow pulse, no jolt (the storm canvas stays empty too) */
@media (prefers-reduced-motion: reduce) {
  .login-word.zap { animation: none; }
  .login-go::after { animation: none; display: none; }
}
html.calm .login-word.zap, html.still .login-word.zap { animation: none; }
html.calm .login-go::after, html.still .login-go::after { animation: none; display: none; }

/* the login's state (js/login.js): no login yet, a failed try */
.gbtn-discord.is-off { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.gbtn-discord.is-off::after, .gbtn-discord.is-off .login-go-arrow { display: none; }
.login-said.bad { color: #ffd2cc; background: rgba(255, 110, 96, .1); border-color: rgba(255, 154, 144, .45); }
