/*
Theme Name: Avox Industries
Theme URI: https://avoxindustries.com
Author: Avox Industries
Author URI: https://avoxindustries.com
Description: Custom theme for Avox Industries — a turnkey engineering solutions and equipment distribution company based in Kuala Lumpur. Features a scroll-based CAD-to-product animation, 4-service layout, dedicated Custom Parts Request page, and a red/white industrial aesthetic.
Version: 1.0.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: avox
Tags: one-page, custom-logo, full-width-template, red-and-white
*/

/* === CSS VARIABLES === */
:root {
  --red: #ff1616;
  --red-soft: #ffe8e8;
  --red-dark: #c60f0f;
  --white: #ffffff;
  --off-white: #faf9f7;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --mute: #8a8a8a;
  --line: rgba(10, 10, 10, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', sans-serif;
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* WordPress core classes that themes should include */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 38px; width: auto; display: block; }
.logo-text { font-weight: 900; font-size: 1.15rem; letter-spacing: -0.03em; color: var(--ink); }
.nav-links { display: flex; gap: 2.2rem; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); text-decoration: none; text-transform: uppercase; transition: color 0.3s; }
.nav-links a:hover { color: var(--red); }

/* === HERO === */
.hero { min-height: 100vh; position: relative; padding: 7rem 2.5rem 4rem; background: var(--white); overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative; max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 4rem;
  align-items: center; min-height: calc(100vh - 11rem);
}
.hero-text { position: relative; z-index: 2; }
.hero-tag {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1.5rem; display: inline-flex; align-items: center; gap: 10px;
}
.hero-tag::before { content: ''; width: 32px; height: 1px; background: var(--red); display: inline-block; }
.hero-title { font-size: clamp(3rem, 7.5vw, 6rem); font-weight: 900; line-height: 0.92; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.hero-title .red { color: var(--red); font-style: italic; font-weight: 800; }
.hero-title .slash { color: var(--red); display: inline-block; transform: rotate(12deg); margin: 0 0.05em; }
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 500px; margin-bottom: 2.5rem; line-height: 1.65; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: white; padding: 1rem 1.75rem;
  text-decoration: none; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; transition: all 0.3s;
  border: none; cursor: pointer;
}
.hero-cta:hover { background: var(--red); transform: translateX(4px); color: white; }
.hero-cta:hover .arrow { transform: translateX(4px); }
.hero-cta .arrow { transition: transform 0.3s; }

/* === ANIMATION STAGE === */
.anim-stage { position: relative; width: 100%; aspect-ratio: 1; max-width: 520px; margin: 0 auto; }
.anim-stage svg { width: 100%; height: 100%; overflow: visible; }

/* CAD wireframe drawing animation */
.cad-cross {
  stroke: var(--red); stroke-width: 0.5; stroke-dasharray: 4 3;
  opacity: 0; animation: fadeCross 1s ease-out 0.3s forwards;
}
@keyframes fadeCross { to { opacity: 0.6; } }

.cad-dim-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; fill: var(--red); opacity: 0;
  animation: fadeIn 0.6s ease-out 0.8s forwards;
  letter-spacing: 1px;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Wireframe lines - self-drawing on load */
.wire {
  fill: none; stroke: var(--red); stroke-width: 1.5;
  stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 2.5s ease-out forwards;
}
.wire.delay-1 { animation-delay: 0.2s; }
.wire.delay-2 { animation-delay: 0.5s; }
.wire.delay-3 { animation-delay: 0.8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Product face - revealed on scroll via JS */
.product-face { opacity: 0; transition: opacity 0.6s; }

/* Slow continuous rotation */
.rotor {
  transform-origin: 260px 260px;
  animation: slowSpin 22s linear infinite;
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Stage indicator - scroll progress bar */
.stage-meta {
  position: absolute; bottom: -2.5rem; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--mute); letter-spacing: 0.1em;
}
.stage-bar {
  flex: 1; height: 2px; background: var(--line);
  margin: 0 1rem; position: relative; overflow: hidden;
}
.stage-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--red); width: 0%;
  transition: width 0.4s ease;
}
.stage-label { transition: color 0.3s, opacity 0.3s; }
.stage-label.active { color: var(--red); }
.stage-label.inactive { opacity: 0.4; }

/* === MARQUEE === */
.marquee { background: var(--red); color: white; padding: 1.5rem 0; overflow: hidden; }
.marquee-track {
  display: flex; gap: 3rem; white-space: nowrap;
  animation: marquee 28s linear infinite;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase;
}
.marquee-track span { display: flex; align-items: center; gap: 3rem; }
.marquee-track .star {
  display: inline-block; width: 14px; height: 14px; background: white;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* === SECTION HEADERS === */
.section-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--red);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 10px;
}
.section-tag::before { content: ''; width: 28px; height: 1px; background: var(--red); }
.section-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.035em; margin-bottom: 1.5rem; }

/* === ABOUT / SERVICES === */
.about { padding: 8rem 2.5rem; background: var(--ink); color: white; position: relative; overflow: hidden; }
.about::before {
  content: ''; position: absolute; top: -10%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255, 22, 22, 0.18), transparent 70%);
  pointer-events: none;
}
.about-inner { max-width: 1400px; margin: 0 auto; position: relative; }
.about-header { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 5rem; align-items: end; }
.about-title { color: white; }
.about-title .red { color: var(--red); font-style: italic; }
.about-desc { color: rgba(255, 255, 255, 0.7); font-size: 1.05rem; line-height: 1.7; max-width: 440px; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.12); }
.service {
  background: var(--ink); padding: 2.25rem 1.75rem; position: relative;
  transition: background 0.4s; cursor: default; min-height: 340px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.service:hover { background: #1a1a1a; }
.service:hover .service-num { color: var(--red); }
.service:hover .service-icon { transform: translateY(-4px) rotate(-6deg); }
.service-num { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--mute); letter-spacing: 0.2em; transition: color 0.4s; }
.service-icon { width: 48px; height: 48px; margin: 1.25rem 0; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.service-icon svg { width: 100%; height: 100%; stroke: var(--red); fill: none; stroke-width: 1.5; }
.service-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; line-height: 1.15; color: white; }
.service-desc { color: rgba(255, 255, 255, 0.6); font-size: 0.88rem; line-height: 1.6; }
.service-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 1rem;
  color: var(--red); text-decoration: none; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; transition: gap 0.3s;
}
.service-cta:hover { gap: 10px; }
.service-arrow { margin-top: 1.5rem; color: var(--red); font-size: 1.2rem; opacity: 0; transform: translateX(-8px); transition: all 0.4s; }
.service:hover .service-arrow { opacity: 1; transform: translateX(0); }

/* === CONTACT === */
.contact { padding: 8rem 2.5rem 4rem; background: var(--off-white); position: relative; }
.contact-inner { max-width: 1400px; margin: 0 auto; }
.contact-header { margin-bottom: 3.5rem; text-align: center; }
.contact-header .section-tag { justify-content: center; }
.contact-title .red { color: var(--red); font-style: italic; }
.contact-intro { max-width: 620px; margin: 1rem auto 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: stretch; }
.contact-info { background: white; padding: 2.5rem; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 1.75rem; }
.info-block { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.info-block:last-child { border-bottom: none; padding-bottom: 0; }
.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-icon {
  width: 36px; height: 36px; background: var(--red); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.info-icon svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 1.8; }
.info-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.info-value { font-size: 1rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; text-decoration: none; display: block; line-height: 1.45; transition: color 0.3s; }
.info-value-sub { font-size: 0.85rem; font-weight: 400; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
a.info-value:hover { color: var(--red); }
.brn-badge {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; color: var(--mute); background: var(--off-white);
  padding: 3px 8px; border-radius: 3px; margin-top: 6px; letter-spacing: 0.05em;
}

.contact-form { background: var(--ink); color: white; padding: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.form-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: white; }
.form-title .red { color: var(--red); font-style: italic; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.form-field input, .form-field textarea {
  background: transparent; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: white; padding: 0.6rem 0; font-family: 'Archivo', sans-serif; font-size: 1rem;
  outline: none; transition: border-color 0.3s; resize: none; width: 100%;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.form-field input:focus, .form-field textarea:focus { border-color: var(--red); }
.submit-btn {
  background: var(--red); color: white; border: none; padding: 1rem 1.5rem;
  font-family: 'Archivo', sans-serif; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer;
  margin-top: 0.5rem; transition: background 0.3s;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
}
.submit-btn:hover { background: var(--red-dark); }

.form-notice {
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.form-notice.success { background: rgba(0, 166, 81, 0.15); border: 1px solid #00a651; color: #00d974; }
.form-notice.error { background: rgba(255, 22, 22, 0.15); border: 1px solid var(--red); color: #ff6b6b; }

/* === MAP === */
.map-section { margin-top: 4rem; }
.map-wrap { margin-top: 1.5rem; border: 1px solid var(--line); height: 450px; overflow: hidden; position: relative; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(30%) contrast(1.05); }
.map-label {
  position: absolute; top: 1.5rem; left: 1.5rem; background: white;
  padding: 1rem 1.25rem; border-left: 3px solid var(--red);
  font-size: 0.85rem; z-index: 2; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); max-width: 290px;
}
.map-label strong { display: block; font-weight: 700; margin-bottom: 4px; color: var(--ink); font-size: 0.95rem; }
.map-label span { color: var(--mute); font-size: 0.78rem; line-height: 1.5; }
.map-directions {
  display: inline-block; margin-top: 10px; color: var(--red);
  text-decoration: none; font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.map-directions:hover { text-decoration: underline; }

/* === FOOTER === */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.6); padding: 3rem 2.5rem 2rem; text-align: center; font-size: 0.82rem; }
.foot-logo-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 0.75rem; }
.foot-logo-img { height: 32px; width: auto; filter: brightness(1.1); }
.foot-logo-text { color: white; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.03em; }
.site-footer .tagline { color: rgba(255, 255, 255, 0.8); margin-bottom: 1rem; font-size: 0.95rem; }
.site-footer .copy { margin-top: 0.5rem; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }

/* === RFQ / CUSTOM PARTS REQUEST PAGE === */
.rfq-hero {
  padding: 9rem 2.5rem 4rem;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.rfq-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top right, black 20%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at top right, black 20%, transparent 60%);
  pointer-events: none;
}
.rfq-hero-inner { max-width: 1000px; margin: 0 auto; position: relative; text-align: center; }
.rfq-hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.035em; margin-bottom: 1.25rem; }
.rfq-hero-title .red { color: var(--red); font-style: italic; }
.rfq-hero-sub { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.7; max-width: 640px; margin: 0 auto; }

.rfq-section { padding: 4rem 2.5rem 6rem; background: var(--off-white); }
.rfq-section-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: start; }

.rfq-sidebar {
  background: var(--ink);
  color: white;
  padding: 2.5rem;
  position: sticky;
  top: 100px;
}
.rfq-sidebar h3 {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 1rem; color: white;
}
.rfq-sidebar h3 .red { color: var(--red); font-style: italic; }
.rfq-sidebar p {
  color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; line-height: 1.7;
  margin-bottom: 1.25rem;
}
.rfq-benefits { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.rfq-benefits li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem; color: rgba(255, 255, 255, 0.85);
}
.rfq-benefits li:last-child { border-bottom: none; }
.rfq-benefits svg { width: 14px; height: 14px; stroke: var(--red); fill: none; stroke-width: 2.5; flex-shrink: 0; margin-top: 4px; }

.rfq-form-card {
  background: white;
  padding: 2.5rem;
  border: 1px solid var(--line);
}
.rfq-form-card .form-title {
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.rfq-form-card .form-title .red { color: var(--red); font-style: italic; }
.rfq-form-card .form-subtitle {
  color: var(--mute); font-size: 0.9rem; margin-bottom: 1.5rem;
}
.rfq-form { display: flex; flex-direction: column; gap: 1.25rem; }
.rfq-form .form-field label { color: var(--mute); }
.rfq-form .form-field input,
.rfq-form .form-field textarea {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.rfq-form .form-field input::placeholder,
.rfq-form .form-field textarea::placeholder { color: rgba(10, 10, 10, 0.3); }
.rfq-form .form-field input:focus,
.rfq-form .form-field textarea:focus { border-color: var(--red); }

.rfq-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.rfq-required { color: var(--red); }

/* === REVEAL ANIMATIONS === */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* === TABLET === */
@media (max-width: 1100px) and (min-width: 901px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}

/* === MOBILE === */
@media (max-width: 900px) {
  .nav { padding: 0.85rem 1.25rem; }
  .nav-links { display: none; }
  .logo-img { height: 32px; }
  .hero { padding: 6rem 1.5rem 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about { padding: 5rem 1.5rem; }
  .about-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .services { grid-template-columns: 1fr; }
  .contact { padding: 5rem 1.5rem 3rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info, .contact-form { padding: 1.75rem; }
  .marquee-track { font-size: 1.2rem; gap: 2rem; }
  .marquee-track span { gap: 2rem; }
  .map-label { max-width: calc(100% - 3rem); }
  .rfq-section-inner { grid-template-columns: 1fr; }
  .rfq-sidebar { position: static; }
  .rfq-form-row { grid-template-columns: 1fr; }
  .rfq-hero { padding: 7rem 1.5rem 3rem; }
  .rfq-section { padding: 3rem 1.5rem 5rem; }
  .rfq-sidebar, .rfq-form-card { padding: 1.75rem; }
}
