/* =========================
   HIVIO LTD — Global Styles
   ========================= */

/* Theme variables */
:root{
  --bg: #0a0f1c;
  --bg-alt: #0d1323;
  --text: #e8f0ff;
  --muted: rgba(232,240,255,.75);
  --border: rgba(255,255,255,.12);

  --primary-1: #7df0ff;
  --primary-2: #7b61ff;

  --container: 1200px;
}

/* Base reset */
*{ box-sizing: border-box; }
html, body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

/* Utility */
.container{
  width:100%;
  max-width: var(--container);
  margin:0 auto;
  padding: 0 16px;
}

.muted{ color: var(--muted); }
.xs{ font-size: .85rem; }

/* =========================
   Background canvas
   ========================= */
#bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* =========================
   Header / Navigation
   ========================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,15,28,.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner{
  min-height: 64px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand (index header) */
.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  letter-spacing: .2px;
}
.logo-dot{
  width:12px; height:12px; border-radius:50%;
  background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
  box-shadow: 0 0 16px rgba(125,240,255,.35), 0 0 36px rgba(125,240,255,.35);
  display:inline-block;
}

/* Brand-link (login/cabinet header) */
.brand-link{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 14px; border-radius:12px;
  background:#0b0f1a; color:var(--text); border:1px solid var(--border);
  font-weight:800; letter-spacing:.2px;
  transition: background .25s, box-shadow .25s, transform .2s, border-color .25s, color .25s;
}
.brand-link:hover{
  background: linear-gradient(90deg, rgba(125,240,255,.28), rgba(123,97,255,.28));
  border-color: transparent;
  box-shadow: 0 0 18px rgba(125,240,255,.35), 0 0 28px rgba(123,97,255,.35);
  transform: translateY(-1px);
}

.menu{
  display:flex;
  align-items:center;
  gap: 22px;
}
.menu a{
  padding:8px 2px;
  opacity:.9;
  transition: opacity .2s;
}
.menu a:hover{ opacity:1; }

/* Small pill button (used earlier in headers) */
.btn-pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; min-height:40px;
  border-radius: 14px;
  background:#0b0f1a;
  color:#fff; font-weight:700;
  border:1px solid var(--border);
  transition: background .25s, box-shadow .25s, transform .2s, border-color .25s, color .2s;
}
.btn-pill:hover{
  background: linear-gradient(90deg, rgba(125,240,255,.28), rgba(123,97,255,.28));
  border-color:transparent;
  box-shadow:0 0 18px rgba(125,240,255,.35), 0 0 28px rgba(123,97,255,.35);
  transform: translateY(-1px);
}

/* Generic buttons (if needed) */
.btn-primary{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px; border-radius:14px; min-height:44px;
  background:#0b0f1a; color:#fff; font-weight:800;
  border:1px solid var(--border);
  transition: background .25s, box-shadow .25s, transform .2s, border-color .25s;
}
.btn-primary:hover{
  background: linear-gradient(90deg, rgba(125,240,255,.28), rgba(123,97,255,.28));
  border-color:transparent;
  box-shadow:0 0 18px rgba(125,240,255,.35), 0 0 28px rgba(123,97,255,.35);
  transform: translateY(-1px);
}
.btn-ghost{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px; border-radius:14px; min-height:44px;
  background: transparent; color:#fff;
  border:1px dashed var(--border);
  transition: border-color .25s, color .25s, transform .2s;
}
.btn-ghost:hover{
  border-color: rgba(125,240,255,.6);
  transform: translateY(-1px);
}

/* =========================
   Sections / Layout
   ========================= */
.section{
  padding: 56px 0;
}
.section.alt{
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 40%);
}

h1,h2,h3,h4{ margin:0 0 10px 0; }
h2{ font-size: clamp(22px, 4.2vw, 32px); }
h3{ font-size: clamp(18px, 3.2vw, 22px); }
h4{ font-size: clamp(16px, 2.6vw, 18px); }

.headline{
  font-size: clamp(28px, 6.2vw, 48px);
  line-height: 1.1;
  margin:0 0 10px 0;
}
.accent{
  background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero layout */
.hero .glow-ring{
  position:absolute; left:50%; transform: translateX(-50%);
  width:min(980px, 90vw); height: 200px; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(125,240,255,.25), transparent 60%);
  opacity:.35; pointer-events:none;
}
.hero-grid{
  position:relative;
  display:grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 24px;
  align-items:flex-start;
}
.hero-copy .sub{ color: var(--muted); margin: 8px 0 0 0; }

@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

/* Cards / Panels */
.card{
  border:1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 16px;
  position: relative;
  overflow:hidden;
  box-shadow: 0 24px 80px -40px rgba(0,0,0,.6);
}
.card .card-title{ font-weight:800; }

.neon{
  /* subtle inner glow layer */
}
.neon::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(600px 160px at 12% 0%, rgba(125,240,255,.08), transparent 60%),
    radial-gradient(600px 160px at 88% 100%, rgba(123,97,255,.08), transparent 60%);
  opacity:.9;
}

.outline{
  background: rgba(255,255,255,.02);
}

.panel{
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(255,255,255,.03);
  padding:18px;
  box-shadow: 0 24px 80px -40px rgba(0,0,0,.6);
}

/* Small hover elevation */
.hover-up{
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.hover-up:hover{
  transform: translateY(-3px);
  border-color: transparent;
  background: linear-gradient(180deg, rgba(125,240,255,.10), rgba(123,97,255,.10));
  box-shadow:0 0 26px rgba(125,240,255,.25), 0 0 40px rgba(123,97,255,.25);
}

/* Pulse bar accent used in WHY section */
.pulse-bar{
  margin-top: 10px;
  height: 4px; width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
  box-shadow: 0 0 12px rgba(125,240,255,.45);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ opacity:.55; }
  50%{ opacity:1; }
}

/* Steps (How it works) */
.steps{
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.step{ min-height: 120px; }
.step .tag{
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:8px;
  font-weight:800; font-size:.9rem;
  color:#0a0f1c; background: linear-gradient(90deg, var(--primary-1), var(--primary-2));
  box-shadow: 0 0 12px rgba(125,240,255,.45);
  margin-bottom: 6px;
}

@media (max-width: 980px){
  .steps{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .steps{ grid-template-columns: 1fr; }
}

/* Cards grids */
.grid-3{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.grid-2{
  display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.cards-4{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .cards-4{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .cards-4{ grid-template-columns: 1fr; }
}

/* Contact / Note */
.contact{ display:grid; gap: 12px; }
.note{
  border:1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
}

/* Footer */
.footer{
  padding: 18px 0;
  border-top: 1px solid var(--border);
  background: rgba(10,15,28,.6);
  backdrop-filter: blur(6px);
}
.footer .container{
  display:flex; align-items:center; justify-content: space-between;
}
.footer .btn-pill{ font-weight:700; }

/* =========================
   Reveal on scroll (paired with main.js)
   ========================= */
.reveal{ opacity: 0; transform: translateY(12px); }
.reveal[data-reveal]{ transition: opacity .6s ease, transform .6s ease; }
.reveal.show{ opacity:1; transform: none; }

/* =========================
   Links inside cards/panels
   ========================= */
.link{
  display:inline-flex; align-items:center; gap:6px;
  color: var(--text);
  opacity:.95;
  border-bottom: 1px dashed rgba(125,240,255,.35);
  transition: opacity .2s, border-color .2s;
}
.link:hover{
  opacity:1;
  border-bottom-color: transparent;
}
.links-inline{ display:flex; gap:12px; flex-wrap:wrap; }

/* =========================
   Hero viz (chart card)
   ========================= */
.hero-viz{
  min-height: 220px;
}
.hero-viz canvas{
  width:100%;
}

/* =========================
   Simple helpers
   ========================= */
.grid-justify-center{ justify-content:center; }
.align-center{ align-items:center; }
.center{ text-align:center; }

/* =========================
   Company panel (index “Company information”)
   (The index page also adds small overrides in <style> for hover)
   ========================= */
.panel.company .rows{ display:grid; gap:6px; }
.panel.company .name{ font-weight:800; letter-spacing:.2px; }

/* =========================
   Account menu (shared look; pages add their own overrides)
   ========================= */
.usermenu{ position:relative; }
.usermenu-toggle{ cursor:pointer; }

/* Ensure focus rings are visible for accessibility */
:focus-visible{
  outline: 2px solid rgba(125,240,255,.6);
  outline-offset: 2px;
}
