@font-face {
  font-family: "BarlowCustom";
  src: url("../fonts/Barlow-ExtraBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

/* Colors are defined in theme.css — do not duplicate here */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--body-gradient);
  color: var(--color-text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

img {
  display: block;
  max-width: 100%;
}

a,
button,
.fade,
.tab-image,
.hero-rotator-text,
.mobile-drawer,
.mobile-toggle span {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.banner-grid {
  position: relative;
  overflow: hidden;
}

.banner-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.glitch-wrap {
  position: relative;
  display: inline-flex;
}

.glitch-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

.glitch-layer-one {
  color: var(--color-glitch-1);
  animation: glitch-1 2.2s infinite linear alternate-reverse;
}

.glitch-layer-two {
  color: var(--color-glitch-2);
  animation: glitch-2 2.8s infinite linear alternate-reverse;
}

.glitch-base {
  position: relative;
  z-index: 1;
}

.banner-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.banner-marquee-track,
.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.banner-marquee-group,
.logo-marquee-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
}

.nav-link,
.footer-link {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-primary);
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}

.nav-divider {
  height: 1.25rem;
  width: 1px;
  background: var(--color-primary-30);
}

.theme-logo-dark {
  display: none;
}

[data-theme="dark"] .theme-logo-light {
  display: none;
}

[data-theme="dark"] .theme-logo-dark {
  display: block;
}

.nav-link:hover,
.footer-link:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  border-radius: 0;
}

.btn:hover {
  opacity: 0.84;
  transform: scale(1.02);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn-ghost {
  background: var(--color-primary-10);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-dark-gradient {
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary-dark));
  color: var(--color-text-inverse);
  box-shadow: 0 20px 38px rgba(8, 42, 58, 0.18);
}

.mobile-toggle {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.32rem;
  padding: 0.35rem;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  height: 100vh;
  width: 280px;
  transform: translateX(100%);
  background: var(--color-bg-drawer);
  padding: 1.5rem;
  backdrop-filter: blur(24px);
  box-shadow: -12px 0 42px var(--color-shadow-heavy);
  transition: transform 0.35s ease;
}

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

.mobile-link {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-primary);
}

.mobile-link span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: rgba(8, 42, 58, 0.3);
}

.hero-shell {
  height: 100vh;
  min-height: 600px;
}

.hero-grid,
.notification-stage {
  background-image:
    radial-gradient(var(--color-dot-pattern) 1px, transparent 0),
    linear-gradient(180deg, rgba(13, 107, 156, 0.06), transparent 28%);
  background-size: 28px 28px, auto;
}

.section-tint {
  background: var(--color-bg-tint);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.security-visual {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Screenshot mockups: invert in dark mode so light wireframes become dark-themed */
[data-theme="dark"] .tab-image,
[data-theme="dark"] .security-visual,
[data-theme="dark"] .mockup-img {
  filter: invert(0.88) hue-rotate(180deg);
  opacity: 0.9;
}

/* Ensure tab-shell glass effect adapts to dark */
[data-theme="dark"] .tab-shell {
  background: rgba(17, 29, 36, 0.7);
  border-color: rgba(125, 211, 232, 0.12);
}

[data-theme="dark"] .tab-indicator {
  background: linear-gradient(to bottom, rgba(17, 29, 36, 0.8), rgba(17, 29, 36, 0.3));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 232, 0.15), 0 14px 20px rgba(0, 0, 0, 0.2);
}

/* Feature pills in dark mode */
[data-theme="dark"] .feature-pill,
[data-theme="dark"] .example-pill {
  background: var(--color-bg-card);
  border-color: var(--color-border);
}

[data-theme="dark"] .feature-pill:hover,
[data-theme="dark"] .example-pill:hover {
  border-color: rgba(92, 184, 219, 0.4);
  background: rgba(92, 184, 219, 0.08);
}

/* Glass button in dark mode */
[data-theme="dark"] .glass-button {
  background:
    linear-gradient(var(--color-bg-elevated), var(--color-bg-elevated)) padding-box,
    linear-gradient(90deg, rgba(92, 184, 219, 0.4), rgba(160, 216, 235, 0.6)) border-box;
}

/* Notification card */
[data-theme="dark"] .notification-card {
  border-color: var(--color-border);
}

/* Pricing card shimmer dark mode */
[data-theme="dark"] .pricing-card::before {
  background: linear-gradient(110deg, transparent 30%, rgba(125, 211, 232, 0.08) 50%, transparent 70%);
  background-size: 200% 100%;
}

.hero-grid {
  mask-image: linear-gradient(180deg, black 50%, transparent 100%);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--color-text-muted);
}

.section-kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--color-primary-30);
}

.hero-rotator-shell {
  position: relative;
  margin: 0 auto;
  width: fit-content;
  max-width: min(92vw, 900px);
  overflow: hidden;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-rotator-text,
.hero-rotator-measure {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(1.0625rem, 2.6vw, 2.5rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--color-text-secondary);
}

.hero-rotator-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  left: -9999px;
  top: 0;
}

.hero-rotator-text.is-entering {
  animation: heroIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-rotator-text.is-exiting {
  animation: heroOut 0.5s ease forwards;
}

.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.logo-chip-img {
  height: 2rem;
  width: auto;
  opacity: 0.72;
  filter: grayscale(1);
  mix-blend-mode: darken;
}

.logo-cell {
  display: flex;
  min-height: 124px;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-elevated);
  padding: 1.5rem;
}

.logo-wall-img {
  max-height: 40px;
  opacity: var(--logo-opacity);
  filter: var(--logo-filter);
  mix-blend-mode: var(--logo-blend);
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.logo-cell:hover .logo-wall-img {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-2px);
}

.feature-pill,
.example-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  background: var(--color-bg-elevated);
  box-shadow: 0 8px 18px var(--color-shadow);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.feature-pill:hover,
.example-pill:hover {
  border-color: rgba(165, 243, 252, 1);
  background: rgba(236, 254, 255, 0.5);
  box-shadow: 0 14px 28px rgba(34, 211, 238, 0.08);
}

.testimonial-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 340px;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.inline-testimonial-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  width: 340px;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-bg-card);
  padding: 1.25rem;
  transition: background 0.25s ease, transform 0.25s ease;
}

.inline-testimonial-card:hover {
  background: var(--color-bg-hover);
  transform: translateY(-2px);
}

.quote-text {
  grid-column: 1 / -1;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.tab-shell {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.55rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.tab-indicator {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  height: calc(100% - 1.1rem);
  width: calc(20% - 0.4rem);
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 14px 20px rgba(15,23,42,0.08);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.45s ease;
}

.tab-button {
  position: relative;
  z-index: 1;
  padding: 0.9rem 0.5rem;
  border: 0;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.tab-button.is-active {
  color: var(--color-primary);
}

.tab-visual {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-elevated);
  box-shadow: 0 20px 58px var(--color-shadow);
}

.tab-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.tab-image.is-active {
  opacity: 1;
}

.security-item h3,
.masonry-card h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
}

.security-item p,
.step-item,
.masonry-card p {
  margin-top: 0.75rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--color-primary-20);
  background: var(--color-primary-10);
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-primary);
}

.hq-gradient-text {
  background: linear-gradient(90deg, var(--color-accent-1), var(--color-accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 1rem;
}

.step-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-primary-20);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--color-primary);
}

.glass-button {
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(90deg, rgba(13,107,156,0.35), rgba(43,77,120,0.8)) border-box;
  box-shadow: 0 18px 40px rgba(13, 52, 66, 0.10);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.glass-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(13, 52, 66, 0.14);
  opacity: 0.9;
}

.notification-stage {
  padding: 1rem;
  border-radius: 32px;
}

.notification-card {
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--color-bg-card) 80%, transparent);
  padding: 1.25rem;
  box-shadow: 0 16px 36px var(--color-shadow-heavy);
  backdrop-filter: blur(8px);
}

.alert-item {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeScale 0.65s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.18s; }
.delay-3 { animation-delay: 0.28s; }
.delay-4 { animation-delay: 0.38s; }
.delay-5 { animation-delay: 0.48s; }

.testimonial-grid {
  display: grid;
  gap: 1rem;
}

.masonry-card {
  border: 1px solid var(--color-border-subtle);
  border-radius: 1.75rem;
  background: var(--color-bg-card);
  padding: 1.5rem;
  box-shadow: 0 10px 28px var(--color-shadow);
}

.masonry-card .meta {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.case-link {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-primary);
}

.pricing-card {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-border-strong);
  background: var(--color-bg-card);
  padding: 1.5rem;
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
  border-radius: 0;
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.85) 50%, transparent 70%);
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
}

.pricing-card:hover {
  box-shadow: 0 24px 48px var(--color-shadow-heavy);
  transform: translateY(-4px) scale(1.015);
  border-color: var(--color-primary);
}

.pricing-card:hover::before {
  opacity: 1;
  animation: shimmerMove 1.2s ease;
}

.pricing-tier {
  font-size: 1.9rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--color-primary);
}

.pricing-price {
  margin-top: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.pricing-list {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.pricing-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.pricing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--color-text-secondary);
}

.fade {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes glitch-1 {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(1px, 1px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, 0); }
  50% { transform: translate(-1px, -1px); }
  75% { transform: translate(1px, 1px); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmerMove {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%) scale(0.95);
    filter: blur(2px);
  }
}

@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .masonry-card:nth-child(2),
  .masonry-card:nth-child(5),
  .masonry-card:nth-child(7) {
    transform: translateY(2rem);
  }

  .notification-card {
    padding: 1.75rem;
  }
}

@media (max-width: 767px) {
  .tab-shell {
    grid-template-columns: 1fr;
    border-radius: 1.25rem;
  }

  .tab-indicator {
    display: none;
  }

  .tab-button {
    border-radius: 999px;
  }

  .tab-button.is-active {
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.22));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 14px 20px rgba(15,23,42,0.08);
  }

  .tab-visual {
    min-height: 220px;
  }

  .hero-shell {
    padding-bottom: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade {
    opacity: 1;
    transform: none;
  }
}
