/*
Theme Name: Gloria Lightbear
Theme URI: https://glorialightbear.example/
Author: Built for Gloria Lightbear
Author URI: https://glorialightbear.example/
Description: A celestial theme that hosts self-contained interactive apps ("games") using the same glb_game install system as the other sites. Games are standalone .html files — bundled in the theme and auto-installed on activation, or uploaded later via the Game Settings meta box. Each game renders in a full-bleed iframe. Site chrome uses a midnight-indigo base with lavender/moonstone accents to sit comfortably above both dark and light games.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gloria-lightbear
*/

/* ============================================================
   DESIGN TOKENS
   Bridge identity: midnight indigo base (at home over Transit
   Dice's black) + lavender/moonstone accents (from Lune) + one
   restrained gold hairline (a nod to "Lightbear").
   ============================================================ */
:root{
  --glb-void:#060512;
  --glb-ink:#0b0a1e;
  --glb-ink-2:#12102b;
  --glb-indigo:#312e81;
  --glb-indigo-soft:rgba(99,102,241,.18);
  --glb-lavender:#c9a2c8;
  --glb-mist:#a493c4;
  --glb-moon:#e6d9f5;
  --glb-gold:#d9b26a;
  --glb-text:#d8d3ec;
  --glb-text-dim:#8a83ad;
  --glb-line:rgba(201,162,200,.16);
  --glb-line-strong:rgba(201,162,200,.34);

  --glb-header-h:74px;

  --glb-display:"Marcellus", Georgia, "Times New Roman", serif;
  --glb-body:"Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  min-height:100vh;
  font-family:var(--glb-body);
  font-weight:300;
  color:var(--glb-text);
  background:var(--glb-void);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:var(--glb-moon);text-decoration:none;}
a:hover{color:#fff;}
img{max-width:100%;height:auto;}

/* Ambient starfield sits behind everything */
.glb-sky{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(49,46,129,.35), transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(201,162,200,.10), transparent 45%),
    linear-gradient(180deg, var(--glb-ink) 0%, var(--glb-void) 60%);
}
.glb-sky canvas{position:absolute;inset:0;width:100%;height:100%;}

.glb-shell{position:relative;z-index:1;display:flex;flex-direction:column;min-height:100vh;}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.glb-header{
  position:sticky;top:0;z-index:50;
  height:var(--glb-header-h);
  display:flex;align-items:center;
  padding:0 clamp(16px,4vw,40px);
  background:rgba(6,5,18,.72);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--glb-line);
}
/* the gold hairline — the single restrained flourish */
.glb-header::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,var(--glb-gold),transparent);
  opacity:.5;
}

.glb-brand{display:flex;align-items:center;gap:12px;margin-right:auto;}
.glb-brand__mark{width:30px;height:30px;flex:none;filter:drop-shadow(0 0 8px rgba(217,178,106,.45));}
.glb-brand__text{display:flex;flex-direction:column;line-height:1;}
.glb-brand__name{
  font-family:var(--glb-display);
  font-size:19px;letter-spacing:.14em;color:#fff;text-transform:uppercase;
}
.glb-brand__tag{
  font-size:9px;letter-spacing:.34em;text-transform:uppercase;
  color:var(--glb-mist);margin-top:5px;
}

.glb-nav{display:flex;align-items:center;gap:4px;}
.glb-nav a{
  position:relative;
  display:inline-flex;align-items:center;gap:9px;
  font-size:12px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--glb-text-dim);
  padding:10px 16px;border-radius:999px;
  transition:color .25s, background .25s;
}
.glb-nav__icon{width:15px;height:15px;flex:none;display:block;}
.glb-nav a:hover{color:var(--glb-moon);background:rgba(201,162,200,.06);}
.glb-nav a.is-current{color:#fff;}
.glb-nav a.is-current::after{
  content:"";position:absolute;left:16px;right:16px;bottom:4px;height:1px;
  background:linear-gradient(90deg,transparent,var(--glb-lavender),transparent);
}

/* mobile nav */
.glb-nav-toggle{display:none;background:none;border:0;cursor:pointer;padding:8px;color:var(--glb-moon);}
.glb-nav-toggle svg{display:block;}

@media (max-width:760px){
  .glb-nav-toggle{display:inline-flex;}
  .glb-nav{
    position:absolute;top:var(--glb-header-h);left:0;right:0;
    flex-direction:column;align-items:stretch;gap:0;
    background:rgba(6,5,18,.96);backdrop-filter:blur(14px);
    border-bottom:1px solid var(--glb-line);
    padding:8px 12px 16px;
    display:none;
  }
  .glb-nav.is-open{display:flex;}
  .glb-nav a{padding:14px 12px;border-radius:10px;}
  .glb-nav a.is-current::after{display:none;}
  .glb-nav a.is-current{background:rgba(201,162,200,.08);}
}

/* ============================================================
   MAIN / GAME FRAME
   ============================================================ */
.glb-main{flex:1;display:flex;flex-direction:column;position:relative;z-index:1;}

.glb-gameframe-wrap{position:relative;flex:1;display:flex;}
.glb-gameframe{
  border:0;width:100%;
  height:calc(100vh - var(--glb-header-h));
  display:block;background:transparent;
}
/* When embedded via shortcode inside normal content, it can auto-size */
.glb-gameframe--embed{height:720px;border-radius:18px;overflow:hidden;
  border:1px solid var(--glb-line);box-shadow:0 30px 80px rgba(0,0,0,.5);}

/* ============================================================
   CONTENT PAGES (for normal posts/pages/404/onboarding)
   ============================================================ */
.glb-content{
  width:100%;max-width:820px;margin:0 auto;
  padding:clamp(48px,8vw,110px) clamp(20px,5vw,32px) 90px;
}
.glb-eyebrow{
  font-size:11px;letter-spacing:.4em;text-transform:uppercase;
  color:var(--glb-lavender);margin:0 0 18px;
}
.glb-content h1,.glb-title{
  font-family:var(--glb-display);font-weight:400;
  font-size:clamp(32px,6vw,52px);line-height:1.1;color:#fff;margin:0 0 22px;
}
.glb-content h2{font-family:var(--glb-display);font-weight:400;color:var(--glb-moon);
  font-size:clamp(22px,4vw,30px);margin:44px 0 14px;}
.glb-content p{font-size:17px;line-height:1.7;color:var(--glb-text);margin:0 0 20px;}
.glb-content a{color:var(--glb-lavender);text-decoration:underline;text-underline-offset:3px;}
.glb-content a:hover{color:#fff;}

.glb-onboard-card{
  margin-top:36px;padding:34px;border-radius:20px;
  background:linear-gradient(180deg,rgba(18,16,43,.7),rgba(6,5,18,.7));
  border:1px solid var(--glb-line);
}
.glb-onboard-card ol{margin:0;padding-left:20px;}
.glb-onboard-card li{margin:0 0 12px;line-height:1.6;}
.glb-onboard-card code{
  font-family:ui-monospace,monospace;font-size:13px;
  background:rgba(201,162,200,.12);color:var(--glb-moon);
  padding:2px 7px;border-radius:5px;
}

.glb-btn{
  display:inline-block;margin-top:8px;
  font-size:12px;letter-spacing:.24em;text-transform:uppercase;font-weight:400;
  color:#fff;background:linear-gradient(90deg,var(--glb-indigo),#6d5c8e);
  padding:15px 34px;border-radius:999px;text-decoration:none;
  box-shadow:0 14px 32px rgba(49,46,129,.4);transition:transform .2s;
}
.glb-btn:hover{transform:translateY(-2px);color:#fff;}

/* ============================================================
   FOOTER
   ============================================================ */
.glb-footer{
  position:relative;z-index:1;
  padding:26px clamp(16px,4vw,40px);
  border-top:1px solid var(--glb-line);
  display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:space-between;
  background:rgba(6,5,18,.6);
}
.glb-footer__mark{font-family:var(--glb-display);letter-spacing:.14em;color:var(--glb-moon);text-transform:uppercase;font-size:13px;}
.glb-footer__note{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--glb-text-dim);}

/* reduced motion */
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;}
}
