/*
Theme Name:  JoshBuilds Child
Theme URI:   https://joshbuilds.tech
Description: Custom terminal-aesthetic child theme for JoshBuilds.Tech — dark, grungy, maximalist.
Author:      Josh
Author URI:  https://joshbuilds.tech
Template:    astra
Version:     1.0.0
License:     GPL-2.0-or-later
Text Domain: joshbuilds-child
*/

/* ============================================================
   DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* --- Colors --- */
  --black: #000000;
  --deep-bg: #080808;
  --panel-bg: #0d0d0d;
  --surface: #111111;
  --surface-raised: #161616;
  /* Prefixed to avoid Astra CSS variable collisions */
  --border: #1c1c1c;
  --border-bright: #2a2a2a;
  --jb-border: #1c1c1c;
  --jb-border-b: #2a2a2a;

  --green: #00FF41;
  --green-dim: #00cc33;
  --green-ghost: rgba(0, 255, 65, 0.08);
  --green-glow: rgba(0, 255, 65, 0.25);

  --amber: #FFB000;
  --red: #FF2244;
  --white: #E8E8E8;
  --muted: #555555;
  --subtle: #2e2e2e;

  /* --- Typography --- */
  --font-terminal: 'VT323', 'Courier New', monospace;
  --font-mono: 'Share Tech Mono', 'Courier Prime', 'Courier New', monospace;
  --font-ui: 'Space Mono', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 3rem;
  --fs-3xl: 4.5rem;
  --fs-hero: clamp(3rem, 10vw, 7rem);

  --lh-tight: 1.1;
  --lh-mono: 1.45;
  --lh-body: 1.75;

  --ls-tight: -0.02em;
  --ls-wide: 0.08em;
  --ls-wider: 0.2em;

  /* --- Spacing --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --section-y: clamp(4rem, 8vw, 8rem);
  --section-x: clamp(1.25rem, 5vw, 3rem);
  --container: 1140px;

  /* --- Effects --- */
  --glow: 0 0 10px rgba(0, 255, 65, 0.5), 0 0 30px rgba(0, 255, 65, 0.2);
  --glow-text: 0 0 8px rgba(0, 255, 65, 0.8);
  --glow-amber: 0 0 10px rgba(255, 176, 0, 0.5), 0 0 30px rgba(255, 176, 0, 0.2);

  --radius: 2px;
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #080808 !important;
  background: #080808 !important;
  color: #E8E8E8 !important;
  font-family: var(--font-mono);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--white);
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

::selection {
  background: var(--green);
  color: var(--black);
}

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

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--green-dim);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-terminal);
  color: var(--green);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-wide);
}

h1 {
  font-size: clamp(3.5rem, 12vw, 8rem);
}

h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

h3 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

h4 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

p {
  font-family: var(--font-mono);
  color: var(--white);
  line-height: var(--lh-body);
  font-size: var(--fs-base);
}

strong {
  color: var(--green);
  font-weight: 400;
}

em {
  color: var(--amber);
  font-style: normal;
}

code,
pre {
  font-family: var(--font-terminal);
  font-size: 1.1em;
  background: var(--surface);
  color: var(--green);
  border-left: 3px solid var(--green);
  padding: 0.25rem 0.75rem;
  display: inline-block;
}

pre {
  display: block;
  padding: var(--sp-6);
  overflow-x: auto;
  width: 100%;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--section-x);
}

.section-pad {
  padding: var(--section-y) var(--section-x);
  max-width: var(--container);
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GLOBAL COMPONENTS
   ============================================================ */

/* Terminal Label */
.terminal-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--sp-3);
}

/* Prompt Line */
.prompt-line::before {
  content: '> ';
  color: var(--green);
  font-family: var(--font-terminal);
  font-size: 1.1em;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  transition: all var(--t-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--green);
  color: var(--black);
  border: 2px solid var(--green);
  font-weight: 700;
}

.btn-primary:hover {
  background: transparent;
  color: var(--green);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: var(--green-ghost);
  box-shadow: var(--glow);
  transform: translateY(-2px);
  color: var(--green);
}

/* Terminal Card */
.card-terminal {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: var(--sp-8);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.card-terminal:hover {
  border-color: var(--green);
  box-shadow: var(--glow);
}

/* Section Divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--border-bright);
  position: relative;
  margin: var(--sp-16) 0;
}

.section-divider::after {
  content: '>>>>';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--deep-bg);
  color: var(--green);
  font-family: var(--font-terminal);
  font-size: var(--fs-lg);
  padding: 0 var(--sp-4);
  letter-spacing: 0.1em;
}

/* Terminal Cursor Blink */
.cursor-blink {
  color: var(--green);
  font-family: var(--font-terminal);
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Glitch Text */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: inherit;
  color: var(--green);
}

.glitch::before {
  left: 2px;
  color: var(--amber);
  clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%);
  animation: glitch-1 8s infinite linear;
}

.glitch::after {
  left: -2px;
  color: var(--red);
  clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%);
  animation: glitch-2 8s infinite linear;
}

@keyframes glitch-1 {

  0%,
  88%,
  100% {
    transform: none;
    opacity: 0;
  }

  89% {
    transform: skewX(-5deg) translateX(4px);
    opacity: 0.8;
  }

  91% {
    transform: none;
    opacity: 0;
  }

  92% {
    transform: skewX(3deg) translateX(-3px);
    opacity: 0.6;
  }

  94% {
    transform: none;
    opacity: 0;
  }
}

@keyframes glitch-2 {

  0%,
  85%,
  100% {
    transform: none;
    opacity: 0;
  }

  86% {
    transform: skewX(4deg) translateX(-4px);
    opacity: 0.7;
  }

  88% {
    transform: none;
    opacity: 0;
  }

  90% {
    transform: skewX(-2deg) translateX(2px);
    opacity: 0.5;
  }

  92% {
    transform: none;
    opacity: 0;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Page Breadcrumb */
.page-breadcrumb {
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: var(--sp-6);
  display: block;
}
.page-breadcrumb span {
  color: var(--green);
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ============================================================
   FORMS (global base — used on contact + potential widgets)
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-glow), inset 0 0 8px rgba(0, 255, 65, 0.05);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

select.form-input {
  cursor: pointer;
}

select.form-input option {
  background: var(--surface);
  color: var(--white);
}

/* ============================================================
   ASTRA OVERRIDES — nuclear specificity to win every cascade fight
   ============================================================ */

/* Hide Astra header + footer entirely */
#masthead,
.ast-site-header-wrap,
.main-header-bar-wrap,
.ast-primary-header-wrap,
.site-footer,
.ast-footer-area,
.footer-widget-area,
.ast-footer-overlay,
.footer-adv-overlay,
#ast-mobile-popup {
  display: none !important;
}

/* Kill ALL Astra layout spacing */
html,
html body,
html body.ast-page-builder-template,
html body #page,
html body #page.site,
html body .hfeed.site,
html body .ast-container,
html body .site-content {
  background: #080808 !important;
  padding: 0 !important;
  margin: 0 !important;
  left: 0 !important;
  right: 0 !important;
  position: static !important;
}

/* The white gap on left is body/html default margin — nuke it */
html {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
}

/* Nuke sidebar, content area widths */
#primary,
#secondary,
.site-content,
.ast-row,
.content-area,
.widget-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Gutenberg Custom HTML block — let it breathe full width */
.entry-content,
.entry-content .wp-block-html,
.wp-block-html {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Astra sets padding-top on #page for the header offset — kill it */
#page.site,
.ast-page-builder-template #page {
  padding-top: 0 !important;
}

.ast-container,
.ast-row {
  max-width: none !important;
  padding: 0 !important;
}

.post-0,
.page {
  margin: 0 !important;
  padding: 0 !important;
}

.wp-block-group__inner-container {
  max-width: none !important;
}

/* Astra adds padding to .site-main — remove it */
.site-main,
#main,
.ast-article-single,
.ast-single-post,
.ast-separate-container .ast-article-single,
.page-article,
.hentry {
  padding: 0 !important;
  margin: 0 !important;
}

/* Astra wraps content in #primary with a left offset — override it */
#primary,
#main,
#content,
.content-area,
.ast-container>#primary {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  flex-basis: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  display: block !important;
}

/* Astra's sidebar container — force it full width and remove sidebar */
.ast-separate-container .ast-article-single,
.ast-left-sidebar #primary,
.ast-right-sidebar #primary,
.ast-no-sidebar #primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Kill the sidebar entirely */
#secondary,
.widget-area,
.ast-sidebar-wrap {
  display: none !important;
}

/* Astra flex container for sidebar+content layout */
.ast-container,
.ast-separate-container,
#content.ast-container-width,
.site-content.ast-container-width {
  display: block !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Page title Astra outputs — hide it (we don't want it) */
.entry-header,
.ast-archive-description,
.page-header {
  display: none !important;
}

/* Override any Astra inline-set widths via attribute selectors */
[class*="ast-"][style*="width"] {
  width: 100% !important;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
#jb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 9999;
  background: rgba(8, 8, 8, 0.97);
  border-bottom: 1px solid #1c1c1c;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#jb-header.scrolled {
  border-bottom-color: #2a2a2a;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

#jb-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

#jb-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #e8e8e8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

#jb-logo:hover,
#jb-logo:focus {
  color: #e8e8e8;
}

#jb-prompt,
#jb-accent {
  color: #00FF41;
}

#jb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

#jb-nav .jb-link,
#jb-nav .jb-link:link,
#jb-nav .jb-link:visited {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: #00FF41;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #000;
  border: 2px solid #00FF41;
  padding: 6px 14px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

#jb-nav .jb-link:hover,
#jb-nav .jb-link:focus,
#jb-nav .jb-link.active {
  background: #00FF41;
  color: #000;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

#jb-nav .jb-num {
  color: inherit;
  font-size: 0.62rem;
}

#jb-nav .jb-cta,
#jb-nav .jb-cta:link,
#jb-nav .jb-cta:visited {
  background: #00FF41;
  border-color: #00FF41;
  color: #000;
  font-weight: 700;
}

#jb-nav .jb-cta:hover,
#jb-nav .jb-cta:focus,
#jb-nav .jb-cta.active {
  background: #000;
  color: #00FF41;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.6);
}

#jb-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
  padding: 0;
  flex-shrink: 0;
}

#jb-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #00FF41;
  transition: all 0.25s;
  transform-origin: center;
}

#jb-burger.open span:nth-child(1),
#jb-burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#jb-burger.open span:nth-child(2),
#jb-burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#jb-burger.open span:nth-child(3),
#jb-burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#jb-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: #000000;
  border-bottom: 2px solid #00FF41;
  transform: translateY(-110%);
  transition: transform 0.25s ease;
  z-index: 9998;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#jb-drawer.open {
  transform: translateY(0);
}

#jb-drawer .jb-dlink,
#jb-drawer .jb-dlink:link,
#jb-drawer .jb-dlink:visited {
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  color: #00FF41;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  display: block;
  padding: 16px 20px;
  border: 2px solid #00FF41;
  background: #000000;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

#jb-drawer .jb-dlink:hover,
#jb-drawer .jb-dlink:focus,
#jb-drawer .jb-dlink.active {
  background: #00FF41;
  color: #000000;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
}

@media (max-width: 768px) {
  #jb-nav {
    display: none;
  }

  #jb-burger {
    display: flex;
  }

  #jb-inner {
    padding: 0 20px;
  }
}

@media (min-width: 769px) {
  #jb-nav {
    display: flex;
  }

  #jb-burger {
    display: none;
  }

  #jb-drawer {
    display: none;
  }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer-custom {
  background: #000000 !important;
  border-top: 1px solid #2a2a2a !important;
}

.footer-terminal-bar {
  background: #0d0d0d !important;
  border-bottom: 1px solid #1c1c1c !important;
  padding: 0.75rem clamp(1.5rem, 5vw, 5rem);
  font-size: 1.2rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.terminal-path {
  color: #00FF41 !important;
}

.terminal-cmd {
  color: #e8e8e8 !important;
}

.terminal-cursor-f {
  color: var(--green);
  animation: blink 1s step-end infinite;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem clamp(1.5rem, 5vw, 5rem);
}

@media (max-width: 768px) {
  .footer-grid {
    flex-direction: column;
    gap: 2.5rem;
  }
}

.footer-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: #e8e8e8 !important;
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.footer-logo span {
  color: #00FF41 !important;
}

.footer-tagline {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-location {
  color: #444;
  font-size: 0.75rem;
}

.footer-heading {
  font-size: 1.5rem !important;
  color: #00FF41 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: 700;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem !important;
}

.footer-nav a {
  color: #a0a0a0 !important;
  font-size: 1.15rem !important;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: #00FF41 !important;
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-contact a {
  color: #00FF41 !important;
}

.footer-availability {
  font-size: 0.75rem;
  color: #555;
}

.status-online {
  color: #00FF41 !important;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.footer-bottom {
  border-top: 1px solid #1c1c1c !important;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.5rem, 5vw, 5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: #555;
}

.footer-legal-links {
  font-size: 0.75rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-legal-links a {
  color: #555 !important;
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-legal-links a:hover {
  color: #00FF41 !important;
}

/* ============================================================
   PAGE TEMPLATE BASE
   ============================================================ */
.full-width-main {
  width: 100%;
  padding-top: 64px;
  min-height: 100vh;
  background: #080808;
}

/* Force dark bg on all page content — catches any Astra inheritance */
.full-width-main section,
.full-width-main div,
.full-width-main article {
  background-color: inherit;
}

/* Sections that are explicitly panel/dark — hardcode so no CSS var issues */
.section-process,
.section-cta,
.services-cta,
.section-pricing,
.case-study-section,
.expect-section,
.portfolio-filters-bar,
.footer-terminal-bar,
.site-footer-custom {
  background-color: #0d0d0d;
}