/*
Theme Name: AltraCode
Theme URI: https://altracode.com
Author: AltraCode
Author URI: https://altracode.com
Description: Custom one-page theme for AltraCode — a digital solutions & software development studio.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: altracode
*/

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; overscroll-behavior-x: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif; margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #05060b;
  --bg-alt: #0a0c14;
  --surface: rgba(255,255,255,0.045);
  --surface-solid: #10121c;
  --border: rgba(255,255,255,0.09);
  --text: #f3f4f8;
  --muted: #97a0b5;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --gradient: linear-gradient(120deg, #7c5cff 0%, #22d3ee 100%);
  --radius: 18px;
  --container: 1180px;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; position: relative; }
.section-head { max-width: 640px; margin: 0 auto 64px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--accent2);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 20px; letter-spacing: 0.02em;
}
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 17px; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.btn-primary { background: var(--gradient); color: #05060b; box-shadow: 0 8px 30px -8px rgba(124,92,255,0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(124,92,255,0.8); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Background texture
   ========================================================================== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; z-index: 0; pointer-events: none;
  animation: float 16s ease-in-out infinite;
}
.blob-1 { width: 480px; height: 480px; background: #7c5cff; top: -160px; left: -120px; }
.blob-2 { width: 420px; height: 420px; background: #22d3ee; top: 200px; right: -160px; animation-delay: -6s; }
.blob-3 { width: 380px; height: 380px; background: #ff5cad; bottom: -140px; left: 30%; opacity: 0.25; animation-delay: -3s; }
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px,-40px) scale(1.08); }
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5,6,11,0.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border); padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 15px; color: #05060b; font-weight: 700;
}
.brand span.accent { color: var(--accent2); }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .btn { padding: 11px 22px; font-size: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: 200px 0 140px; z-index: 1; }
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; margin-bottom: 24px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.hero-tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; background: var(--surface);
}

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; z-index: 1; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; transition: transform .3s ease, border-color .3s ease, background .3s ease;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(400px circle at 0% 0%, rgba(124,92,255,0.14), transparent 60%);
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(124,92,255,0.4); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 50px; height: 50px; border-radius: 13px; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(124,92,255,0.18), rgba(34,211,238,0.12));
  border: 1px solid rgba(124,92,255,0.3);
  display: flex; align-items: center; justify-content: center; color: var(--accent2);
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 15px; }

/* ==========================================================================
   Tech Stack marquee
   ========================================================================== */
.tech-stack { padding-bottom: 100px; }
.marquee-wrap {
  position: relative; overflow: hidden; padding: 8px 0; margin-bottom: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-row { display: flex; gap: 16px; width: max-content; will-change: transform; }
.marquee-row.left { animation: marquee-left 34s linear infinite; }
.marquee-row.right { animation: marquee-right 38s linear infinite; }
.marquee-wrap:hover .marquee-row { animation-play-state: paused; }
@keyframes marquee-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-row.left, .marquee-row.right { animation: none; }
}
.tech-chip {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 14px 24px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15.5px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.tech-chip:hover { border-color: rgba(124,92,255,0.5); background: rgba(255,255,255,0.06); transform: translateY(-3px); }
.tech-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }

/* ==========================================================================
   About / Why us
   ========================================================================== */
.about { position: relative; z-index: 1; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-copy .eyebrow { margin-bottom: 20px; }
.about-copy h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 20px; }
.about-copy p { color: var(--muted); font-size: 16.5px; margin-bottom: 20px; }
.feature-list { display: grid; gap: 18px; }
.feature-item { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.feature-item .ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--gradient);
  display: flex; align-items: center; justify-content: center; color: #05060b;
}
.feature-item h4 { font-size: 16px; margin-bottom: 4px; }
.feature-item p { color: var(--muted); font-size: 14.5px; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { position: relative; z-index: 1; }
.process-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; }
.process-step { position: relative; padding: 30px 20px; text-align: center; }
.process-step .num {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 18px;
  border: 1px solid var(--border); background: var(--surface-solid);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; color: var(--accent2); font-size: 15px;
}
.process-step h4 { font-size: 15.5px; margin-bottom: 8px; }
.process-step p { color: var(--muted); font-size: 13.5px; }
.process-line { position: absolute; top: 23px; left: 50%; width: 100%; height: 1px; background: linear-gradient(90deg, var(--border), transparent); z-index: -1; }
.process-step:last-child .process-line { display: none; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { position: relative; z-index: 1; }
.cta-box {
  border-radius: 28px; padding: 64px 48px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(124,92,255,0.16), rgba(34,211,238,0.08));
  border: 1px solid rgba(124,92,255,0.3);
}
.cta-box h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 14px; }
.cta-box p { color: var(--muted); margin-bottom: 32px; font-size: 16.5px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { position: relative; z-index: 1; }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
.contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.contact-info h3 { font-size: 21px; margin-bottom: 12px; }
.contact-info > p { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.contact-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.contact-row:first-of-type { border-top: none; }
.contact-row .ico {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.3);
  display: flex; align-items: center; justify-content: center; color: var(--accent2);
}
.contact-row .label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.contact-row a, .contact-row span.value { font-size: 15.5px; font-weight: 600; }
.contact-row a:hover { color: var(--accent2); }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; color: var(--text); font-family: inherit; font-size: 14.5px; outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: rgba(255,255,255,0.06); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; z-index: 1; padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; margin-top: 14px; max-width: 320px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 16px; }
.footer-col a, .footer-col span { display: block; font-size: 14.5px; margin-bottom: 10px; color: var(--text); }
.footer-col a:hover { color: var(--accent2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-ghost, .nav-cta .btn-primary { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .hero { padding: 150px 0 90px; }
  .footer-top { flex-direction: column; }
  /* Hide large decorative blobs on small screens to avoid horizontal overflow */
  .blob { display: none; }
}
@media (max-width: 480px) {
  .process-track { grid-template-columns: 1fr; }
}

/* Mobile nav drawer */
body.nav-open .mobile-drawer { right: 0; }
.mobile-drawer {
  position: fixed; top: 0; right: -100%; bottom: 0; width: 78%; max-width: 320px; z-index: 200;
  background: var(--surface-solid); border-left: 1px solid var(--border);
  transition: right .3s ease;
  padding: 90px 32px 32px; display: flex; flex-direction: column; gap: 26px;
}
.mobile-drawer a { font-size: 17px; font-weight: 500; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
body.nav-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
