/* ============================================================================
   BSIDE BLUEPRINT — SHARED STYLES
   Mobile-first. Used across all pages.
   ============================================================================ */

/* ----- VARIABLES ---------------------------------------------------------- */
:root {
  --bg:          #0F0F0F;
  --bg-1:        #1A1A1A;
  --bg-2:        #202020;
  --bg-3:        #262626;
  --blue:        #213F95;
  --blue-2:      #2D52BD;
  --blue-glow:   rgba(33,63,149,0.18);
  --lavender:    #F6E3E5;
  --lime:        #D4ED7A;
  --lime-glow:   rgba(212,237,122,0.15);
  --white:       #F0EEF0;
  --muted:       #7A7A7A;
  --muted-2:     #555;
  --border:      rgba(246,227,229,0.08);
  --border-blue: rgba(33,63,149,0.3);
  --red:         #E05050;
  --font-display:'Bebas Neue', sans-serif;
  --font-head:   'Syne', sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, monospace;
  --font-body:   'DM Sans', sans-serif;
}

/* ----- RESET -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
  position: relative;
}
::selection { background: var(--blue); color: var(--lavender); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

/* ----- GRAIN OVERLAY (atmosphere) ----------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----- LAYOUT ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--wide {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container, .container--wide { padding: 0 32px; }
}

/* ----- NAV ---------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(15,15,15,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--white);
  z-index: 110;
}
.nav-logo span { color: var(--lime); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 110;
}

.nav-cta {
  background: var(--blue);
  color: var(--lavender);
  padding: 9px 18px;
  border-radius: 100px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--blue-2); }

/* Nav — compact on small phones so logo + CTA + burger fit on one line */
@media (max-width: 480px) {
  nav { padding: 12px 14px; }
  .nav-logo { font-size: 0.9rem; }
  .nav-right { gap: 8px; }
  .nav-cta {
    padding: 7px 12px;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }
  .nav-burger { width: 32px; height: 32px; }
}
@media (max-width: 360px) {
  .nav-cta { display: none; }
}

/* Hamburger */
.nav-burger {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 110;
}
.nav-burger span {
  width: 16px;
  height: 1.5px;
  background: var(--lavender);
  transition: all 0.3s;
}
nav.open .nav-burger span:nth-child(1) { transform: translateY(2.75px) rotate(45deg); }
nav.open .nav-burger span:nth-child(2) { transform: translateY(-2.75px) rotate(-45deg); }

/* Full-screen menu */
.nav-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 24px 40px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
nav.open + .nav-menu,
.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 12px;
}
.nav-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-menu li {
  border-bottom: 1px solid var(--border);
}
.nav-menu li:first-child { border-top: 1px solid var(--border); }
.nav-menu a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 4rem);
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color 0.2s, padding-left 0.2s;
}
.nav-menu a:hover { color: var(--lime); padding-left: 12px; }
.nav-menu a .num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.nav-menu-footer {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.nav-menu-footer a { color: var(--lime); }

/* ----- BUTTONS ------------------------------------------------------------ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: var(--lavender);
  padding: 14px 28px;
  border-radius: 2px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--blue-2); transform: translateY(-2px); }
.btn-primary svg { width: 14px; height: 14px; transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--lime); }
.btn-ghost svg { transition: transform 0.2s; }
.btn-ghost:hover svg { transform: translateX(3px); }

/* ----- SECTION LABEL ------------------------------------------------------ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 18px;
}
.section-label::before {
  content: '✦';
  font-size: 0.75rem;
}

.section-headline {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.65;
}
@media (min-width: 768px) {
  .section-sub { font-size: 1.05rem; margin-bottom: 56px; }
}

/* ----- GLITCH TEXT EFFECT ------------------------------------------------- */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.glitch.glitching::before {
  color: var(--lime);
  animation: glitch-shift 0.4s steps(2, end) infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  opacity: 0.85;
}
.glitch.glitching::after {
  color: var(--blue-2);
  animation: glitch-shift 0.4s steps(2, end) reverse infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  opacity: 0.85;
}
@keyframes glitch-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(2px, -1px); }
  60%  { transform: translate(-1px, -1px); }
  80%  { transform: translate(1px, 2px); }
  100% { transform: translate(0, 0); }
}

/* ----- SCRAMBLE TEXT (resolves on scroll-in) ------------------------------ */
.scramble { display: inline-block; }

/* ----- SCROLL REVEAL ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ----- MARQUEE TICKER ----------------------------------------------------- */
.marquee {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
  position: relative;
}
.marquee-track {
  display: inline-flex;
  gap: 36px;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--white);
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 36px; }
.marquee-track .dot { color: var(--lime); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ----- IDENT BAR (between sections) --------------------------------------- */
.ident-bar {
  background: var(--bg);
  text-align: center;
  padding: 18px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.ident-bar span { color: var(--lime); }

/* ----- FOOTER ------------------------------------------------------------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--lime); }
.footer-tag {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 0.88rem;
  color: var(--lavender);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--lime); }

.footer-base {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
@media (min-width: 768px) {
  .footer-base { flex-direction: row; justify-content: space-between; }
}

/* ----- PAGE INTRO (subpage hero) ----------------------------------------- */
.page-intro {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) {
  .page-intro { padding: 180px 0 80px; }
}
.page-intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 16px;
}
.page-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 20px;
}
.page-intro h1 span { color: var(--lime); }
.page-intro p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ----- INLINE CTA BLOCK (used at end of subpages) ------------------------- */
.inline-cta {
  margin: 80px 0;
  padding: 48px 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.inline-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--lime));
}
.inline-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.inline-cta h3 span { color: var(--lime); }
.inline-cta p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- FORM (contact) ----------------------------------------------------- */
.contact-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 540px;
  margin: 0 auto;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 13px 14px;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-2);
  background: var(--bg-3);
}
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7A7A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-group select option { background: var(--bg-2); }
.form-group textarea { resize: vertical; min-height: 96px; }

.form-submit {
  background: var(--blue);
  color: var(--lavender);
  border: none;
  border-radius: 2px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 36px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-top: 8px;
  align-self: flex-end;
}
.form-submit:hover { background: var(--blue-2); transform: translateY(-2px); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-confirm {
  background: var(--lime-glow);
  border: 1px solid var(--lime);
  color: var(--lime);
  padding: 14px 18px;
  border-radius: 2px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 12px;
}

/* ----- CURSOR TRAIL (desktop only) ---------------------------------------- */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--lime);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.2s;
    opacity: 0.8;
    box-shadow: 0 0 12px var(--lime);
    mix-blend-mode: screen;
  }
  body.has-trail { cursor: none; }
  body.has-trail a, body.has-trail button { cursor: none; }
}
@media (max-width: 1023px), (hover: none) {
  .cursor-dot { display: none !important; }
}
