/* ============================================================
   ID Firewall - Custom Styles
   Works alongside Tailwind CDN. Brand tokens, animations,
   and component-level styles that Tailwind utilities don't cover.
   ============================================================ */

/* ----- Custom Properties ----- */
:root {
  --color-primary: #0d9488;
  --color-primary-light: #14b8a6;
  --color-primary-dark: #0f766e;
  --color-accent-purple: #8b5cf6;
  --color-accent-pink: #ec4899;
  --color-bg: #fafaf9;
  --color-text: #1a1a2e;
  --color-muted: #6b7280;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ----- Base ----- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* ----- Custom Scrollbar ----- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

/* ----- Hero Gradient ----- */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 25%,
    var(--color-accent-purple) 60%,
    var(--color-accent-pink) 100%
  );
  opacity: 0.08;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-gradient-vivid {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent-purple) 50%,
    var(--color-accent-pink) 100%
  );
}

/* ----- Gradient Text ----- */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent-purple) 50%,
    var(--color-accent-pink) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-teal {
  background: linear-gradient(
    135deg,
    var(--color-primary-dark) 0%,
    var(--color-primary-light) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- Card Hover ----- */
.card {
  transition: box-shadow 0.35s var(--ease-out-expo),
              transform 0.35s var(--ease-out-expo);
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 25px -5px rgba(13, 148, 136, 0.12),
    0 8px 10px -6px rgba(13, 148, 136, 0.06);
}

/* Feature card specific lift */
.feature-card {
  transition: box-shadow 0.4s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo),
              border-color 0.3s ease;
  will-change: transform, box-shadow;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px -10px rgba(13, 148, 136, 0.15),
    0 8px 16px -8px rgba(139, 92, 246, 0.08);
  border-color: var(--color-primary-light);
}

/* ----- FAQ Accordion ----- */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-question {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-chevron {
  transition: transform 0.35s var(--ease-out-expo);
  flex-shrink: 0;
  margin-left: 1rem;
  color: var(--color-muted);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-out-expo),
              padding 0.35s var(--ease-out-expo);
  padding-bottom: 0;
}

.faq-item.active .faq-answer {
  padding-bottom: 1.25rem;
}

.faq-answer-inner {
  color: var(--color-muted);
  line-height: 1.7;
  font-size: 1rem;
}

/* ----- Video Placeholder ----- */
.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
}

.video-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease;
}

.video-placeholder:hover::after {
  background: rgba(0, 0, 0, 0.2);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.video-placeholder:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.video-play-btn svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: var(--color-primary);
}

/* ----- Mobile Nav Overlay ----- */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: 80%;
  max-width: 360px;
  height: 100dvh;
  background: white;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
  overflow-y: auto;
  padding: 2rem 1.5rem;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--color-primary);
  padding-left: 0.5rem;
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 110;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo),
              opacity 0.2s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Navbar Scroll ----- */
.navbar {
  transition: background-color 0.3s ease,
              box-shadow 0.3s ease,
              backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ----- Page Transition ----- */
.page-enter {
  animation: pageEnter 0.6s var(--ease-out-expo) forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Shield Glow ----- */
.shield-glow {
  animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(13, 148, 136, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(13, 148, 136, 0.55))
            drop-shadow(0 0 40px rgba(139, 92, 246, 0.2));
  }
}

/* Alternate glow for hero usage */
.shield-glow-strong {
  animation: shieldPulseStrong 3.5s ease-in-out infinite;
}

@keyframes shieldPulseStrong {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(13, 148, 136, 0.4))
            drop-shadow(0 0 4px rgba(139, 92, 246, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(13, 148, 136, 0.6))
            drop-shadow(0 0 56px rgba(139, 92, 246, 0.3))
            drop-shadow(0 0 80px rgba(236, 72, 153, 0.15));
  }
}

/* ----- Line Reveal ----- */
.line-reveal {
  transform-origin: left center;
  transform: scaleX(0);
}

/* ----- Utility: hide scroll on body when nav is open ----- */
body.nav-open {
  overflow: hidden;
}

/* ----- Selection ----- */
::selection {
  background: rgba(13, 148, 136, 0.2);
  color: var(--color-text);
}

/* ----- Focus Ring (accessibility) ----- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----- CTA Button Gradients ----- */
.btn-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 100%
  );
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-gradient:hover {
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-gradient:active {
  transform: translateY(0);
}

/* ----- Responsive Helpers ----- */
@media (max-width: 768px) {
  .faq-question {
    font-size: 1rem;
    padding: 1rem 0;
  }

  .video-play-btn {
    width: 56px;
    height: 56px;
  }

  .video-play-btn svg {
    width: 22px;
    height: 22px;
  }
}
