/* ============================================================
   Zappflux — developer landing
   electric · playful · cosmic
   ============================================================ */

:root {
  /* --- Color (OKLCH, neutrals tinted toward violet) --- */
  --bg:            oklch(0.16 0.035 285);
  --bg-deep:       oklch(0.12 0.03 286);
  --surface:       oklch(0.22 0.04 288);
  --ink:           oklch(0.96 0.012 290);
  --ink-soft:      oklch(0.78 0.02 290);
  --ink-faint:     oklch(0.62 0.022 290);
  --line:          oklch(0.34 0.03 290 / 0.6);

  --magenta:       oklch(0.66 0.25 350);
  --violet:        oklch(0.58 0.24 300);
  --blue:          oklch(0.62 0.20 250);
  --spark:         oklch(0.82 0.16 72);   /* warm amber — the rare accent */
  --spark-ink:     oklch(0.24 0.08 70);

  /* --- Type --- */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;

  /* --- 4pt spacing scale --- */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;

  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(120% 90% at 80% 0%, var(--bg) 30%, var(--bg-deep) 100%);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; }

/* ============================================================
   Living gradient field
   ============================================================ */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.85;
  will-change: transform;
  mix-blend-mode: screen;
}

.blob--magenta {
  width: 46vmax; height: 46vmax;
  top: -14vmax; right: -8vmax;
  background: radial-gradient(circle at 50% 50%, var(--magenta), transparent 68%);
  animation: drift-a 19s ease-in-out infinite alternate;
}
.blob--violet {
  width: 40vmax; height: 40vmax;
  top: -6vmax; right: 14vmax;
  background: radial-gradient(circle at 50% 50%, var(--violet), transparent 66%);
  animation: drift-b 23s ease-in-out infinite alternate;
}
.blob--blue {
  width: 38vmax; height: 38vmax;
  top: 8vmax; right: -12vmax;
  background: radial-gradient(circle at 50% 50%, var(--blue), transparent 66%);
  animation: drift-c 27s ease-in-out infinite alternate;
}
.blob--spark {
  width: 13vmax; height: 13vmax;
  top: 2vmax; right: 30vmax;
  background: radial-gradient(circle at 50% 50%, var(--spark), transparent 60%);
  opacity: 0.45;
  animation: drift-b 17s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(5vmax, 7vmax, 0) scale(0.94); } }
@keyframes drift-c { from { transform: translate3d(0,0,0) scale(0.96); } to { transform: translate3d(-4vmax, -4vmax, 0) scale(1.1); } }

/* Film grain — kills the flat "AI gradient" look */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Page scaffold
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 5vw, 3.5rem);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-2xl);
}

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark__bolt {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  color: var(--spark-ink);
  background: var(--spark);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.12), 0 6px 18px oklch(0.82 0.16 72 / 0.35);
}

.topbar__contact {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.topbar__contact:hover { color: var(--ink); border-color: var(--spark); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  align-self: center;
  max-width: 54rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7.4vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero__title-accent { color: var(--spark); }

.hero__lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero__actions {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.25s ease, background 0.25s ease;
}
.btn--primary {
  color: var(--spark-ink);
  background: var(--spark);
  box-shadow: 0 8px 26px oklch(0.82 0.16 72 / 0.32);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px oklch(0.82 0.16 72 / 0.45);
}
.btn__icon { transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1); }
.btn--primary:hover .btn__icon { transform: translateX(4px); }

/* ---- Status chip ---- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.status__pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 0 0 oklch(0.82 0.16 72 / 0.7);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(0.82 0.16 72 / 0.55); }
  70%  { box-shadow: 0 0 0 10px oklch(0.82 0.16 72 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.82 0.16 72 / 0); }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-faint);
}
.footer__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: oklch(0.22 0.04 288 / 0.4);
  letter-spacing: 0.01em;
}
.footer__meta { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.footer__meta a { text-decoration: none; color: var(--ink-soft); transition: color 0.25s ease; }
.footer__meta a:hover { color: var(--ink); }
.footer__dot { color: var(--ink-faint); }

/* ============================================================
   Entrance motion (one orchestrated load)
   ============================================================ */
.hero__eyebrow,
.hero__title,
.hero__lede,
.hero__actions { animation: rise 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.hero__eyebrow { animation-delay: 0.05s; }
.hero__title   { animation-delay: 0.14s; }
.hero__lede    { animation-delay: 0.26s; }
.hero__actions { animation-delay: 0.38s; }

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 560px) {
  .page { gap: var(--space-xl); }
  .topbar__contact { display: none; }
  .hero__actions { gap: var(--space-md); flex-direction: column; align-items: flex-start; }
  .footer { justify-content: flex-start; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .blob,
  .status__pulse,
  .hero__eyebrow,
  .hero__title,
  .hero__lede,
  .hero__actions { animation: none; }
  .btn { transition: none; }
}
