/* ==========================================================================
   Djov — mobile-first stylesheet
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --bg-alt: #0f1219;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --muted: #9aa3b2;
  --brand: #4fb3e0;
  --brand-2: #ffcb58;
  --brand-ink: #06121a;
  --success: #4ade80;
  --danger: #f87171;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 20px;
  --maxw: 1140px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.gradient-text {
  background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: linear-gradient(100deg, var(--brand), #7cc8ea);
  color: var(--brand-ink);
  box-shadow: 0 8px 30px -10px rgba(79, 179, 224, 0.6);
}
.btn--primary:hover { box-shadow: 0 10px 40px -8px rgba(79, 179, 224, 0.8); transform: translateY(-1px); }
.btn--ghost { border-color: var(--border-strong); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-hover); border-color: rgba(255,255,255,.3); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Nav -------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background-color .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 13, 18, 0.75);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* The logo artwork is black on transparent; invert it for the dark theme */
.brand__logo { height: 34px; width: auto; filter: invert(1); }
.nav__links { display: none; gap: 32px; }
.nav__links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .5;
}
.hero__glow {
  position: absolute; top: -180px; left: 50%; translate: -50% 0;
  width: 720px; max-width: 140vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,179,224,.28), rgba(255,203,88,.08) 45%, transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.hero__title { font-size: clamp(2.1rem, 9.6vw, 5rem); font-weight: 700; }
.hero__lead { margin-top: 20px; max-width: 580px; font-size: 1.075rem; color: var(--muted); }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; width: 100%; }
/* Sections --------------------------------------------------------------- */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head--center { margin-inline: auto; text-align: center; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section h2 { font-size: clamp(1.9rem, 6.5vw, 2.75rem); }
.section__lead { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }

/* Cards ------------------------------------------------------------------ */
.grid { display: grid; gap: 16px; }
.card {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* Who ------------------------------------------------------------------- */
.split { display: grid; gap: 40px; }
.prose { display: grid; gap: 16px; margin-top: 20px; color: var(--muted); font-size: 1.075rem; }
.prose em { color: var(--text); font-style: italic; }
.lists { display: grid; gap: 16px; }
.list-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.list-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.list-card li { padding: 6px 0; color: var(--muted); border-top: 1px solid var(--border); }
.list-card li:first-child { border-top: 0; }
.aside { color: var(--muted); font-size: 0.875rem; opacity: .75; }

/* Stack ------------------------------------------------------------------ */
.stack { margin-top: 48px; }
.stack h3 { font-size: 1.05rem; margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  padding: 9px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border-strong); background: var(--surface);
}

/* How it goes ----------------------------------------------------------- */
.how { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.how h3 { font-size: 1.05rem; margin-bottom: 16px; }
.how ol { display: grid; gap: 10px; counter-reset: how; }
.how ol li { counter-increment: how; display: flex; gap: 14px; align-items: baseline; font-size: 1.1rem; }
.how ol li::before { content: counter(how); font: 600 0.85rem var(--font-display); color: var(--brand-2); min-width: 1.2em; }
.how .aside { margin-top: 16px; }

/* Contact ---------------------------------------------------------------- */
.contact { display: grid; gap: 40px; }
.contact__list { display: grid; gap: 16px; margin-top: 28px; }
.contact__list li { display: flex; flex-direction: column; }
.contact__label { font-size: 0.8rem; color: var(--muted); }
.contact__list a { font-weight: 600; text-decoration: none; font-size: 1.1rem; }
.contact__list a:hover { color: var(--brand); }

.form {
  display: grid; gap: 16px; padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.form__row { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 500; }
.field em { color: var(--muted); font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  font: inherit; font-size: 16px; /* 16px prevents iOS zoom on focus */
  font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,179,224,.2);
}
.field .is-invalid, .field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.4em; font-size: 0.9rem; text-align: center; }
.form__status.is-success { color: var(--success); }
.form__status.is-error { color: var(--danger); }

/* Footer ----------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.875rem; }
.footer__inner { display: flex; flex-direction: column; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Reveal on scroll ------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* 404 -------------------------------------------------------------------- */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.notfound img { width: 200px; margin: 0 auto 24px; }
.notfound h1 { font-size: clamp(3.5rem, 18vw, 6rem); }
.notfound p { color: var(--muted); margin: 12px 0 28px; }

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 560px) {
  .hero__actions { flex-direction: row; width: auto; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px; }
  .grid--3, .lists { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  :root { --gutter: 32px; }
  .nav__links { display: flex; }
  .brand__logo { height: 40px; }
  .hero { padding: 110px 0 120px; }
  .section { padding: 112px 0; }
  .section__head { margin-bottom: 56px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { padding: 28px; }
  .split { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
  .lists { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .contact__intro { position: sticky; top: 110px; }
  .footer__inner { flex-direction: row; justify-content: space-between; }
}

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

.tags .tag--hl { border-color: rgba(79,179,224,.45); background: rgba(79,179,224,.1); color: #bfe6f7; }
.section__lead strong { color: var(--text); font-weight: 600; }
