/*
Theme Name: Sovereign Intelligence 3D
Description: Executive tourism intelligence terminal with an interactive geosphere and Sovereign Deck.
Version: 1.1.0
Author: Imad
Requires at least: 6.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imad-sovereign
*/

:root {
  --accent-color: #00f2fe;
  --accent-glow: rgba(0, 242, 254, 0.35);
  --void: #030508;
  --glass: rgba(8, 12, 20, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf2f7;
  --muted: #9ba8ba;
  --hud-height: 76px;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 115px;
  scrollbar-color: #334155 var(--void);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-color); }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 5px;
}
::selection { background: var(--accent-color); color: var(--void); }
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; letter-spacing: -.05em; }
h3 { font-size: 1.2rem; line-height: 1.3; }
small, .mono, .eyebrow {
  font-family: "JetBrains Mono", monospace;
}
small { color: var(--muted); }
.eyebrow {
  font-size: .68rem;
  line-height: 1.8;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-color);
}
.muted { color: var(--muted); }
.accent { color: var(--accent-color); }
.glass-hull {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 99999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  background: var(--void);
  color: var(--accent-color);
}
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .88;
}
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 75% 35%, var(--accent-glow), transparent 55%),
    linear-gradient(90deg, #030508 2%, transparent 85%);
  opacity: .25;
}
.site-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--hud-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 3vw;
}
.admin-bar .site-hud { top: 32px; }
.telemetry, .hud-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.telemetry { font-size: .65rem; letter-spacing: .035em; }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: beacon 2s ease-in-out infinite;
  flex-shrink: 0;
}
.hud-actions { font-size: .7rem; }
.hud-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background: rgba(3, 5, 8, .7);
  min-height: 40px;
}
.hud-button svg { width: 14px; height: 14px; }
#site-content, .site-footer { position: relative; z-index: 1; }
.shell { width: min(1280px, 92%); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  min-height: 880px;
  min-height: max(780px, 100svh);
  padding-top: 140px;
  padding-bottom: 80px;
  gap: 40px;
}
.hero-copy { max-width: 650px; }
.hero h1 {
  font-size: clamp(4.8rem, 10vw, 9rem);
  line-height: .95;
  font-weight: 600;
  letter-spacing: -.085em;
  margin: 22px 0 28px;
  overflow-wrap: anywhere;
}
.hero-statement {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  letter-spacing: -.04em;
  line-height: 1.16;
  max-width: 580px;
}
.hero-description { color: var(--muted); max-width: 540px; margin-top: 25px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, .8);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
}
.button svg { width: 16px; height: 16px; }
.button-primary {
  background: var(--accent-color);
  color: #030508;
  border-color: var(--accent-color);
}
.button-primary:hover { color: #030508; box-shadow: 0 0 30px var(--accent-glow); }
.hero-footnote { margin-top: 40px; font-size: .65rem; color: var(--muted); }
.world-stage {
  min-height: 440px;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
  border-radius: 50%;
}
.world-stage:active { cursor: grabbing; }
.world-stage p {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font-size: .6rem;
  letter-spacing: .13em;
}
.inspector {
  position: fixed;
  top: 100px;
  right: 3vw;
  width: 290px;
  z-index: 20;
  padding: 18px;
  border-radius: 6px;
  transition: opacity .2s;
}
.admin-bar .inspector { top: 132px; }
.inspector-heading { display: flex; justify-content: space-between; gap: 10px; }
.inspector h2 { font-size: 1.45rem; margin: 10px 0 14px; letter-spacing: -.03em; }
.inspector dl { margin: 0; font-size: .65rem; }
.inspector dl div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.inspector dt { color: var(--muted); }
.inspector dd { margin: 0; text-align: right; }
.hub-picker { margin-top: 12px; }
.hub-picker select {
  width: 100%;
  background: #0b111c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 7px;
  font-size: .7rem;
}
.engine-message { font-size: .6rem; margin: 10px 0 0; color: var(--muted); }
body.past-hero .inspector { opacity: 0; pointer-events: none; visibility: hidden; }
.section-block { padding: 88px 0; border-top: 1px solid var(--border); }
.section-header { max-width: 720px; margin-bottom: 35px; }
.section-header p:last-child { color: var(--muted); }
.section-header h2 { margin: 12px 0 20px; }
.section-number { color: var(--muted); margin-right: 18px; }
.simulator {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border-radius: 8px;
  overflow: hidden;
}
.slider-panel { padding: 34px; border-right: 1px solid var(--border); }
.slider-field { margin-bottom: 28px; }
.slider-field:last-child { margin-bottom: 0; }
.slider-label { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; }
.slider-label output { color: var(--accent-color); font-family: "JetBrains Mono", monospace; }
input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 12px 0 2px;
  cursor: pointer;
  accent-color: var(--accent-color);
  background: transparent;
}
.range-extents { display: flex; justify-content: space-between; font-size: .6rem; color: var(--muted); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; }
.metric { padding: 30px 24px; border-bottom: 1px solid var(--border); }
.metric:nth-child(odd) { border-right: 1px solid var(--border); }
.metric:nth-child(n+3) { border-bottom: 0; }
.metric-label { font-size: .65rem; color: var(--muted); display: block; }
.metric-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: -.045em;
  line-height: 1.2;
  margin: 14px 0 8px;
}
.metric small { font-size: .58rem; }
.model-note { margin-top: 20px; color: var(--muted); font-size: .72rem; max-width: 950px; }
.pipeline-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pipeline-card {
  color: var(--text);
  border-radius: 5px;
  padding: 24px 18px;
  text-align: left;
  min-height: 180px;
  transition: border-color .2s, transform .2s;
}
.pipeline-card:hover { transform: translateY(-4px); border-color: var(--accent-color); }
.pipeline-card[aria-pressed="true"] { border-color: var(--accent-color); box-shadow: inset 0 2px var(--accent-color); }
.pipeline-card svg { width: 22px; height: 22px; color: var(--accent-color); margin-bottom: 24px; }
.pipeline-card strong { display: block; font-size: .85rem; }
.pipeline-card small { display: block; font-size: .58rem; margin-top: 7px; }
.terminal { margin-top: 18px; border-radius: 5px; overflow: hidden; }
.terminal-top { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.terminal-top span { font-size: .6rem; }
.terminal-log { height: 175px; overflow-y: auto; padding: 16px 18px; }
.terminal-log p { margin: 0 0 7px; font-size: .65rem; color: #b5c2d3; overflow-wrap: anywhere; }
.terminal-log time { color: var(--accent-color); }
.dossier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dossier { padding: 30px; border-radius: 6px; }
.dossier .index-code { display: block; color: var(--accent-color); font-size: .6rem; margin-bottom: 36px; }
.dossier h3 { font-size: 1.5rem; letter-spacing: -.035em; }
.dossier p, .dossier li { color: var(--muted); font-size: .8rem; }
.dossier ul { padding-left: 18px; margin: 20px 0 0; list-style: square; }
.dossier li { margin-bottom: 9px; }
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: rgba(3, 5, 8, .9);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: .65rem; }
.document-view { padding-top: 150px; min-height: 75vh; padding-bottom: 70px; }
.entry { margin-bottom: 40px; padding: 30px; border-radius: 6px; overflow-wrap: anywhere; }
.entry h1 { font-size: clamp(2rem, 5vw, 4rem); }
.entry a { color: var(--accent-color); text-decoration: underline; }
.entry img, .entry video { max-width: 100%; height: auto; }
.entry ul, .entry ol { padding-left: 24px; margin-bottom: 20px; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry p { margin-bottom: 20px; }
.entry pre { overflow-x: auto; padding: 20px; background: #030508; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: .8rem; color: var(--muted); }
.sticky { border-color: var(--accent-color); }
.bypostauthor { border-left: 2px solid var(--accent-color); }
.footer-menu { margin-bottom: 20px; }
.footer-menu ul { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; font-size: .8rem; }
.search-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.search-form input, .comment-form input:not([type="checkbox"]), .comment-form textarea {
  background: #080c14; color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 12px; max-width: 100%;
}
.comment-form textarea { width: 100%; }
.comment-form label { display: block; margin-bottom: 8px; }
.comment-form-cookies-consent label { display: inline; margin-left: 8px; }
.comment-list, .comment-list .children { list-style: none; padding-left: 0; }
.comment-list .children { margin-left: 24px; }
.comment-body { padding: 22px 0; border-bottom: 1px solid var(--border); }
.comment-meta { font-size: .8rem; }
.comment-meta img { display: inline-block; border-radius: 50%; margin-right: 10px; }
.comment-metadata { color: var(--muted); margin: 8px 0; }
.comment-respond { margin-top: 30px; }
.comment-form .submit { cursor: pointer; background: var(--accent-color) !important; color: #030508 !important; }
.entry::after { content: ""; display: block; clear: both; }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { padding: 10px; border: 1px solid var(--border); }
.entry blockquote { border-left: 3px solid var(--accent-color); padding-left: 20px; }
.no-js-note { padding: 16px; border: 1px solid var(--border); color: var(--muted); }
@keyframes beacon {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
@media (max-width: 1100px) {
  .hud-clock { display: none; }
  .pipeline-grid { grid-template-columns: repeat(3, 1fr); }
  .inspector { width: 250px; }
}
@media (max-width: 782px) {
  .admin-bar .site-hud { top: 46px; }
  .admin-bar .inspector { top: auto; }
  .site-hud { padding: 12px 4%; }
  .telemetry { gap: 8px; max-width: 55%; }
  .node-label { font-size: .55rem; }
  .hud-fps, .deck-label { display: none; }
  .hud-actions { gap: 8px; }
  .hero { grid-template-columns: 1fr; padding-top: 145px; gap: 10px; min-height: auto; }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: clamp(4rem, 17vw, 7rem); }
  .world-stage { min-height: 300px; border-radius: 8px; }
  .inspector { position: relative; top: auto; right: auto; width: 92%; margin: 0 auto 45px; }
  body.past-hero .inspector { opacity: 1; visibility: visible; pointer-events: auto; }
  .simulator { grid-template-columns: 1fr; }
  .slider-panel { border-right: 0; border-bottom: 1px solid var(--border); padding: 24px; }
  .dossier-grid { grid-template-columns: 1fr; }
  .section-block { padding: 60px 0; }
}
@media (max-width: 480px) {
  .pipeline-grid { grid-template-columns: 1fr 1fr; }
  .pipeline-card { min-height: 150px; padding: 18px 14px; }
  .metric { padding: 23px 16px; }
  .metric-value { font-size: 2rem; }
  .hud-button { padding: 8px; font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
