/* ───────────────────────────────
   SCORPEX Site Styles (Unified)
   ─────────────────────────────── */

/* ============ 1) Theme Tokens ============ */
:root {
  --bg: #0b0f12;
  --panel: #11161c;
  --muted: #8a98a8;
  --text: #e9eef5;
  --accent: #3ba0ff;
  --accent-2: #2b7bd9;
  --card: #0f141a;
  --border: #1a2230;
}
:root {
  color-scheme: dark;
}

/* ============ 2) Base / Reset ============ */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu,
    Cantarell, Noto Sans, sans-serif;
  background: var(--bg);
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  z-index: 0;
}

/* subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 64 64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 320px 320px;
  mix-blend-mode: normal;
  z-index: 0;
}

/* corner glow overlay */
body::after {
  content: "";
  position: fixed;
  inset: -25% -20% -25% -20%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
        900px 700px at 115% -10%,
        rgba(59, 160, 255, 0.22) 0%,
        rgba(59, 160, 255, 0.05) 45%,
        transparent 80%
      )
      no-repeat,
    radial-gradient(
        900px 700px at -15% 120%,
        rgba(59, 160, 255, 0.18) 0%,
        rgba(59, 160, 255, 0.05) 45%,
        transparent 80%
      )
      no-repeat;
  filter: blur(42px);
  opacity: 0.85;
}

/* links & layout */
a {
  color: #bcd3f0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hr-divider {
  border: none;
  height: 2px;
  width: 100%;
  margin: 32px 0;
  background: var(--accent); /* uses your existing Scorpex blue */
  border-radius: 2px;
}

/* ============ 3) Navigation ============ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  position: relative; /* anchor for absolute dropdown */
  z-index: 1000; /* keeps header above hero */
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  /* desktop */
  display: flex;
  gap: 20px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  margin-left: 16px;
}
.nav a.active,
.nav a:hover {
  color: var(--text);
}

/* Mobile toggle: stack bars vertically, centered */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d1319;
  appearance: none;
  -webkit-appearance: none;
  color: transparent;
  font-size: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #cfe0f7;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 0;
}

/* Animate bars */
.nav-toggle__bar {
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* When menu is open (we’ll set aria-expanded=true in JS) */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Dropdown panel: slide & fade */
@media (max-width: 720px) {
  .nav-links {
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bar {
    transition: none !important;
  }
  .nav-links {
    transition: none !important;
  }
}

/* ============ 5) Typography ============ */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  font-weight: 700;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}
h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  margin-bottom: 20px;
}
p.lead {
  color: var(--muted);
  font-size: clamp(16px, 2.5vw, 19px);
  max-width: 60ch;
  margin: 0 0 28px;
}

/* ============ 6) Buttons ============ */
.btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  background: linear-gradient(180deg, #121a24, #0e151d);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.25s ease, filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 160, 255, 0.25);
}

/* hover/lift */
.btn.primary:hover,
.btn.primary:focus-visible {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 24px rgba(59, 160, 255, 0.45), 0 8px 24px rgba(0, 0, 0, 0.55);
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.btn.primary:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 3px 12px rgba(0, 0, 0, 0.4);
  filter: brightness(0.97);
}

.btn:hover:not(.primary),
.btn:focus-visible:not(.primary) {
  border-color: rgba(59, 160, 255, 0.35);
  box-shadow: 0 0 14px rgba(59, 160, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

/* tactile press */
.btn:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: none;
  filter: brightness(0.98);
}

/* ============ 7) Cards ============ */
.card,
.preview {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #0f151c, #0b1016);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
  padding: 16px;
  margin-top: 16px;
}
.card h3 {
  margin: 0 0 8px;
}

/* Cards grid: responsive columns */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.preview {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}
.preview img {
  max-width: 240px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

/* clickable card links */
.card-link {
  display: block; /* link wraps whole card */
  text-decoration: none; /* no underline */
  color: inherit; /* keep text colors */
  cursor: pointer;
}

/* glow + lift on hover */
.card-link .card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease;
}

.card-link:hover .card,
.card-link:focus-visible .card {
  border-color: rgba(59, 160, 255, 0.35);
  box-shadow: 0 0 12px rgba(59, 160, 255, 0.2), 0 4px 14px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

/* faint highlight edge (no shimmer) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(59, 160, 255, 0.08),
    rgba(59, 160, 255, 0.02)
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card-link:hover .card::before,
.card-link:focus-visible .card::before {
  opacity: 0.75;
}

/* Phase cards improvements */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.info-card {
  background: linear-gradient(180deg, #10151b, #0c1116);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
  padding: 20px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

/* Title hierarchy */
.info-label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

/* ============ 8) Forms ============ */
.form .input,
.form .textarea,
input.input,
textarea.textarea {
  width: 100%;
  color: var(--text);
  background: #0d1319;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form .input:focus-visible,
.form .textarea:focus-visible,
input.input:focus-visible,
textarea.textarea:focus-visible {
  border-color: #2a5ea5;
  box-shadow: 0 0 0 3px rgba(59, 160, 255, 0.18);
}
.form .input:focus,
.form .textarea:focus,
input.input:focus,
textarea.textarea:focus {
  box-shadow: none;
}

.form--contact {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 14px;
  max-width: 720px;
}
.form--contact label {
  align-self: start;
  padding-top: 10px;
  font-weight: 600;
  color: #d7e2ee;
}
.input {
  height: 44px;
  line-height: 44px;
}
.textarea {
  height: 160px;
  resize: none;
}
.form--contact .actions {
  grid-column: 2;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============ 9) Page Title Divider ============ */
.page-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 32px;
}
.page-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: clamp(200px, 38vw, 600px);
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    rgba(59, 160, 255, 1) 0%,
    rgba(59, 160, 255, 0.5) 30%,
    rgba(59, 160, 255, 0.15) 55%,
    rgba(59, 160, 255, 0.03) 70%,
    rgba(59, 160, 255, 0) 80%
  );
  opacity: 0.95;
}

/* ============ 10) Footer ============ */
.footer {
  color: #90a2b6;
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 24px 0;
  font-size: 14px;
}

/* ============ 11) Responsive (nav) ============ */
@media (max-width: 720px) {
  .brand {
    margin-right: auto;
  }
  .nav {
    position: relative;
    z-index: 1000;
  }

  /* show hamburger on mobile */
  .nav-toggle {
    display: inline-flex;
  }

  /* dropdown panel (hidden by default but animatable) */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 24px;
    right: 24px;
    z-index: 1100;
    flex-direction: column;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);

    background: linear-gradient(180deg, #0f151c, #0b1016);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);

    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links a {
    margin-left: 0;
    padding: 10px 12px;
    border-radius: 10px;
  }

  /* open state */
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* hamburger → X */
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ============ 12) Accessibility ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
