/* =========================
   CodeVeil – styles.css (CLEAN)
   ========================= */

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #e6e6e6;
  background: #0e0f12;
  position: relative;
}


/* =========================
   Self-hosted Outfit font
   ========================= */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/*
  Sticky-killer fix:
  Do NOT clamp overflow on html/body (breaks position: sticky in some browsers).
  Clamp horizontal overflow on the .page wrapper instead.
*/

.page {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .page { overflow-x: hidden; }
}

/* Noise overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  background-image: url("assets/noise.webp");
  background-repeat: repeat;

  opacity: 0.7;
  mix-blend-mode: soft-light;
}

/* Keep content above noise overlay */
header,
main,
footer,
.mobile-nav,
.mobile-drawer,
.mobile-drawer-overlay,
.nav-sticky {
  position: relative;
  z-index: 2;
}

/* Drawer scroll lock */
html.drawer-open,
body.drawer-open {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

/* =========================
   Visibility helpers (LOCKED)
   Breakpoint: 900px
   NOTE: uses !important to prevent component rules overriding visibility
   ========================= */

.desktop-only { display: none !important; }
.mobile-only  { display: block !important; }

@media (min-width: 900px) {
  .desktop-only { display: block !important; }
  .mobile-only  { display: none !important; }
}

/* =========================
   Desktop header (LogoLong)
   ========================= */

.brand-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 28px 0;
}

.brand-header-link {
  display: inline-flex;
  align-items: center;
}

.brand-header-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* =========================
   Mobile hero logo (LogoStacked)
   ========================= */

.hero-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 26px;
}

.hero-logo-img {
  display: block;
  margin: 0 auto;
}


/* =========================
   Mobile bottom bar + premium drawer
   ========================= */

/* Hidden by default (desktop/tablet) */
.mobile-nav {
  display: none;
}

/* Overlay */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 220ms ease;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
}

/* Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(86vw, 320px);
  z-index: 1300;

  background: rgba(14, 15, 18, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;

  transform: translateX(-102%);
  transition: transform 260ms ease;

  padding-top: env(safe-area-inset-top, 0px);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-drawer-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.mobile-drawer-brand-logo {
  height: 32px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.mobile-drawer-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-drawer-close:focus {
  outline: 2px solid #c7b7ff;
  outline-offset: 2px;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 18px;
}

.mobile-drawer-link,
.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 14px;
  margin: 4px 6px;

  border-radius: 14px;
  text-decoration: none;

  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.00);
  transition: background 160ms ease, color 160ms ease;
}

.mobile-drawer-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mobile-drawer-link:focus {
  outline: 2px solid #c7b7ff;
  outline-offset: 2px;
}

.mobile-drawer-group {
  display: block;
}

.mobile-drawer-toggle {
  font-family: inherit;        /* Outfit */
  font-size: inherit;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.mobile-drawer-chevron {
  transition: transform 160ms ease;
  opacity: 0.85;
}

.mobile-drawer-toggle[aria-expanded="true"] .mobile-drawer-chevron {
  transform: rotate(180deg);
}

.mobile-drawer-subnav {
  padding-left: 20px;
}

.mobile-drawer-sublink {
  padding-left: 22px; /* indent the actual item a bit more */
  opacity: 0.9;
}

/* =========================
   Desktop sticky navbar (FULL-WIDTH TOP BAR)
   ========================= */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  padding: 0;
  margin-top: 0;
}

/* This becomes the full-width header region (Bitwarden-style) */
.nav-wrapper {
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(14, 15, 18, 0.78);

  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;

  width: 100%;
  height: 76px;

  padding: 0 28px;

  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid var(--nav-border);

  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.nav-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex: 0 0 auto;
  padding-right: 0;
  padding-left: 0; /* was 3rem; breaks alignment */
}

.nav-brand-logo {
  height: 60px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
  padding-left: 0;
}

/* The nav itself is now “transparent” because the wrapper is the bar */
#nav_main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center; /* center the nav content as a whole */
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: 100%;
  position: relative;
}

/* Keep your existing left + spacer + right HTML */
#nav_main .nav-group {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 3rem; /* tighter grouping */
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100%;
  position: static;     /* IMPORTANT: undo absolute to prevent overlap */
  left: auto;
  transform: none;
  padding-right: 3rem;
}

#nav_main li {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Small, intentional separation between the two lists */
.nav-spacer {
  flex: 0 0 22px;
  height: 1px;
}

/* Link styling more “header-ish” */
#nav_main a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 44px;
  padding: 0 30px;
  line-height: 1;
  font-size: 1.1rem;

  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-radius: 12px;
  white-space: nowrap;

  transition: background 160ms ease, color 160ms ease;
  transform: translateY(6px); /* your golden optical center */
}

#nav_main a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Legacy center-logo badge styles kept intentionally unused (HTML removed it). */


/* =========================
   Main layout + typography
   ========================= */

main {
  max-width: 72ch;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

section {
  margin-bottom: 20rem;
  scroll-margin-top: 140px;
}

article {
  margin-top: 3rem;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #bfbfbf;
}

h2 {
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin: 0.75rem 0;
  color: #c4c4c4;
  font-size: 1.1rem;
}

strong {
  font-weight: 600;
  color: #ffffff;
}

/* Lists */
ul {
  padding-left: 1.25rem;
  margin: 1rem 0;
}

li {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: #c7b7ff;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Hero */
#hero h2 {
  font-size: 7rem;
}

#hero_secondary {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

#hero_p {
  font-size: 1.3rem;
}

section#hero {
  margin-bottom: clamp(9rem, 18vh, 15rem);
}

/* Figures */
figure {
  margin: 2.5rem 0;
}

figure img {
  max-width: 100%;
  display: block;
  border-radius: 6px;
}

figcaption {
  font-size: 0.85rem;
  color: #a8a8a8;
  margin-top: 0.5rem;
}

/* Products */
#products {
  text-align: center;
}

#products article {
  position: relative;
  padding-top: 2.5rem;
  border-top: 0; /* kill the harsh hairline */
}

#products article::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  height: 2px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  filter: blur(2px);
  opacity: 0.7;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background: #0e0f14;
  padding: 4rem 1.5rem 2rem;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-columns {
  max-width: 72ch;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  justify-items: center;
}

.footer-col {
  width: 100%;
  text-align: center;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #7b5cff;
}

.footer-legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* Accessibility */
:focus {
  outline: 2px solid #c7b7ff;
  outline-offset: 2px;
}

/* =========================
   Wide breakout + alternating rails
   ========================= */

section.layout.wide {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

section.layout {
  display: flex;
}

section.layout .content {
  max-width: 72ch;
}

section.layout.wide.left {
  justify-content: flex-start;
  padding-left: clamp(1.25rem, 8vw, 12rem);
  padding-right: 1.25rem;
}

section.layout.wide.right {
  justify-content: flex-end;
  padding-right: clamp(1.25rem, 8vw, 12rem);
  padding-left: 1.25rem;
}

section.layout.wide.center {
  justify-content: center;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

section.layout.wide.center ul {
  list-style: none;
}

section.layout.wide.center .content {
  max-width: 60ch;
  text-align: center;
}

/* Duel */
section.layout.wide.duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: start;

  padding-left: clamp(1.25rem, 8vw, 12rem);
  padding-right: clamp(1.25rem, 8vw, 12rem);
}

section.layout.wide.duel .duel-col {
  max-width: 68ch;
}

section.layout.wide.duel .duel-col:first-child {
  justify-self: start;
  text-align: left;
}

section.layout.wide.duel .duel-col:last-child {
  justify-self: end;
  text-align: left;
}

section.layout.wide.duel h2 {
  margin-top: 0;
}

/* Image row */
figure.image-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

figure.image-row img {
  max-width: 100%;
}

figure.image-row figcaption {
  flex-basis: 100%;
}


*:focus,
*:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Explicitly keep hover behavior intact */
a:hover,
button:hover {
  outline: none;
}


/* =========================
   VeilVault – Demo Video
   ========================= */

.demo-video-section .content {
  /* Keep your existing center layout, but allow a wider media block inside */
  max-width: 72ch;
}

.demo-video-frame {
  width: 100%;
  margin: 2rem auto 1rem;

  border-radius: 16px;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.06);

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.60),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.demo-video {
  width: 100%;
  height: auto;
  display: block;
}

/* Slightly softer on small screens */
@media (max-width: 600px) {
  .demo-video-frame {
    border-radius: 14px;
  }
}
/* The global system sets `section.layout { display:flex; }`
   This section should stack vertically. */
.demo-video-section {
  display: block;
}

.demo-video-inner {
  width: min(1400px, 92vw);
  margin: 0 auto;
  text-align: center;
}

.demo-video-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
}

/* =========================
   Responsive tweaks
   ========================= */

@media (max-width: 899px) {
  /* Mobile bottom bar */
  .mobile-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1400;

    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
  }

  .mobile-nav-bar {
    pointer-events: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 0;
    height: 64px;
    padding: 0 18px;

    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(14, 15, 18, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
      0 8px 28px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.03);
  }

  .mobile-nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
  }

  .mobile-nav-brand-logo {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
  }

  .mobile-nav-toggle {
    height: 44px;
    width: 44px;
    padding: 0;
    border-radius: 12px;

    appearance: none;
    border: 0;
    background: transparent;
    color: #e6e6e6;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-nav-toggle:focus {
    outline: 2px solid #c7b7ff;
    outline-offset: 2px;
  }

  .mobile-nav-icon {
    width: 22px;
    height: 2px;
    display: block;
    background: rgba(255, 255, 255, 0.78);
    position: relative;
    border-radius: 2px;
  }

  .mobile-nav-icon::before,
  .mobile-nav-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 2px;
  }

  .mobile-nav-icon::before { top: -7px; }
  .mobile-nav-icon::after  { top: 7px; }

  /* Desktop nav hidden on mobile */
  .nav-sticky { display: none; }

  /* Mobile hero logo sizing */
  .hero-logo {
    display: flex;
    margin: 14px 0 22px;
  }

  .hero-logo-img {
    height: auto;
    width: min(260px, 72vw);
  }

  /* Give content room so the bar doesn't cover text */
  body { padding-bottom: 92px; }

  /* Mobile: remove 100vw breakout drift */
  section.layout.wide {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  section.layout.wide.left,
  section.layout.wide.right {
    justify-content: center;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  section.layout .content {
    max-width: 72ch;
  }

  /* Duel stacks */
  section.layout.wide.duel {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  section.layout.wide.duel .duel-col:last-child {
    justify-self: start;
  }

  /* Mobile hero scale */
  #hero h2 {
    font-size: 2.4rem;
  }
}

@media (max-width: 600px) {
  main {
    padding: 2.5rem 1rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  #hero_secondary {
    font-size: 1.25rem;
  }

  #hero_p {
    font-size: 1.1rem;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-col h4 {
    margin-bottom: 0.75rem;
  }
}
