/*
Theme Name: ABNOVA Digital
Theme URI: https://abnovadigital.com/
Author: ABNOVA Digital
Author URI: https://abnovadigital.com/
Description: Dark, high-performance WordPress theme for digital engineering studios — web development, SaaS applications and data engineering. Ships with custom post types for Services, Projects, Testimonials and FAQs, an animated canvas globe, live world clocks, a typing terminal, and built-in SEO schema.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abnova-digital
Tags: business, portfolio, dark, custom-menu, custom-logo, featured-images, translation-ready, block-styles
*/

/* =========================================================
   1. DESIGN TOKENS
   (also declared by assets/css/tailwind.css — repeated here
   so custom CSS still works if utilities fail to load)
   ========================================================= */
:root {
  --color-ink-950: #05070d;
  --color-ink-900: #0a101e;
  --color-ink-800: #111d32;
  --color-line: #202e46;
  --color-paper: #eef3fb;
  --color-mist-300: #bdc9dd;
  --color-mist-400: #9baac1;
  --color-mist-500: #8494af;
  --color-volt-300: #89eaff;
  --color-volt-400: #39d3f2;
  --color-volt-500: #179bbd;
  --color-mint-400: #61dec9;

  --font-display: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --glow-volt: rgba(57, 211, 242, 0.2);
  --soft-volt: rgba(57, 211, 242, 0.065);
  --soft-blue: rgba(57, 120, 255, 0.09);
  --accent-outline: rgba(57, 211, 242, 0.65);
  --accent-hover: rgba(57, 211, 242, 0.065);
}

/* =========================================================
   2. BASE
   ========================================================= */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-ink-950);
  color: var(--color-paper);
  font-family: var(--font-body);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.story-content p + p {
  margin-top: 1.5rem;
}

.about-values-grid {
  position: relative;
  border-bottom: 1px solid var(--color-line);
}

.about-values-grid::after {
  position: absolute;
   right: 0;
   bottom: 0;
   left: 0;
   z-index: 10;
   height: 1px;
   background: var(--color-line);
   content: "";
   pointer-events: none;
}

.process-commitments-grid {
  position: relative;
  border-bottom: 1px solid var(--color-line);
}

.process-commitments-grid > .reveal + .reveal {
  border-top: 1px solid var(--color-line);
}

@media (min-width: 640px) {
  .process-commitments-grid > .reveal + .reveal {
    border-top: 0;
  }

  .process-commitments-grid > .reveal:nth-child(n + 3) {
    border-top: 1px solid var(--color-line);
  }
}

.process-commitments-grid::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 1px;
  background: var(--color-line);
  content: "";
  pointer-events: none;
}

.work-featured-card {
  display: block;
}

.work-featured-panel {
  min-height: 420px;
}

@media (min-width: 768px) {
  .work-featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .work-featured-panel {
    min-height: 520px;
  }

  .work-featured-details {
    align-self: stretch;
  }
}

.work-featured-url {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
}

.work-featured-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.work-featured-cta {
  align-self: flex-start;
  width: fit-content;
}

@media (max-width: 767px) {
  .work-featured-panel {
    min-height: 320px;
  }
}

::selection {
  background: var(--color-volt-400);
  color: var(--color-ink-950);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-ink-950);
}
::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2a3a5e;
}


/* Accessibility helper (WP standard) */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--color-volt-400);
  clip: auto !important;
  clip-path: none;
  color: var(--color-ink-950);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 12px;
  line-height: normal;
  padding: 14px 22px;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 100000;
}

/* =========================================================
   3. NAVIGATION (wp_nav_menu output)
   ========================================================= */
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-mist-400);
  text-decoration: none;
  transition: color 0.3s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--color-paper);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 0;
  background: var(--color-volt-400);
  transition: width 0.3s ease;
}
.primary-nav a:hover::after {
  width: 100%;
}

/* Desktop dropdown menu (.menu-item-has-children > .sub-menu) */
.primary-nav .menu-item-has-children {
  position: relative;
}
.primary-nav .menu-item-has-children > a::after {
  bottom: -6px;
}
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -16px;
  min-width: 240px;
  background-color: var(--color-ink-900);
  border: 1px solid var(--color-line);
  border-top: 2px solid var(--color-volt-400);
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  z-index: 100;
}
/* Invisible hover bridge so moving mouse from parent to dropdown doesn't close it */
.primary-nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu li {
  width: 100%;
}
.primary-nav .sub-menu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--color-mist-300);
  white-space: nowrap;
}
.primary-nav .sub-menu a::after {
  display: none;
}
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu .current-menu-item > a {
  color: var(--color-volt-400);
  background-color: var(--accent-hover);
}

/* Full-screen mobile drawer (moved outside <header> to avoid clipping).
   Hidden by default; theme.js reveals it by toggling .is-open + inline styles. */
.mobile-menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  padding: 1.5rem 1.5rem 2rem;
  background-color: #05070d; /* solid — never let page content show through */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (min-width: 1200px) {
  .mobile-menu-drawer {
    display: none !important;
  }
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding-bottom: 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(29, 39, 64, 0.6);
}
#menu-close {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-volt-400);
  color: var(--color-volt-400);
  background: transparent;
  cursor: pointer;
}
.mobile-menu-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(29, 39, 64, 0.6);
}

.mobile-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem 0;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-nav li {
  border-bottom: 1px solid rgba(29, 39, 64, 0.6);
}
.mobile-nav a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-paper);
  text-decoration: none;
  transition: color 0.3s ease;
}
.mobile-nav a:hover,
.mobile-nav .current-menu-item > a,
.mobile-nav .current_page_item > a {
  color: var(--color-volt-400);
}
.mobile-nav .sub-menu {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 2px solid var(--color-volt-400);
}
.mobile-nav .sub-menu li {
  border-bottom: 0;
}
.mobile-nav .sub-menu a {
  padding: 0.4rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-mist-300);
}
.mobile-nav .sub-menu a:hover {
  color: var(--color-volt-400);
}

.footer-menu ul {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-menu a {
  font-size: 0.875rem;
  color: var(--color-mist-300);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-menu a:hover {
  color: var(--color-volt-400);
}

/* =========================================================
   3b. HERO TERMINAL — mobile overflow protection
   ========================================================= */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Never let the terminal push the page wider than the screen */
.abnova-terminal {
  max-width: 100%;
  overflow: hidden;
}

/* Traffic-light dots take space we need on small screens */
.terminal-dots {
  display: none;
}

/* Long log lines must wrap instead of overflowing */
.terminal-body > div {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

@media (min-width: 640px) {
  .terminal-dots {
    display: flex;
  }
  .terminal-tabs {
    flex: 0 1 auto;
    justify-content: flex-end;
  }
  .terminal-titlebar {
    padding: 0.75rem 1rem;
  }
  .terminal-body {
    height: 16rem;
    padding: 1rem 1.25rem;
    font-size: 12.5px;
    line-height: 1.85;
  }
  .terminal-statusbar {
    padding: 0.625rem 1.25rem;
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }
}

/* =========================================================
   4. DECOR: grid, grain, outline type
   ========================================================= */
.grid-bg {
  background-image: linear-gradient(rgba(120, 140, 175, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 175, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
}

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.text-outline-volt {
  -webkit-text-stroke: 1px var(--accent-outline);
  color: transparent;
}
.text-outline-dim {
  -webkit-text-stroke: 1px rgba(233, 238, 248, 0.13);
  color: transparent;
}

/* =========================================================
   5. ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.mask-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.mask-line > span {
  display: block;
  transform: translateY(115%);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0ms);
}
.mask-line.in > span {
  transform: none;
}

.marquee {
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: abnova-marquee var(--speed, 30s) linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes abnova-marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes abnova-blink {
  0%,
  55% {
    opacity: 1;
  }
  56%,
  100% {
    opacity: 0;
  }
}
.cursor-blink {
  animation: abnova-blink 1.1s steps(1) infinite;
}

@keyframes abnova-pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
.pulse-dot {
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
  animation: abnova-pulse-ring 2.2s ease-out infinite;
}

@keyframes abnova-drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
.drift {
  animation: abnova-drift 7s ease-in-out infinite;
}

/* =========================================================
   6. ACCORDIONS (services + FAQ)
   ========================================================= */
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.open > .faq-body,
.services-article.open > .faq-body {
  max-height: 1000px;
}
.faq-body > div {
  min-height: 0;
}
.accordion-toggle .accordion-icon {
  transition: transform 0.5s ease, border-color 0.4s ease, color 0.4s ease;
}
.faq-item.open .accordion-icon,
.services-article.open .accordion-icon {
  transform: rotate(45deg);
  border-color: var(--color-volt-400);
  color: var(--color-volt-400);
}
.faq-item.open .accordion-title,
.services-article.open .accordion-title {
  color: var(--color-volt-400);
}

/* =========================================================
   7. POST / PAGE CONTENT (blog, About, Services pages…)
   ========================================================= */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-mist-300);
}
.entry-content > * + * {
  margin-top: 1.5rem;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-display);
  color: var(--color-paper);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 2.75rem;
}
.entry-content h2 {
  font-size: 2rem;
}
.entry-content h3 {
  font-size: 1.5rem;
}
.entry-content h4 {
  font-size: 1.2rem;
}
.entry-content a {
  color: var(--color-volt-400);
  text-underline-offset: 4px;
}
.entry-content a:hover {
  text-decoration: underline;
}
.entry-content strong {
  color: var(--color-paper);
}
.entry-content ul,
.entry-content ol {
  padding-left: 1.35rem;
}
.entry-content li + li {
  margin-top: 0.5rem;
}
.entry-content ul li::marker {
  color: var(--color-volt-400);
}
.entry-content blockquote {
  border-left: 2px solid var(--color-volt-400);
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-paper);
}
.entry-content img,
.entry-content iframe {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
}
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-ink-900);
  border: 1px solid var(--color-line);
  padding: 0.15em 0.4em;
}
.entry-content pre {
  background: var(--color-ink-900);
  border: 1px solid var(--color-line);
  padding: 1.25rem;
  overflow-x: auto;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--color-line);
  padding: 0.65rem 0.9rem;
  text-align: left;
}

/* WP core alignment + caption classes */
.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}
.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}
.aligncenter {
  display: block;
  margin-inline: auto;
}
.wp-caption-text,
.entry-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-mist-500);
  margin-top: 0.6rem;
  text-align: center;
}
.sticky .entry-title::after {
  content: " ★";
  color: var(--color-volt-400);
}

/* Pagination */
.abnova-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.6rem;
  border: 1px solid var(--color-line);
  color: var(--color-mist-300);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.abnova-pagination .page-numbers:hover,
.abnova-pagination .page-numbers.current {
  border-color: var(--color-volt-400);
  color: var(--color-volt-400);
}

/* Forms (comments, search, contact fallback) */
.abnova-field {
  width: 100%;
  border: 1px solid var(--color-line);
  background: rgba(10, 15, 27, 0.7);
  color: var(--color-paper);
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s ease;
}
.abnova-field::placeholder {
  color: var(--color-mist-500);
}
.abnova-field:focus {
  border-color: var(--color-volt-400);
}
.abnova-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--color-volt-400);
  color: var(--color-ink-950);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 1rem 1.75rem;
  border: 0;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.abnova-btn:hover {
  background: var(--color-volt-300);
  box-shadow: 0 0 36px var(--glow-volt);
}

/* Contact-form-7 / plugin form theming (best effort) */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  background: rgba(10, 15, 27, 0.7);
  color: var(--color-paper);
  padding: 0.875rem 1rem;
}
.wpcf7-form input[type="submit"] {
  background: var(--color-volt-400);
  color: var(--color-ink-950);
  font-weight: 700;
  border: 0;
  padding: 1rem 1.75rem;
  cursor: pointer;
}

/* =========================================================
   8. REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .mask-line > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee-track,
  .cursor-blink,
  .drift,
  .pulse-dot::after {
    animation: none !important;
  }
  .faq-body {
    transition: none;
  }
}
