/**
 * AppSecWarrior — fresh modern design system + new top navigation
 */

:root {
  --asw-brand: #e11d48;
  --asw-brand-hover: #be123c;
  --asw-ink: #0f1419;
  --asw-muted: #5b6573;
  --asw-surface: #f2f4f8;
  --asw-panel: #0a1022;
  --asw-panel-deep: #111a33;
  --asw-accent: #e11d48;
  --asw-sky: #8eabff;
  --asw-white: #ffffff;
  --asw-line: rgba(15, 20, 25, 0.1);
  --asw-radius: 18px;
  --asw-font-display: "Fraunces", Georgia, serif;
  --asw-font-body: "Manrope", "Segoe UI", sans-serif;
  --asw-topnav-h: 72px;
  --asw-gradient-panel: linear-gradient(160deg, #0a1022 0%, #121c38 55%, #0e1630 100%);
  --asw-gradient-panel-cta: linear-gradient(135deg, #0a1022 0%, #1c274a 100%);
  --asw-gradient-panel-hero: linear-gradient(160deg, #0a1022 0%, #121c38 52%, #0e1630 100%);
  --asw-side-rail-width: 0px;
}

html,
body {
  background:
    radial-gradient(ellipse 55% 35% at 100% 0%, rgba(142, 171, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 40%, rgba(225, 29, 72, 0.06), transparent 50%),
    var(--asw-surface) !important;
  color: var(--asw-ink) !important;
  font-family: var(--asw-font-body) !important;
}

body,
body.home,
body.asw-terms-page,
body.asw-contact-page,
body.asw-about-page,
body.asw-services-page,
body.asw-blog-page,
body.asw-inner-page,
body.asw-cases-page,
body.asw-careers-page,
body.asw-resources-page,
body.asw-portfolio-page,
body.asw-pricing-page,
body.asw-service-detail-page,
body.asw-success-page,
body.wp-embed-responsive {
  font-family: var(--asw-font-body) !important;
  color: var(--asw-ink);
  background:
    radial-gradient(ellipse 55% 35% at 100% 0%, rgba(142, 171, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 40%, rgba(225, 29, 72, 0.06), transparent 50%),
    var(--asw-surface) !important;
}

body p,
body li,
body td,
body th,
body label,
body input,
body textarea,
body select,
body button,
body a,
body .menu a,
body .asw-topnav-links a,
body .asw-svc-card,
body .asw-svc-lead,
body .asw-footer,
body .asw-home-band {
  font-family: var(--asw-font-body) !important;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .wp-block-heading,
body .asw-section-title,
body .asw-svc-section-head h2,
body .asw-svc-hero h1,
body .asw-home-services-title,
body .asw-impact h2,
body .asw-footer-label,
body .asw-blog-heading,
body .asw-res-hero-brand {
  font-family: var(--asw-font-display) !important;
  letter-spacing: -0.03em;
}

/* Hide legacy chrome when new topnav is present */
body:has(.asw-topnav) .asw-site-header,
body:has(.asw-topnav) .asw-header-spacer,
.asw-legacy-nav {
  display: none !important;
}

body:has(.asw-topnav) {
  --asw-side-rail-width: 0px;
  padding-top: 0;
}

body:has(.asw-topnav) #page {
  padding-top: 0;
}

/* —— New top navigation —— */
.asw-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10090;
  height: var(--asw-topnav-h);
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.asw-topnav-inner {
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 18px;
}

.asw-topnav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.asw-topnav-brand img {
  height: 34px;
  width: auto;
  display: block;
}

.asw-topnav-links {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
}

.asw-topnav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.asw-topnav-links a:hover,
.asw-topnav-links a.is-active {
  background: rgba(225, 29, 72, 0.1);
  color: var(--asw-brand);
}

.asw-topnav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.asw-topnav-social {
  display: none;
  align-items: center;
  gap: 2px;
}

.asw-topnav-social a {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.asw-topnav-social a:hover {
  background: rgba(225, 29, 72, 0.12);
  color: var(--asw-brand);
}

.asw-topnav-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.asw-topnav-cta {
  display: none;
  align-items: center;
  padding: 10px 16px;
  border-radius: 11px;
  background: var(--asw-brand);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.86rem;
  font-weight: 750;
  transition: background 0.2s ease, transform 0.2s ease;
}

.asw-topnav-cta:hover {
  background: var(--asw-brand-hover);
  transform: translateY(-1px);
}

.asw-topnav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.asw-topnav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.asw-topnav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.asw-topnav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.asw-topnav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Home: transparent over video, solid on scroll */
.asw-topnav--home {
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.55) 0%, rgba(8, 12, 24, 0) 100%);
}

.asw-topnav--home .asw-topnav-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.asw-topnav--home.is-scrolled,
.asw-topnav--inner {
  color: var(--asw-ink);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(15, 20, 25, 0.08);
  border-bottom: 1px solid var(--asw-line);
}

.asw-topnav--home.is-scrolled .asw-topnav-toggle,
.asw-topnav--inner .asw-topnav-toggle {
  color: var(--asw-ink);
  border-color: var(--asw-line);
  background: #fff;
}

.asw-topnav--home.is-scrolled .asw-topnav-links a:hover,
.asw-topnav--home.is-scrolled .asw-topnav-links a.is-active,
.asw-topnav--inner .asw-topnav-links a:hover,
.asw-topnav--inner .asw-topnav-links a.is-active {
  color: var(--asw-brand);
}

@media (min-width: 1100px) {
  .asw-topnav-links {
    display: flex;
  }

  .asw-topnav-actions {
    margin-left: 8px;
  }

  .asw-topnav-social {
    display: flex;
  }

  .asw-topnav-cta {
    display: inline-flex;
  }
}

@media (min-width: 1100px) and (max-width: 1280px) {
  .asw-topnav-links a {
    padding: 8px 8px;
    font-size: 0.78rem;
  }
}

/* —— Drawer menu —— */
.asw-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(8, 12, 24, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.asw-nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.asw-nav-drawer[hidden] {
  display: block !important;
  pointer-events: none;
}

.asw-nav-drawer.is-open {
  pointer-events: auto;
}

.asw-nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  padding: 20px 18px 28px;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(225, 29, 72, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(142, 171, 255, 0.18), transparent 50%),
    #0b1228;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: auto;
  box-sizing: border-box;
}

.asw-nav-drawer.is-open .asw-nav-drawer-panel {
  transform: none;
}

.asw-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.asw-nav-drawer-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff8aa0;
}

.asw-nav-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.asw-nav-drawer-close:hover {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(255, 138, 160, 0.55);
  color: #ff8aa0;
}

.asw-nav-drawer-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.asw-nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asw-nav-drawer-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-family: var(--asw-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  box-sizing: border-box;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.asw-nav-drawer-links a:hover,
.asw-nav-drawer-links a.is-active {
  color: #ff8aa0;
  background: rgba(255, 255, 255, 0.04);
  padding-left: 14px;
}

.asw-nav-drawer-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ff8aa0;
}

.asw-nav-drawer-ico svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.asw-nav-drawer-label {
  min-width: 0;
  flex: 1 1 auto;
}

.asw-nav-drawer-links a.is-active .asw-nav-drawer-ico,
.asw-nav-drawer-links a:hover .asw-nav-drawer-ico {
  background: rgba(225, 29, 72, 0.22);
}

.asw-nav-drawer-note {
  display: none;
}

body.asw-drawer-open {
  overflow: hidden;
}

/* —— Consent lock —— */
html.asw-site-locked,
body.asw-site-locked {
  overflow: hidden !important;
}

html.asw-site-locked #page,
body.asw-site-locked #page,
html.asw-site-locked .asw-topnav,
body.asw-site-locked .asw-topnav {
  pointer-events: none !important;
  user-select: none;
}

html.asw-site-locked .asw-chat,
body.asw-site-locked .asw-chat {
  opacity: 0 !important;
  visibility: hidden !important;
}

html.asw-site-locked .asw-consent-overlay,
body.asw-site-locked .asw-consent-overlay,
body.asw-cookie-manage-open #CybotCookiebotDialog,
body.asw-cookie-manage-open #CybotCookiebotDialogBodyUnderlay {
  pointer-events: auto !important;
}

#CybotCookiebotDialog,
#CybotCookiebotDialogBodyUnderlay {
  display: none !important;
}

body.asw-cookie-manage-open #CybotCookiebotDialog,
body.asw-cookie-manage-open #CybotCookiebotDialogBodyUnderlay {
  display: block !important;
  z-index: 100300 !important;
}

.asw-consent-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100260 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  background: rgba(8, 12, 24, 0.92) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.asw-consent-overlay[hidden] {
  display: none !important;
}

.asw-nav-drawer-note {
  display: none !important;
}

.asw-consent-panel {
  width: min(520px, 100%);
  padding: clamp(28px, 4vw, 40px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(8, 12, 24, 0.35);
}

.asw-consent-eyebrow {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asw-brand);
}

.asw-consent-title {
  margin: 0 0 12px;
  font-family: var(--asw-font-display) !important;
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--asw-ink);
}

.asw-consent-lead {
  margin: 0 0 18px;
  color: var(--asw-muted);
  line-height: 1.65;
}

.asw-consent-lead a {
  color: var(--asw-brand);
  font-weight: 700;
}

.asw-consent-quote {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--asw-brand);
  border-radius: 0 14px 14px 0;
  background: var(--asw-surface);
}

.asw-consent-quote-text {
  margin: 0;
  font-family: var(--asw-font-display);
  font-size: 1.05rem;
  line-height: 1.5;
}

.asw-consent-quote-author {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--asw-muted);
}

.asw-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asw-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--asw-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
}

.asw-consent-btn-primary {
  background: var(--asw-brand);
  color: #fff !important;
}

.asw-consent-btn-secondary {
  background: #fff;
  color: var(--asw-ink) !important;
  border-color: var(--asw-line);
}

.asw-consent-btn-ghost {
  background: transparent;
  color: var(--asw-muted) !important;
  border-color: var(--asw-line);
}

.asw-cookie-banner {
  display: none !important;
}

/* —— Shared page polish —— */
.asw-footer,
.site-footer.asw-footer {
  background: var(--asw-panel) !important;
}

.asw-svc-btn-primary,
.asw-btn-primary {
  background: var(--asw-brand) !important;
  border-radius: 12px !important;
}

.asw-svc-card,
.asw-home-svc-card,
.asw-home-medium-card,
.asw-price-card {
  border-radius: var(--asw-radius) !important;
  border-color: var(--asw-line) !important;
}

.asw-svc-label {
  color: var(--asw-brand) !important;
}

.asw-svc-hero,
.asw-inner-hero,
body:not(.home) .asw-svc-hero {
  padding-top: calc(var(--asw-topnav-h) + 28px) !important;
}

/* Inner pages: clear fixed topnav */
body:not(.home):has(.asw-topnav) #primary,
body:not(.home):has(.asw-topnav) main.site-main,
body:not(.home):has(.asw-topnav) .content-area {
  padding-top: calc(var(--asw-topnav-h) + 8px);
}
