/*!
Theme Name: 5th Order AI
Theme URI: https://5thorderindustry.ai/
Author: 5th Order Industry
Author URI: https://5thorderindustry.com/
Description: Custom theme for the 5th Order AI website
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: fifthorderai
*/

:root {
  --red: #c1121f;
  --red-bright: #e63946;
  --gold: #f4a261;
  --gold-bright: #ffb703;
  --dark: #080a0e;
  --dark-2: #0d1117;
  --dark-3: #151b22;
  --dark-4: #1c242d;
  --steel: #2a3441;
  --steel-light: #3d4f63;
  --white: #f0f4f8;
  --muted: #8a9bb0;
  --accent-green: #2d6a4f;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dark);
  color: var(--white);
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: default;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

.custom-logo {
  height: auto;
  max-width: 116px;
  width: 100%;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  height: 70px;
  background: rgba(8, 10, 14, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(193, 18, 31, 0.3);
}

.custom-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-cta a {
  background: var(--red);
  color: white !important;
  padding: 0.5rem 1.4rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s !important;
}

.nav-cta a:hover {
  background: var(--red-bright) !important;
}

/* === HERO === */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 100px 4rem 200px 4rem;
  overflow: hidden;
}

/* Gear background art */
.hero-gear {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  opacity: 0.04;
  animation: slowSpin 60s linear infinite;
}

.hero-gear-2 {
  position: absolute;
  right: 200px;
  top: 10%;
  width: 200px;
  height: 200px;
  opacity: 0.06;
  animation: slowSpin 30s linear infinite reverse;
}

@keyframes slowSpin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.hero-gear-2 {
  animation: slowSpin2 30s linear infinite reverse;
}

@keyframes slowSpin2 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Grid lines */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(193, 18, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(193, 18, 31, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 0.8s ease both;
}

.hero-eyebrow::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--red);
}

.hero-headline {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 9vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  max-width: 900px;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-headline h1,
.hero-headline h2,
.hero-headline h3,
.hero-headline h4,
.hero-headline h5,
.hero-headline h6 {
  font-size: 1em;
}

.hero-subhead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3rem;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  animation: fadeUp 0.8s 0.45s ease both;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  background: var(--red);
  padding: 1rem 2.5rem;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  transition:
    background 0.2s,
    transform 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
}

.btn-secondary {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s;
}

.btn-secondary:hover {
  color: var(--white);
}

.btn-secondary::after {
  content: "→";
  transition: transform 0.2s;
}

.btn-secondary:hover::after {
  transform: translateX(4px);
}

.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-3);
  border-top: 1px solid var(--steel);
  display: flex;
  animation: fadeUp 0.8s 0.6s ease both;
}

.hero-stat {
  flex: 1;
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--steel);
  position: relative;
}

.hero-stat:last-child {
  border-right: none;
}

.hero-stat-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.4rem;
  color: var(--red);
  line-height: 1;
  display: block;
}

.hero-stat-label {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.hero-video {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.hero-video video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

section {
  padding: 6rem 4rem;
}

.section-eyebrow {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.section-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1rem;
}

.section-title h1,
.section-title h2,
.section-title h3,
.section-title h4,
.section-title h5,
.section-title h6 {
  font-size: 1em;
}

.section-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 3.5rem;
}

.platforms-section {
  background: var(--dark-2);
  position: relative;
}

.platforms-section::before {
  content: "CORE PLATFORMS";
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg) translateX(50%);
  font-family: "Bebas Neue", sans-serif;
  font-size: 5rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
}

.platforms-label {
  display: inline-block;
  background: var(--red);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  margin-bottom: 3rem;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--steel);
  border: 1px solid var(--steel);
}

.platform-card {
  background: var(--dark-3);
  display: block;
  padding: 2rem;
  position: relative;
  text-decoration: none;
  transition: background 0.25s;
  overflow: hidden;
  cursor: pointer;
}

.platform-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 0.35s ease;
}

.platform-card:hover {
  background: var(--dark-4);
}
.platform-card:hover::before {
  width: 100%;
}

.platform-card-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--steel-light);
  margin-bottom: 1rem;
}

.platform-card-name {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--white);
  line-height: 1.15;
}

.platform-card-url {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.platform-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.platform-tag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  background: rgba(193, 18, 31, 0.15);
  border: 1px solid rgba(193, 18, 31, 0.3);
  color: var(--red);
}

.platform-tag.spec {
  background: rgba(244, 162, 97, 0.1);
  border-color: rgba(244, 162, 97, 0.3);
  color: var(--gold);
}

.capabilities-section {
  background: var(--dark);
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--steel);
}

.cap-card {
  background: var(--dark-2);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.cap-card::after {
  content: attr(data-icon);
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.05;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0;
  pointer-events: none;
}

.cap-icon {
  width: 48px;
  height: 48px;
  background: var(--dark-4);
  border: 1px solid var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  font-size: 1.25rem;
}

.cap-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: var(--gold-bright);
}

.cap-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.trust-section {
  background: var(--dark-3);
  padding: 5rem 4rem;
  border-top: 1px solid var(--steel);
  border-bottom: 1px solid var(--steel);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--steel);
  margin-top: 3rem;
}

.trust-item {
  background: var(--dark-4);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.trust-icon {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.trust-label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.trust-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.cta-section {
  background: var(--dark);
  padding: 8rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(193, 18, 31, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .section-title {
  font-size: clamp(3rem, 7vw, 6rem);
  margin-bottom: 1.5rem;
}

.cta-section .section-desc {
  margin: 0 auto 3rem;
  text-align: center;
  max-width: 500px;
}

.cta-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--steel-light);
  padding: 1rem 2.5rem;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  transition:
    border-color 0.2s,
    color 0.2s;
}

.btn-outline:hover {
  border-color: var(--white);
}

footer {
  background: var(--dark-2);
  border-top: 1px solid var(--steel);
  padding: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand-name {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.footer-brand-name span {
  color: var(--red);
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--steel);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.footer-links a::before {
  content: "›";
  color: var(--red);
  font-size: 1rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--steel);
  font-size: 0.75rem;
  color: var(--steel-light);
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
}

.footer-bottom a {
  color: var(--red);
  text-decoration: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 3rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--steel);
}

.divider-diamond {
  width: 8px;
  height: 8px;
  background: var(--red);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.ticker {
  background: var(--red);
  padding: 0.6rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  animation: ticker 30s linear infinite;
  gap: 0;
}

.ticker-item {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0 2.5rem 0 0;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.ticker-item::after {
  content: "◆";
  font-size: 0.4rem;
  opacity: 0.7;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  nav {
    padding: 0 1.5rem;
  }
  .nav-links {
    display: none;
  }
  section {
    padding: 4rem 1.5rem;
  }
  .hero {
    padding: 100px 1.5rem 5rem;
  }
  .hero-headline {
    font-size: clamp(3rem, 12vw, 5rem);
  }
  .hero-stats {
    position: static;
    margin-top: 3rem;
    flex-wrap: wrap;
  }
  .hero-stat {
    flex: 1 1 50%;
  }
  .platforms-grid {
    grid-template-columns: 1fr;
  }
  .cap-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}