/* ============================================================
   Macizo Technologies — style.css
   Dark, bold, AI-forward. Headings: Space Grotesk, body: Inter.
   ============================================================ */

:root {
  --bg: #06080f;
  --bg-alt: #0a0e1a;
  --surface: #101626;
  --surface-2: #151c30;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --gradient: linear-gradient(100deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { color: var(--muted); }

a { color: var(--accent); text-decoration: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--gradient);
  color: #04121a;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(34, 211, 238, 0.35); }

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn-small { padding: 10px 20px; font-size: 0.9rem; }
.btn-wide { justify-content: center; width: 100%; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(6, 8, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-accent { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 14s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; background: #164e63; top: -120px; right: -80px; }
.orb-2 { width: 420px; height: 420px; background: #312e81; bottom: -140px; left: -100px; animation-delay: -7s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.1); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.hero-sub {
  font-size: 1.15rem;
  max-width: 520px;
  margin: 24px 0 32px;
}
.hero-sub strong { color: var(--text); }
.hero-sub em { color: var(--accent); font-style: normal; font-weight: 600; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stats dt {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stats dt::after { content: "+"; color: var(--accent); }
.hero-stats dd { font-size: 0.9rem; color: var(--muted); }

/* Hero visual: code card */

.hero-visual { position: relative; }

.code-card {
  background: rgba(16, 22, 38, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.code-card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #34d399; }
.code-card-title {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
}

.code-card-body {
  padding: 22px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #cbd5e1;
  overflow-x: auto;
}
.c-kw { color: #818cf8; }
.c-str { color: #34d399; }
.c-const { color: #fbbf24; }
.c-com { color: #64748b; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
}
.float-chip svg { width: 18px; height: 18px; color: var(--accent); }
.chip-1 { top: -22px; right: 12px; animation-delay: -2s; }
.chip-2 { bottom: -18px; left: -8px; animation-delay: -4s; }

/* ---------- Marquee ---------- */

.marquee {
  border-block: 1px solid var(--border);
  padding: 20px 0;
  overflow: hidden;
  background: var(--bg-alt);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track { display: flex; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes scroll { to { transform: translateX(-50%); } }

.marquee-list { display: flex; list-style: none; }
.marquee-list li {
  padding: 8px 20px;
  margin: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-head);
}

/* ---------- Sections ---------- */

.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-head p { margin-top: 16px; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Service cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.card h3 { margin: 20px 0 10px; }
.card p { font-size: 0.95rem; }

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(129, 140, 248, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.card-icon svg { width: 26px; height: 26px; color: var(--accent); }

.card-featured { border-color: rgba(129, 140, 248, 0.45); background: linear-gradient(180deg, rgba(129, 140, 248, 0.08), var(--surface) 60%); }
.card-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---------- Split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.split-copy h2 { margin-bottom: 18px; }
.split-copy p + p { margin-top: 14px; }
.split-copy .btn { margin-top: 32px; }

.check-list { list-style: none; margin: 28px 0 0; display: grid; gap: 18px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.check-list li strong { color: var(--text); }
.check-list svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  border-radius: 50%;
  padding: 3px;
}

/* Pipeline SVG */

.pipeline {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
}
.pipe-label {
  fill: var(--text);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
}
.pipe-label-strong { font-size: 17px; }
.pipe-sub { fill: var(--muted); font-family: var(--font-body); font-size: 11px; }
.pipe-flow { animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -10; } }

/* ---------- Process steps ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.step:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.4); }

.step-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}
.step h3 { margin: 12px 0 8px; }
.step p { font-size: 0.92rem; }

/* ---------- Stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); }

.stat dt {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat dt::after { content: "+"; }
.stat dd { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

/* ---------- Contact ---------- */

.contact-wrap { max-width: 720px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  display: grid;
  gap: 22px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.contact-form label { display: grid; gap: 8px; }
.contact-form label span { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #475569; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.form-note { text-align: center; font-size: 0.9rem; }

.form-status {
  text-align: center;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--text); }

.footer-note { font-size: 0.85rem; color: #64748b; }
.footer-note a { color: var(--muted); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .code-card, .float-chip, .marquee-track, .pipe-flow, .caret, .badge-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 72px; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 56px; }
  .split-reverse .split-visual { order: -1; }
}

@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .hero { padding-top: 120px; }
  .hero-stats { gap: 32px; }
  .cards-grid, .steps, .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form { padding: 28px 22px; }
  .float-chip { display: none; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 74px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 8, 15, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-cta { margin-top: 18px; justify-content: center; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-stats dt { font-size: 1.6rem; }
}
