/**
 * CyperQ Tech — Dark modern (senior UX)
 * Deep neutrals, crisp type, restrained accent. No glass, glow, or gradient chrome.
 */

.theme-modern {
  --dm-bg: #09090b;
  --dm-surface: #111113;
  --dm-elevated: #18181b;
  --dm-card: #141416;
  --dm-border: rgba(255, 255, 255, 0.09);
  --dm-border-subtle: rgba(255, 255, 255, 0.06);
  --dm-border-hover: rgba(255, 255, 255, 0.14);
  --dm-text: #fafafa;
  --dm-muted: #a1a1aa;
  --dm-subtle: #71717a;
  --ent-max: 72rem;
  --ent-radius: 0.5rem;
  --ent-section-y: clamp(4.75rem, 8vh, 6.25rem);
  --site-container-max: var(--ent-max);
  --site-container-pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --dm-ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Map into existing tokens */
  --bg-base: var(--dm-bg);
  --bg-surface: var(--dm-surface);
  --bg-elevated: var(--dm-elevated);
  --bg-card: var(--dm-card);
  --text-primary: var(--dm-text);
  --text-secondary: #e4e4e7;
  --text-muted: var(--dm-muted);
  --text-subtle: var(--dm-subtle);
  --border-subtle: var(--dm-border-subtle);
  --border-default: var(--dm-border);
  --border-strong: var(--dm-border-hover);
  --glass-bg: var(--dm-elevated);
  --glass-border: var(--dm-border);
}

body.theme-modern.bg-primary {
  background-color: var(--dm-bg) !important;
  color: var(--text-secondary);
}

/* Site canvas — subtle depth (dark modern) */
.theme-modern {
  --site-spotlight: rgba(219, 9, 77, 0.07);
  --site-accent-soft: rgba(219, 9, 77, 0.03);
}

.theme-modern .site-canvas {
  opacity: 1 !important;
  visibility: visible !important;
  background-color: var(--dm-bg);
}

.theme-modern .site-canvas__base {
  opacity: 1;
}

.theme-modern .site-canvas__spotlight {
  opacity: 0.5 !important;
  visibility: visible !important;
}

.theme-modern .site-canvas__depth {
  opacity: 0.35 !important;
  visibility: visible !important;
}

.theme-modern .site-canvas__grid {
  opacity: 0.14 !important;
  visibility: visible !important;
}

.theme-modern .site-canvas__grain {
  opacity: 0.022 !important;
  visibility: visible !important;
}

/* Icons */
.ui-icon {
  flex-shrink: 0;
  color: var(--dm-subtle);
}

.ui-icon--xs {
  width: 0.875rem;
  height: 0.875rem;
}

.ui-icon--sm {
  width: 1.125rem;
  height: 1.125rem;
}

.ui-icon--md {
  width: 1.35rem;
  height: 1.35rem;
}

.ui-icon--lg {
  width: 1.75rem;
  height: 1.75rem;
}

.theme-modern .svc-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.85rem;
  border-radius: var(--ent-radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dm-border);
  color: var(--accent-light);
}

.theme-modern .hero-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--ent-radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dm-border);
  color: var(--accent-light);
}

.theme-modern .hero-panel__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.theme-modern .hero-frameworks__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.theme-modern .hero-frameworks__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.theme-modern .hero-frameworks__list li + li::before {
  content: none;
}

.theme-modern .hero-frameworks__icon {
  color: var(--accent);
}

.theme-modern .academy-section__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.theme-modern .academy-section__points .ui-icon {
  margin-top: 0.2rem;
  color: var(--accent);
}

/* Hero — local canvas + image */
.theme-modern .hero-section {
  position: relative;
  isolation: isolate;
}

.theme-modern .hero-section__canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 70% 55% at 85% 20%, rgba(219, 9, 77, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 12% 72%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    40px 40px,
    40px 40px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
  opacity: 1;
}

.theme-modern .hero-container {
  position: relative;
  z-index: 1;
}

.theme-modern .hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.theme-modern .hero-visual:not(.hero-visual--soc) {
  margin: 0;
  border-radius: var(--ent-radius);
  border: 1px solid var(--dm-border);
  overflow: hidden;
  background: var(--dm-card);
}

.theme-modern .hero-visual--soc {
  margin: 0;
  border: none;
  overflow: visible;
  background: transparent;
}

.theme-modern .hero-visual__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
}

.theme-modern .hero-panel__bullet {
  display: none;
}

/* Academy — image + icon */
.theme-modern .academy-section__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .theme-modern .academy-section__inner {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.15fr) auto;
    gap: 2rem;
    align-items: center;
  }

  .theme-modern .academy-section__visual {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .theme-modern .academy-section__head,
  .theme-modern .academy-section__copy {
    grid-column: 2;
  }

  .theme-modern .academy-section__action {
    grid-column: 3;
    grid-row: 1 / span 3;
    align-self: center;
  }
}

.theme-modern .academy-section__visual {
  position: relative;
  margin: 0;
  border-radius: var(--ent-radius);
  border: 1px solid var(--dm-border);
  overflow: hidden;
  background: var(--dm-elevated);
  min-height: 12rem;
}

.theme-modern .academy-section__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
  opacity: 0.85;
}

.theme-modern .academy-section__visual-icon {
  position: absolute;
  inset: auto 1rem 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--ent-radius);
  background: rgba(9, 9, 11, 0.75);
  border: 1px solid var(--dm-border);
  color: var(--accent-light);
}

[dir="rtl"] .theme-modern .academy-section__visual-icon {
  inset: auto auto 1rem 1rem;
}

/* Contact band — image */
.theme-modern .home-contact-band__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .theme-modern .home-contact-band__inner {
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
  }

  .theme-modern .home-contact-band__visual {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .theme-modern .home-contact-band__content {
    grid-column: 2;
  }

  .theme-modern .home-contact-band__actions {
    grid-column: 3;
    align-self: center;
  }
}

.theme-modern .home-contact-band__visual {
  margin: 0;
  border-radius: var(--ent-radius);
  border: 1px solid var(--dm-border);
  overflow: hidden;
  background: var(--dm-card);
}

.theme-modern .home-contact-band__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.theme-modern .home-contact-band__content {
  min-width: 0;
}

@media (max-width: 767px) {
  .theme-modern .hero-visual,
  .theme-modern .home-contact-band__visual {
    max-width: 100%;
  }

  .theme-modern .academy-section__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .theme-modern .academy-section__visual {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin-inline: 0;
    aspect-ratio: 16 / 10;
  }

  .theme-modern .academy-section__img {
    min-height: 0;
    height: 100%;
    object-position: center;
    opacity: 1;
  }

  .theme-modern .academy-section__action {
    width: 100%;
    align-items: stretch;
    text-align: center;
  }

  .theme-modern .academy-section__cta {
    width: 100%;
    justify-content: center;
  }

  .theme-modern .home-contact-band__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .theme-modern .home-contact-band__visual {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 10;
  }

  .theme-modern .home-contact-band__img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
  }

  .theme-modern .home-contact-band__content {
    min-width: 0;
  }

  .theme-modern .home-contact-band__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .theme-modern .home-contact-band__actions .btn-primary,
  .theme-modern .home-contact-band__actions .btn-secondary {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

/* Header — transparent, no chrome */
.theme-modern .site-header__bar {
  border-radius: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.theme-modern .site-header.scrolled,
.theme-modern header.site-header.scrolled {
  background: #000;
}

.theme-modern header.scrolled .site-header__bar,
.theme-modern .site-header.scrolled .site-header__bar {
  background: #000;
  border: none;
  box-shadow: none;
}

.theme-modern .nav-link--active {
  color: var(--dm-text) !important;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.theme-modern .nav-link--cta {
  border-radius: var(--btn-radius, 30px) !important;
  background: var(--accent);
  box-shadow: none;
}

.theme-modern .nav-link--cta:hover {
  background: var(--accent-dark);
  transform: none;
  box-shadow: none;
}

.theme-modern .dropdown-panel {
  border-radius: var(--ent-radius);
  background: var(--dm-elevated);
  border-color: var(--dm-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Section labels — typographic only */
.theme-modern .section-eyebrow--enterprise {
  display: block;
  padding: 0;
  margin: 0 0 0.75rem;
  border: none;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dm-subtle);
}

.theme-modern .section-eyebrow--enterprise::before {
  display: none;
}

[dir="rtl"] .theme-modern .section-eyebrow--enterprise {
  padding: 0;
  border: none;
}

/* Typography — Inter only */
.theme-modern .font-display,
.theme-modern h1,
.theme-modern h2,
.theme-modern h3,
.theme-modern .hero-headline,
.theme-modern .services-title,
.theme-modern .academy-section__title,
.theme-modern .blog-title,
.theme-modern .home-contact-band__title {
  font-family: var(--font-sans);
}

.theme-modern .title-accent {
  background: none;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--dm-text);
  font-weight: 600;
}

.theme-modern.page-home-enterprise .hero-headline__accent {
  font-weight: 900;
  color: transparent;
  background: #d9064b;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Motion — opacity only */
.theme-modern .section-reveal {
  transform: none !important;
  opacity: 0;
  transition: opacity 0.35s var(--dm-ease) !important;
}

.theme-modern .section-reveal.revealed {
  opacity: 1;
}

.theme-modern:not(.motion-3d) .reveal,
.theme-modern:not(.motion-3d) .hero-reveal {
  transform: none !important;
  animation: dmFade 0.4s var(--dm-ease) forwards !important;
}

@keyframes dmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-modern .section-reveal,
  .theme-modern .reveal,
  .theme-modern .hero-reveal {
    opacity: 1;
    animation: none !important;
    transition: none !important;
  }
}

/* Buttons */
.theme-modern .btn-primary {
  background: var(--accent);
  background-size: auto;
  border-radius: var(--btn-radius, 30px);
  box-shadow: none;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-modern .btn-primary:hover {
  background: var(--accent-dark);
  transform: none;
  box-shadow: none;
}

.theme-modern .btn-secondary {
  border-radius: var(--btn-radius, 30px);
  color: var(--dm-text);
  background: transparent;
  border: 1px solid var(--dm-border-hover);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-modern .btn-secondary:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

/* Cards & panels */
.theme-modern .svc-card--enterprise,
.theme-modern .blog-card a,
.theme-modern .service-card,
.theme-modern .service-card-bg,
.theme-modern .academy-section__inner,
.theme-modern .home-contact-band__inner,
.theme-modern.page-home-enterprise .hero-panel__card,
.theme-modern.page-home-enterprise .hero-proof {
  border-radius: var(--ent-radius);
  background: var(--dm-card);
  border: 1px solid var(--dm-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.theme-modern .svc-card--enterprise:hover,
.theme-modern .svc-card--enterprise:focus-within,
.theme-modern .blog-card a:hover,
.theme-modern .service-card:hover,
.theme-modern .academy-section__inner:hover,
.theme-modern .home-contact-band__inner:hover {
  transform: none;
  border-color: var(--dm-border-hover);
  background: var(--dm-elevated);
  box-shadow: none;
}

.theme-modern.page-home-enterprise .hero-section::after {
  background: var(--dm-border-subtle);
  opacity: 1;
}

.theme-modern.page-home-enterprise .hero-proof::before {
  display: none;
}

.theme-modern.page-home-enterprise .hero-panel__bullet {
  width: 2px;
  height: 1rem;
  margin-top: 0.4rem;
  border-radius: 0;
  background: var(--dm-border-hover);
  box-shadow: none;
}

.theme-modern.page-home-enterprise .hero-headline {
  font-size: clamp(2.375rem, 5.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--dm-text);
}

.theme-modern.page-home-enterprise .hero-headline__line,
.theme-modern.page-home-enterprise .hero-headline__suffix {
  font-weight: 900;
}

.theme-modern.page-home-enterprise .hero-lead {
  font-size: clamp(1.0625rem, 1.85vw, 1.3125rem);
  color: var(--dm-muted);
  max-width: 40rem;
}

.theme-modern.page-home-enterprise .hero-btn--primary {
  font-weight: 700;
  min-height: 3.125rem;
  padding-inline: 1.5rem;
  font-size: 1rem;
}

.theme-modern.page-home-enterprise .hero-btn--secondary {
  font-weight: 600;
  min-height: 3.125rem;
  padding-inline: 1.5rem;
  font-size: 1rem;
}

.theme-modern.page-home-enterprise .hero-proof__metrics dd {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dm-text);
}

.theme-modern.page-home-enterprise .hero-proof__metrics dt {
  color: var(--dm-subtle);
}

.theme-modern .svc-card__tag {
  color: var(--dm-subtle);
}

.theme-modern .svc-card__more,
.theme-modern .services-cta--text,
.theme-modern .clients-strip__link,
.theme-modern .blog-teaser__link,
.theme-modern .hero-panel__cta {
  color: var(--dm-muted);
  text-decoration: none;
  font-weight: 500;
}

.theme-modern .svc-card--enterprise:hover .svc-card__more,
.theme-modern .services-cta--text:hover,
.theme-modern .clients-strip__link:hover,
.theme-modern .blog-teaser__link:hover,
.theme-modern .hero-panel__cta:hover {
  color: var(--dm-text);
}

.theme-modern .hero-clients__logos img {
  opacity: 0.5;
  filter: grayscale(1);
}

.theme-modern .hero-clients__logos li:hover img {
  opacity: 0.7;
  filter: grayscale(1);
}

/* Contact */
.theme-modern .contact-form-card,
.theme-modern .rounded-xl.surface-card {
  background: var(--dm-card) !important;
  border: 1px solid var(--dm-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.theme-modern .contact-submit {
  box-shadow: none;
}

.theme-modern .contact-submit:hover {
  transform: none;
}

.theme-modern .contact-headline-accent {
  color: var(--accent-light);
}

.theme-modern .agile-step-number {
  background: var(--dm-card) !important;
  color: var(--dm-muted) !important;
  border: 1px solid var(--dm-border) !important;
  box-shadow: none !important;
}

.theme-modern .service-card .absolute.blur-3xl {
  display: none;
}

.theme-modern a:focus-visible,
.theme-modern button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
