/* ─────────────────────────────────────────────────────────────────────────────
   SBTC Theme — loaded after consolidated.css to override design tokens
   New direction: void-dark base, neon green accent, serif/mono typography
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Design Token Overrides ── */
:root {
  /* Surfaces */
  --bg-primary:    #030809;
  --bg-secondary:  #07100e;
  --bg-tertiary:   #0d1c15;
  --bg-elevated:   #132118;
  --bg-hover:      rgba(44,244,106,0.05);

  /* Accent — neon green */
  --accent-primary:         #2cf46a;
  --accent-primary-hover:   #56f885;
  --accent-primary-light:   rgba(44,244,106,0.10);
  --accent-primary-medium:  rgba(44,244,106,0.18);
  --accent-primary-dark:    rgba(44,244,106,0.30);
  --accent-secondary:       rgba(44,244,106,0.12);
  --accent-secondary-light: rgba(44,244,106,0.07);

  /* Text */
  --text-primary:   #d4e8dc;
  --text-secondary: rgba(212,232,220,0.72);
  --text-tertiary:  rgba(212,232,220,0.55);
  --text-muted:     rgba(212,232,220,0.38);

  /* Borders */
  --border-subtle: rgba(44,244,106,0.08);
  --border-light:  rgba(44,244,106,0.12);
  --border-medium: rgba(44,244,106,0.22);
  --border-accent: rgba(44,244,106,0.38);

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.6);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.7);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.8);
  --shadow-accent: 0 0 40px rgba(44,244,106,0.18), 0 0 80px rgba(44,244,106,0.07);

  /* Fonts */
  --font-heading: 'Playfair Display', serif;
  --font-body:    'Jost', sans-serif;

  /* Theme-specific shorthand vars */
  --void:        #030809;
  --surface:     #07100e;
  --text:        #d4e8dc;
  --text-mid:    rgba(212,232,220,0.72);
  --text-low:    rgba(212,232,220,0.45);
  --green:       #2cf46a;
  --green-glow:  rgba(44,244,106,0.18);
  --green-trace: rgba(44,244,106,0.07);
  --line:        rgba(44,244,106,0.12);
  --line-up:     rgba(44,244,106,0.24);
  --mono:        'DM Mono', monospace;
  --serif:       'Playfair Display', serif;
  --body:        'Jost', sans-serif;
}

/* ── Base ── */
html { font-size: 17px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  overflow-x: hidden;
}

::selection {
  background: rgba(44,244,106,0.28);
  color: #f4fff7;
}

::-moz-selection {
  background: rgba(44,244,106,0.28);
  color: #f4fff7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Atmospheric Layer ── */
.atm {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
}

.atm-floor {
  position: absolute;
  bottom: -20%; left: 50%; margin-left: -35vw;
  width: 70vw; height: 60vw;
  background: radial-gradient(ellipse at 45% 75%,
    rgba(10,55,28,0.38) 0%, rgba(6,35,18,0.14) 38%, transparent 65%);
  animation: atm-breathe 10s ease-in-out infinite alternate;
}

.atm-cap {
  position: absolute; top: -10%; right: -8%;
  width: 38vw; height: 38vw;
  background: radial-gradient(ellipse at center,
    rgba(6,30,16,0.15) 0%, transparent 65%);
  animation: atm-breathe 14s ease-in-out infinite alternate-reverse;
}

.atm-grid {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40vh;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 99px,
      rgba(44,244,106,0.032) 99px, rgba(44,244,106,0.032) 100px),
    repeating-linear-gradient(0deg,  transparent, transparent 99px,
      rgba(44,244,106,0.032) 99px, rgba(44,244,106,0.032) 100px);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.atm-grain {
  position: fixed; inset: -60%; width: 220%; height: 220%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.022'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 999;
  animation: atm-grain-anim 0.2s steps(1) infinite;
}

.scanline {
  position: fixed; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(44,244,106,0.07) 50%, transparent);
  animation: atm-scan 16s linear infinite;
  pointer-events: none; z-index: 998;
}

@keyframes atm-breathe {
  from { opacity: 0.65; transform: scale(0.97); }
  to   { opacity: 1;    transform: scale(1.04); }
}

@keyframes atm-grain-anim {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-4%,-3%); }
  50%  { transform: translate(3%,4%); }
  75%  { transform: translate(-2%,2%); }
  100% { transform: translate(4%,-4%); }
}

@keyframes atm-scan {
  0%   { top: 0;     opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

@keyframes theme-slideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header / Nav ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(3,8,9,0.93);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--line);
  animation: theme-slideDown 0.9s cubic-bezier(0.16,1,0.3,1) both;
}

header .container {
  max-width: none;
  padding: 0;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 3.5rem;
}

/* Logo */
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  background: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.25s;
  user-select: none;
  -webkit-user-select: none;
}

/* Kill the underline slide from consolidated.css */
.nav-links a::after { display: none !important; }

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--text);
  background: none;
}

/* CTA — now a direct sibling of nav-links, not inside it */
.nav-cta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--void);
  background: linear-gradient(180deg, #22964b 0%, #176c36 100%);
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  font-weight: 500;
  border-radius: 0;
  transition: box-shadow 0.3s, transform 0.2s, background 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.nav-cta:hover {
  color: var(--void);
  background: linear-gradient(180deg, #2aa654 0%, #1b7b3d 100%);
  box-shadow: 0 0 24px rgba(44,244,106,0.16);
  transform: translateY(-1px);
}

/* Mobile toggle */
.mobile-menu-toggle span { background: var(--text); }

/* Offset body content for fixed nav */
main { padding-top: 84px; }

/* ── Scroll progress bar ── */
.scroll-progress { background: var(--green); }

/* ── Footer ── */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--line);
}

.footer-logo-text {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.footer-logo-text .logo-dot {
  font-size: 0.62rem;
  margin-left: 0.4rem;
}

.footer-description {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.75;
}

.footer-contact .contact-item { color: var(--text-low); }
.footer-contact svg { color: var(--green); opacity: 0.7; }

.footer-heading {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.75;
  margin-bottom: 1.1rem;
}

.footer-links a {
  color: var(--text-low);
  font-size: 0.9rem;
  transition: color 0.25s;
}

.footer-links a:hover { color: var(--text); }

.footer-cta-btn {
  background: var(--green);
  color: var(--void);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-weight: 500;
  transition: box-shadow 0.3s;
}

.footer-cta-btn:hover {
  background: var(--green);
  color: var(--void);
  box-shadow: 0 0 28px var(--green-glow);
}

.footer-cta-note {
  color: var(--text-low);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.footer-bottom { border-top: 1px solid var(--line); }

.footer-bottom-left p {
  color: var(--text-low);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.social-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
}

.footer-social a { color: var(--text-low); transition: color 0.25s; }
.footer-social a:hover { color: var(--green); }

/* ── Back to top ── */
#back-to-top {
  background: var(--bg-secondary);
  color: var(--text-mid);
  border: 1px solid var(--line);
  font-family: var(--mono);
  transition: color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

#back-to-top:hover {
  color: var(--green);
  border-color: var(--line-up);
  box-shadow: 0 0 16px var(--green-trace);
}

/* ── General component alignment ── */
.btn, .button, [class*="btn-"] {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0;
}

/* ── Mobile nav ── */
@media (max-width: 960px) {
  header nav { padding: 1rem 1rem; }
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
}

@media (max-width: 960px) {
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
  }
}

/* Shared Motion */
.motion-lift {
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.24s ease;
  will-change: transform;
}

.motion-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.32);
}

@media (prefers-reduced-motion: no-preference) {
  html.js-motion [data-reveal] {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, 24px, 0);
    transition:
      opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.58s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
  }

  html.js-motion [data-reveal="scale"] {
    transform: scale(0.975) translate3d(0, 18px, 0);
  }

  html.js-motion [data-reveal="left"] {
    transform: translate3d(-26px, 18px, 0);
  }

  html.js-motion [data-reveal="right"] {
    transform: translate3d(26px, 18px, 0);
  }

  html.js-motion [data-reveal].is-visible {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-lift {
    transition: none;
  }

  .motion-lift:hover {
    transform: none;
    box-shadow: none;
  }
}
