/* ==========================================================
   codedata5 — landing page styles
   ========================================================== */

:root {
  --bg: #0b0b0f;
  --surface: #14141b;
  --surface-2: #1b1b24;
  --ink: #f4f1ea;
  --muted: #a09eac;
  --line: rgba(244, 241, 234, 0.09);

  --lime: #d4ff3a;
  --coral: #ff5b3a;
  --violet: #8b6cff;
  --sky: #3ad1ff;

  --radius: 18px;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1240px;

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  /* blueprint grid */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -0.03em; }
p { margin: 0; }

::selection { background: var(--lime); color: var(--bg); }

/* ---------- shared bits ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 10px; height: 10px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(212, 255, 58, 0.15);
}

.lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); max-width: 560px; }

.hl {
  position: relative;
  white-space: nowrap;
  color: var(--bg);
  padding: 0 0.12em;
  z-index: 0;
}
.hl::before {
  content: "";
  position: absolute;
  inset: 0.08em -0.02em 0.02em;
  background: var(--lime);
  transform: skew(-8deg);
  z-index: -1;
}
.hl-alt::before { background: var(--coral); border-radius: 999px; transform: none; }

.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.btn {
  --b: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  background: var(--b);
  color: var(--bg);
  font-weight: 600;
  border: 2px solid var(--b);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--coral);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--coral); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--coral); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; transform: translateY(-2px); }
.btn-small { padding: 10px 18px; font-size: 15px; box-shadow: 3px 3px 0 var(--coral); }
.btn-dark { --b: var(--bg); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); font-size: clamp(16px, 2vw, 20px); }
.btn-dark:hover { box-shadow: 9px 9px 0 var(--ink); }

/* ---------- logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.logo em { font-style: normal; color: var(--lime); }
.logo-mark { position: relative; width: 28px; height: 28px; }
.logo-mark i,
.logo-mark b { position: absolute; display: block; }
.logo-mark i { left: 0; top: 0; width: 17px; height: 17px; background: var(--lime); }
.logo-mark b {
  right: 0; bottom: 0; width: 17px; height: 17px;
  background: var(--coral); border-radius: 50%;
  mix-blend-mode: screen;
  transition: transform 0.4s;
}
.logo:hover .logo-mark b { transform: translate(-11px, -11px); }

/* the "5" badge in the logo */
.logo-word { display: inline-flex; align-items: center; }
.logo-five {
  display: inline-grid;
  place-items: center;
  width: 1.15em; height: 1.15em;
  margin-left: 0.18em;
  background: var(--coral);
  color: var(--bg);
  font-size: 0.82em;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--lime);
  transform: translateY(-0.28em) rotate(-12deg);
  transition: transform 0.6s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.3s;
}
.logo:hover .logo-five {
  transform: translateY(-0.28em) rotate(348deg) scale(1.12);
  box-shadow: -2px 2px 0 var(--violet);
}

/* the "5" inside running text */
.b5 {
  display: inline-block;
  font-weight: 700;
  font-style: italic;
  padding-right: 0.08em;
  background: linear-gradient(135deg, var(--coral), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(11, 11, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); transition: color 0.2s; position: relative; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink);
  transition: transform 0.3s, top 0.3s;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 120px) var(--gutter) clamp(64px, 8vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6.4vw, 86px);
  font-weight: 700;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 540px;
  justify-self: center;
}
.shape { position: absolute; transition: translate 0.25s ease-out; }

.hero-art { container-type: inline-size; }
.s-five {
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 105cqw;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(244, 241, 234, 0.6);
  z-index: 1;
  user-select: none;
  pointer-events: none;
  animation: five-pulse 7s ease-in-out infinite;
}
@keyframes five-pulse {
  50% { -webkit-text-stroke-color: rgba(212, 255, 58, 0.75); scale: 1.03; }
}

.s-circle {
  width: 58%; aspect-ratio: 1; right: 4%; top: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff8a6e, var(--coral) 60%);
}
.s-half {
  width: 34%; aspect-ratio: 2 / 1; left: 2%; bottom: 10%;
  background: var(--lime);
  border-radius: 999px 999px 0 0;
}
.s-triangle {
  width: 30%; aspect-ratio: 1; left: 6%; top: 4%;
  background: var(--violet);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: spin 22s linear infinite;
}
.s-ring {
  width: 76%; aspect-ratio: 1; left: 12%; top: 12%;
  border: 2px dashed rgba(244, 241, 234, 0.25);
  border-radius: 50%;
  animation: spin 60s linear infinite reverse;
}
.s-square {
  width: 18%; aspect-ratio: 1; right: 6%; bottom: 4%;
  border: 3px solid var(--sky);
  animation: spin 14s linear infinite;
}
.s-dots {
  width: 30%; aspect-ratio: 1; right: 0; top: 52%;
  background-image: radial-gradient(var(--ink) 1.6px, transparent 1.8px);
  background-size: 16px 16px;
  opacity: 0.35;
}
.s-zigzag {
  width: 26%; left: 38%; top: 0;
  fill: none; stroke: var(--lime); stroke-width: 4; stroke-linejoin: miter;
}
.s-hex {
  width: 15%; left: 42%; bottom: 0;
  fill: none; stroke: var(--coral); stroke-width: 5;
  animation: float 6s ease-in-out infinite;
}

.code-card {
  position: absolute;
  z-index: 2;
  left: 10%; right: 10%; top: 38%;
  background: rgba(20, 20, 27, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: translate 0.25s ease-out;
}
.code-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a46; }
.code-bar i:nth-child(1) { background: var(--coral); }
.code-bar i:nth-child(2) { background: var(--lime); }
.code-bar i:nth-child(3) { background: var(--sky); }
.code-bar span { margin-left: 8px; }
.code-card pre {
  margin: 0; padding: 16px 18px;
  font-family: var(--mono);
  font-size: clamp(11px, 1.15vw, 13.5px);
  line-height: 1.7;
  color: var(--ink);
  overflow-x: auto;
}
.code-card .k { color: var(--violet); }
.code-card .v { color: var(--sky); }
.code-card .s { color: var(--lime); }
.code-card .n { color: var(--coral); }
.code-card .f { color: #ffd23a; }
.caret {
  display: inline-block; width: 8px; height: 1.1em;
  background: var(--lime); vertical-align: text-bottom; margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--lime);
  color: var(--bg);
  transform: rotate(-2deg);
  margin: 0 -20px;
}
.marquee-track {
  display: flex; align-items: center; gap: 32px;
  width: max-content;
  padding: 18px 0;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  animation: marquee 32s linear infinite;
}
.marquee-track i { font-style: normal; font-size: 0.6em; }

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 150px) var(--gutter) 0;
}
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section h2,
.cta h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 700; }

/* services cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  padding: 32px 28px 72px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  right: -60px; top: -60px;
  background: var(--c);
  opacity: 0.08;
  border-radius: 50%;
  transition: transform 0.5s ease, opacity 0.3s;
}
.card:hover { transform: translateY(-8px); border-color: var(--c); }
.card:hover::before { transform: scale(2.6); opacity: 0.14; }
.card-icon {
  width: 60px; height: 60px; margin-bottom: 28px;
  fill: none; stroke: var(--ink); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.card-icon .fill { fill: var(--c); stroke: none; }
.card h3 { font-size: 23px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15.5px; position: relative; }
.card-num {
  position: absolute; left: 28px; bottom: 24px;
  font-family: var(--mono); font-size: 13px; color: var(--c);
}

/* process */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: s;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; left: 30px; right: 30px; top: 30px;
  border-top: 2px dashed rgba(244, 241, 234, 0.18);
}
.step { position: relative; padding-right: 12px; }
.step-shape {
  display: block; width: 60px; height: 60px; margin-bottom: 26px;
  position: relative; z-index: 1;
  transition: transform 0.4s;
}
.step:hover .step-shape { transform: rotate(45deg) scale(1.08); }
.sh-circle { background: var(--coral); border-radius: 50%; }
.sh-triangle { background: var(--lime); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sh-square { background: var(--violet); border-radius: 6px; }
.sh-hex { background: var(--sky); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.step h3 { font-size: 26px; margin: 8px 0 12px; }
.step p { color: var(--muted); font-size: 15.5px; }

/* why */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.why-title h2 { margin-bottom: 26px; }
.why-title { position: sticky; top: 110px; }
.why-list { list-style: none; margin: 0; padding: 0; }
.why-list li {
  display: flex; gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.why-list li:first-child { border-top: 1px solid var(--line); }
.why-list b {
  flex: none;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--lime); font-size: 18px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.why-list li:hover b { background: var(--lime); color: var(--bg); transform: rotate(-8deg); }
.why-list h3 { font-size: 21px; margin-bottom: 6px; }
.why-list p { color: var(--muted); font-size: 15.5px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  max-width: var(--max);
  margin: clamp(90px, 12vw, 160px) auto 0;
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--max) - 2 * var(--gutter));
  padding: clamp(56px, 8vw, 110px) clamp(24px, 6vw, 80px);
  background: var(--lime);
  color: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  text-align: center;
}
.cta .hl { color: var(--lime); }
.cta .hl::before { background: var(--bg); }
.cta p { font-size: clamp(16px, 1.6vw, 19px); margin: 22px auto 36px; max-width: 520px; opacity: 0.8; }
.cta-inner { position: relative; z-index: 1; }
.cta-shapes span { position: absolute; display: block; }
.cta-shapes .c1 {
  width: 220px; height: 220px; left: -70px; top: -70px;
  border: 3px solid var(--bg); border-radius: 50%; opacity: 0.15;
}
.cta-shapes .c2 {
  width: 140px; height: 140px; right: 6%; bottom: -50px;
  background: var(--coral); border-radius: 50%;
}
.cta-shapes .c3 {
  width: 90px; height: 90px; right: 12%; top: 14%;
  background: var(--bg); clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: spin 18s linear infinite;
}
.cta-shapes .c4 {
  width: 70px; height: 70px; left: 9%; bottom: 14%;
  border: 3px solid var(--bg); transform: rotate(20deg);
  animation: float 5s ease-in-out infinite;
}

/* ---------- footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px var(--gutter) 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.to-top {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.to-top:hover { background: var(--lime); color: var(--bg); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .steps .reveal:nth-child(2), .why-list .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards .reveal:nth-child(3), .steps .reveal:nth-child(3), .why-list .reveal:nth-child(3) { transition-delay: 0.2s; }
.cards .reveal:nth-child(4), .steps .reveal:nth-child(4), .why-list .reveal:nth-child(4) { transition-delay: 0.3s; }
.why-list .reveal:nth-child(5) { transition-delay: 0.4s; }

/* ---------- keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { translate: 0 -14px; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .steps::before { display: none; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 460px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-title { position: static; }

  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 81px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 28px var(--gutter) 36px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s;
    pointer-events: none;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section-head h2 br { display: none; }
  .cards, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .code-card { left: 4%; right: 4%; }
  .footer { flex-direction: column; text-align: center; }
  .cta { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
