/* ============================================================
   APEEX — Custom Dark Theme
   Brand: Red #D9173A | Amber #F5A500 | Dark #0A0A0A
   ============================================================ */

/* === Custom Properties === */
:root {
  --ap-red:        #D9173A;
  --ap-red-glow:   rgba(217, 23, 58, 0.25);
  --ap-amber:      #F5A500;
  --ap-amber-glow: rgba(245, 165, 0, 0.25);
  --ap-dark:       #0A0A0A;
  --ap-dark-2:     #101010;
  --ap-dark-3:     #161616;
  --ap-card:       #1A1A1A;
  --ap-border:     #262626;
  --ap-border-2:   #333333;
  --ap-text:       #F0F0F0;
  --ap-muted:      #888888;
  --ap-mono:       'JetBrains Mono', 'Courier New', monospace;
  --ap-sans:       'Space Grotesk', 'Inter', system-ui, sans-serif;
  --nav-h:         72px;
}

/* === Reset / Base === */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ap-sans);
  background-color: var(--ap-dark);
  color: var(--ap-text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* === Utility === */
.text-red   { color: var(--ap-red)   !important; }
.text-amber { color: var(--ap-amber) !important; }
.mono       { font-family: var(--ap-mono); }

/* === Scroll-Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#mainNav {
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
#mainNav.scrolled {
  background: rgba(10, 10, 10, 0.97);
  border-bottom-color: var(--ap-border);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
}
#mainNav .navbar-brand img {
  height: 36px;
  /* // remove  */
  background: #ffffff;
  border-radius: 8px;
  padding: 3px 8px;
}

#mainNav .nav-link {
  color: var(--ap-muted) !important;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.9rem !important;
  position: relative;
  transition: color 0.2s;
}
#mainNav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--ap-red);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  border-radius: 1px;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--ap-text) !important;
}
#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
  transform: scaleX(1);
}

#mainNav .nav-cta {
  color: var(--ap-red) !important;
  font-weight: 600;
}
#mainNav .nav-cta:hover { color: #ff3b5c !important; }
#mainNav .nav-cta::after { background: var(--ap-red); }

#mainNav .navbar-toggler {
  border: 1px solid var(--ap-border);
  color: var(--ap-text);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  background: transparent;
  line-height: 1;
}
#mainNav .navbar-toggler:focus { box-shadow: none; outline: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--ap-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

/* Big red glow top-right */
.hero::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,23,58,0.16) 0%, transparent 68%);
  top: -250px;
  right: -200px;
  pointer-events: none;
}
/* Amber glow bottom-left */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,165,0,0.09) 0%, transparent 68%);
  bottom: -200px;
  left: -150px;
  pointer-events: none;
}

/* Floating code particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cp {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--ap-mono);
  font-size: var(--s);
  color: rgba(240,240,240,0.065);
  animation: cpFloat 9s ease-in-out infinite;
  animation-delay: var(--d);
  user-select: none;
  white-space: nowrap;
}
@keyframes cpFloat {
  0%, 100% { transform: translateY(0)   rotate(0deg);   opacity: 0.065; }
  50%       { transform: translateY(-18px) rotate(2.5deg); opacity: 0.13; }
}

.hero-content { position: relative; z-index: 2; }

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(217,23,58,0.1);
  border: 1px solid rgba(217,23,58,0.3);
  color: var(--ap-red);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* Main headline */
.hero-heading {
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero-outline {
  -webkit-text-stroke: 2px rgba(240,240,240,0.45);
  color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ap-muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* CTA Buttons */
.btn-red {
  background: var(--ap-red);
  border: 2px solid var(--ap-red);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-red:hover {
  background: #c0142f;
  border-color: #c0142f;
  color: #fff;
  box-shadow: 0 8px 28px var(--ap-red-glow);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  border: 2px solid var(--ap-border-2);
  color: var(--ap-text);
  font-weight: 600;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-ghost:hover {
  border-color: var(--ap-text);
  background: rgba(255,255,255,0.05);
  color: var(--ap-text);
  transform: translateY(-2px);
}

/* Mascot card */
.mascot-card {
  position: relative;
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  border-radius: 24px;
  padding: 2.5rem 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 0 100px rgba(217,23,58,0.1);
  animation: mascotFloat 5s ease-in-out infinite;
  max-width: 360px;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}
.mascot-glow {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(217,23,58,0.3), rgba(245,165,0,0.2), transparent 60%);
  z-index: -1;
  filter: blur(12px);
  opacity: 0.6;
}
.mascot-img {
  width: 100%;
  max-width: 240px;
  display: block;
  margin: 0 auto;
  /* // remove */
  background: #ffffff;
  border-radius: 16px;
  padding: 0.75rem;
}
.mascot-tag {
  margin-top: 1.25rem;
  font-family: var(--ap-mono);
  font-size: 0.82rem;
  color: var(--ap-amber);
  background: rgba(245,165,0,0.1);
  border: 1px solid rgba(245,165,0,0.2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
}
.mascot-stat-row {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ap-border);
}
.mascot-stat { display: flex; flex-direction: column; align-items: center; }
.stat-n {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ap-text);
  line-height: 1;
}
.stat-l {
  font-size: 0.68rem;
  font-family: var(--ap-mono);
  color: var(--ap-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--ap-muted);
  font-size: 1.1rem;
  text-decoration: none;
  display: block;
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section-dark   { background: var(--ap-dark);   padding: 6rem 0; }
.section-darker { background: var(--ap-dark-2); padding: 6rem 0; }

.section-header { text-align: center; margin-bottom: 4rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--ap-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ap-red);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.section-sub { color: var(--ap-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

/* Shared tag row */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}
.tag-row span {
  font-family: var(--ap-mono);
  font-size: 0.7rem;
  color: var(--ap-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ap-border-2);
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  padding: 1.9rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(217,23,58,0.06) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}
.service-card:hover {
  border-color: rgba(217,23,58,0.5);
  transform: translateY(-5px);
  box-shadow: 0 18px 52px rgba(217,23,58,0.1);
}
.service-card:hover::before { opacity: 1; }

.service-card.featured {
  border-color: rgba(217,23,58,0.4);
  background: linear-gradient(140deg, rgba(217,23,58,0.07) 0%, var(--ap-card) 50%);
}

.svc-icon {
  width: 50px;
  height: 50px;
  background: var(--ap-red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 18px var(--ap-red-glow);
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}
.service-card p { color: var(--ap-muted); font-size: 0.9rem; line-height: 1.7; margin: 0; }

/* ============================================================
   PORTFOLIO CARDS
   ============================================================ */
.portfolio-card {
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  transition: border-color 0.25s, transform 0.25s;
}
.portfolio-card:hover {
  border-color: var(--ap-amber);
  transform: translateY(-5px);
}
.port-logo {
  background: var(--ap-dark-3);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border-bottom: 1px solid var(--ap-border);
}
.port-logo img {
  max-height: 72px;
  max-width: 180px;
  object-fit: contain;
}
.port-body { padding: 1.5rem; }
.port-body h4 { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.5rem; }
.port-body p { color: var(--ap-muted); font-size: 0.9rem; line-height: 1.65; }

.port-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ap-amber);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: color 0.2s;
}
.port-link:hover { color: #ffcc44; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--ap-red), var(--ap-amber), transparent);
}

.tl-item {
  position: relative;
  padding: 0 0 3rem 2.5rem;
}
.tl-dot {
  position: absolute;
  left: -5px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ap-red);
  border: 2px solid var(--ap-dark);
  box-shadow: 0 0 14px var(--ap-red-glow);
}
.tl-dot-amber {
  background: var(--ap-amber);
  box-shadow: 0 0 14px var(--ap-amber-glow);
}
.tl-year {
  font-family: var(--ap-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ap-red);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}
.tl-card {
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
}
.tl-card-amber { border-color: rgba(245,165,0,0.35); }
.tl-card h4 { font-weight: 700; font-size: 0.98rem; margin-bottom: 0.3rem; }
.tl-card p  { color: var(--ap-muted); font-size: 0.88rem; line-height: 1.65; margin: 0; }

.tl-end { padding-left: 2.5rem; }
.tl-end-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ap-red), var(--ap-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 0 48px rgba(217,23,58,0.35);
}

/* ============================================================
   TEAM CARDS
   ============================================================ */
.team-card {
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
}
.team-card:hover {
  border-color: rgba(217,23,58,0.5);
  transform: translateY(-5px);
}
.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--ap-border-2);
  transition: border-color 0.25s;
}
.team-card:hover .team-avatar { border-color: var(--ap-red); }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-card h4 { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.team-role {
  font-size: 0.78rem;
  color: var(--ap-red);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.team-socials { margin-top: 1rem; }
.team-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ap-border-2);
  color: var(--ap-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.team-socials a:hover {
  background: var(--ap-red);
  color: #fff;
  border-color: var(--ap-red);
}

/* ============================================================
   LOGOS BAND
   ============================================================ */
.logos-band {
  background: var(--ap-dark-3);
  border-top: 1px solid var(--ap-border);
  border-bottom: 1px solid var(--ap-border);
  padding: 3rem 0;
}
.logos-eyebrow {
  text-align: center;
  font-family: var(--ap-mono);
  font-size: 0.72rem;
  color: var(--ap-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}
.logos-row img {
  height: 28px;
  opacity: 0.28;
  filter: invert(1) brightness(2);
  transition: opacity 0.25s;
}
.logos-row img:hover { opacity: 0.65; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form .form-control {
  background: var(--ap-card);
  border: 1px solid var(--ap-border);
  color: var(--ap-text);
  border-radius: 8px;
  padding: 0.8rem 1.05rem;
  font-family: var(--ap-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form .form-control:focus {
  border-color: var(--ap-red);
  box-shadow: 0 0 0 3px var(--ap-red-glow);
  background: var(--ap-card);
  color: var(--ap-text);
  outline: none;
}
.contact-form .form-control::placeholder { color: var(--ap-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #060606;
  border-top: 1px solid var(--ap-border);
  padding: 3.5rem 0 1.75rem;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand img  { height: 30px; margin-bottom: 0.7rem; display: block; }
.footer-brand p    { color: var(--ap-muted); font-size: 0.83rem; margin: 0; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a {
  color: var(--ap-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--ap-text); }

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ap-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--ap-red); }

.footer-bottom {
  border-top: 1px solid var(--ap-border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--ap-muted);
  font-size: 0.8rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  #mainNav .navbar-collapse {
    background: rgba(10,10,10,0.97);
    border-top: 1px solid var(--ap-border);
    padding: 1rem 0;
    margin-top: 0.5rem;
  }
  #mainNav .nav-link { padding: 0.6rem 1.5rem !important; }
}

@media (max-width: 768px) {
  .hero { padding-top: calc(var(--nav-h) + 0.5rem); }
  .hero-heading { font-size: 2.4rem; }
  .hero-outline { -webkit-text-stroke: 1.5px rgba(240,240,240,0.4); }
  .hero-cta .btn { width: 100%; display: block; margin: 0 !important; }
  .hero-cta { gap: 0.75rem !important; }
  .section-dark, .section-darker { padding: 4rem 0; }
  .footer-top { flex-direction: column; }
  .logos-row { gap: 2rem; }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 2rem; }
  .mascot-card { padding: 1.75rem 1.5rem 1.5rem; }
}
