
/* OtterX runtime styles
   Keep the theme.json responsible for core styling.
   This file adds the OtterX identity: rail, depth panels, glow, and layout behaviour.
*/

:root{
  --otterx-glow: rgba(35, 211, 194, 0.55);
  --otterx-glow-strong: rgba(35, 211, 194, 0.9);
  --otterx-shadow: 0 12px 40px rgba(0,0,0,0.35);
  --otterx-radius: 18px;
  --otterx-pad: clamp(18px, 2.5vw, 44px);
  --otterx-stage-max: 1500px;
}

html, body{
  min-height: 100%;
}

body{
  background: var(--wp--preset--color--graphite);
}

/* Stage (full-bleed) */
.otterx-stage{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Inner content width controller */
.otterx-container{
  max-width: var(--otterx-stage-max);
  margin: 0 auto;
  padding: var(--otterx-pad);
  padding-left: calc(var(--otterx-pad) + 18px); /* leave space for glow edge */
}


/* Layered depth panels */
.otterx-section,
.otterx-card,
.otterx-panel,
.otterx-cta{
  background: var(--wp--preset--color--panel);
  border-radius: var(--otterx-radius);
  box-shadow: var(--otterx-shadow);
  border: 1px solid rgba(255,255,255,0.06);
}

.otterx-section{
  margin: 0;
  padding: 0;
}

.otterx-section__title{
  margin-top: 0;
  margin-bottom: 22px;
}

/* Hero */
.otterx-hero{
  min-height: min(92vh, 920px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
  overflow: hidden;
}
.otterx-hero::before{
  content: "";
  position: absolute;
  inset: -35%;
  background:
    radial-gradient(circle at 50% 35%, rgba(35, 211, 194, 0.18), transparent 55%),
    radial-gradient(circle at 72% 62%, rgba(91, 241, 227, 0.12), transparent 62%),
    radial-gradient(circle at 26% 78%, rgba(35, 211, 194, 0.10), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.55), rgba(0,0,0,0.85));
  filter: blur(26px);
  transform: translateZ(0);
  pointer-events: none;
}
.otterx-hero__inner{
  position: relative;
  z-index: 1;
  padding-top: clamp(56px, 10vh, 110px);
  padding-bottom: clamp(56px, 10vh, 110px);
}
.otterx-hero__title{
  letter-spacing: -0.02em;
  margin: 0 0 18px 0;
}
.otterx-hero__sub{
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--wp--preset--color--muted);
}

/* Buttons */
.otterx-btn--primary .wp-element-button{
  box-shadow: 0 0 0 1px rgba(35, 211, 194, 0.25), 0 18px 38px rgba(0,0,0,0.35);
}
.otterx-btn--primary .wp-element-button:hover{
  box-shadow: 0 0 0 1px rgba(35, 211, 194, 0.55), 0 22px 48px rgba(0,0,0,0.45);
}

.otterx-btn--ghost .wp-element-button{
  color: var(--wp--preset--color--text);
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12);
}
.otterx-btn--ghost .wp-element-button:hover{
  border-color: rgba(35, 211, 194, 0.40);
  box-shadow: 0 0 0 1px rgba(35, 211, 194, 0.12);
}

/* Cards */
.otterx-cards .wp-block-post-template{
  gap: 18px;
}
.otterx-card{
  padding: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.otterx-card:hover{
  transform: translateY(-4px);
  border-color: rgba(35, 211, 194, 0.35);
  box-shadow: 0 18px 52px rgba(0,0,0,0.50);
}

/* Command rail */
.otterx-rail{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 18px;
  z-index: 9999;
}

.otterx-rail__trigger{
  all: unset;
  cursor: pointer;
  width: 18px;
  height: 100%;
  display: block;
  position: relative;
}

.otterx-rail__glow{
  position: absolute;
  left: 5px;
  top: 10vh;
  bottom: 10vh;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, rgba(35, 211, 194, 0.85), transparent);
  filter: drop-shadow(0 0 10px var(--otterx-glow)) drop-shadow(0 0 22px rgba(35, 211, 194, 0.22));
  opacity: 0.9;
  transition: opacity 200ms ease, filter 200ms ease;
}

.otterx-rail__trigger:hover .otterx-rail__glow,
.otterx-rail__trigger:focus-visible .otterx-rail__glow{
  opacity: 1;
  filter: drop-shadow(0 0 14px var(--otterx-glow-strong)) drop-shadow(0 0 34px rgba(35, 211, 194, 0.26));
}

.otterx-rail__panel{
  position: fixed;
  inset: 0 auto 0 0;
  width: min(380px, 90vw);
  background: rgba(14, 15, 18, 0.86);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 18px 0 60px rgba(0,0,0,0.6);
  z-index: 10000;
}

.otterx-rail__panel-inner{
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.otterx-rail__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.otterx-site-title{
  font-weight: 800;
  letter-spacing: -0.01em;
}

.otterx-rail__close{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--wp--preset--color--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.otterx-rail__close:hover{
  border-color: rgba(35, 211, 194, 0.40);
  box-shadow: 0 0 0 1px rgba(35, 211, 194, 0.12);
}

.otterx-nav{
  padding-top: 8px;
}

.otterx-rail__utilities{
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.otterx-theme-toggle{
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--wp--preset--color--text);
  padding: 12px 12px;
  border-radius: 14px;
  cursor: pointer;
}
.otterx-theme-toggle:hover{
  border-color: rgba(35, 211, 194, 0.40);
  box-shadow: 0 0 0 1px rgba(35, 211, 194, 0.12);
}

.otterx-rail__byline{
  font-size: 13px;
  color: rgba(234, 239, 246, 0.62);
}

.otterx-rail__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9998;
}

/* Footer */
.otterx-footer{
  margin-top: 34px;
  padding: 26px var(--otterx-pad);
  background: transparent;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.otterx-footer__inner{
  max-width: var(--otterx-stage-max);
  margin: 0 auto;
}
.otterx-footer a{
  color: var(--wp--preset--color--muted);
}
.otterx-footer a:hover{
  color: var(--wp--preset--color--cyan);
}

/* Light mode override (class on body) */
body.otterx-light{
  background: var(--wp--preset--color--light-bg);
  color: var(--wp--preset--color--light-text);
}
body.otterx-light .otterx-section,
body.otterx-light .otterx-card,
body.otterx-light .otterx-panel,
body.otterx-light .otterx-cta{
  background: var(--wp--preset--color--light-panel);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
body.otterx-light .otterx-hero::before{
  background: radial-gradient(circle at 50% 35%, rgba(35, 211, 194, 0.12), transparent 55%),
              radial-gradient(circle at 70% 65%, rgba(35, 211, 194, 0.09), transparent 60%);
}
body.otterx-light .otterx-hero__sub{
  color: rgba(16, 19, 24, 0.72);
}

body.otterx-light .otterx-section--caps .otterx-container,
body.otterx-light .otterx-section--showcase .otterx-container,
body.otterx-light .otterx-section--cta .otterx-container{
  background: var(--wp--preset--color--light-panel);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
body.otterx-light .otterx-btn--ghost .wp-element-button{
  color: rgba(16, 19, 24, 0.92);
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.10);
}
body.otterx-light .otterx-rail__panel{
  background: rgba(247, 248, 250, 0.92);
  border-right-color: rgba(0,0,0,0.08);
}
body.otterx-light .otterx-rail__close,
body.otterx-light .otterx-theme-toggle{
  color: rgba(16, 19, 24, 0.92);
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}
body.otterx-light .otterx-rail__byline{
  color: rgba(16, 19, 24, 0.60);
}
body.otterx-light .otterx-footer{
  border-top-color: rgba(0,0,0,0.08);
}
body.otterx-light .otterx-footer a{
  color: rgba(16, 19, 24, 0.70);
}

/* Responsive */
@media (max-width: 720px){
  .otterx-container{
    padding-left: calc(var(--otterx-pad) + 10px);
  }
  .otterx-rail{
    width: 14px;
  }
  .otterx-rail__trigger{
    width: 14px;
  }
  .otterx-rail__glow{
    left: 4px;
    width: 2px;
  }
}


/* Full-bleed section inner spacing */
.otterx-section > .otterx-container{
  padding-top: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(28px, 4vw, 64px);
}

/* Put panels inside sections */
.otterx-section--caps .otterx-container,
.otterx-section--showcase .otterx-container,
.otterx-section--cta .otterx-container{
  background: var(--wp--preset--color--panel);
  border-radius: var(--otterx-radius);
  box-shadow: var(--otterx-shadow);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Give these inner panels their own padding */
.otterx-section--caps .otterx-container,
.otterx-section--showcase .otterx-container,
.otterx-section--cta .otterx-container{
  padding: clamp(22px, 3vw, 54px);
}

/* Reduce footer centering differences */
.otterx-footer__inner{
  padding-left: calc(var(--otterx-pad) + 18px);
  padding-right: var(--otterx-pad);
}
