/* ==========================================================================
   zilk.ai — brand system: Midnight Ink / Zilk Cyan / Electric Indigo
   Typography: Sora (display) · Inter (body) · JetBrains Mono (labels)
   ========================================================================== */

:root {
  --ink: #050B1A;            /* Midnight Ink — page canvas */
  --cobalt: #0B1F4D;         /* Cobalt Core — panels, borders */
  --cyan: #22D3EE;           /* Zilk Cyan — primary accent */
  --indigo: #6366F1;         /* Electric Indigo — secondary accent */
  --violet: #A855F7;         /* Pulse Violet — tertiary accent */
  --text: #E6ECF8;
  --text-dim: #93A1BC;
  --text-faint: #5C6A85;
  --panel: rgba(11, 31, 77, 0.22);
  --line: rgba(34, 211, 238, 0.14);
  --line-strong: rgba(34, 211, 238, 0.35);
  --grad: linear-gradient(120deg, var(--cyan), var(--indigo));
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1180px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

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

/* Dotted-grid backdrop — brand signature */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(34, 211, 238, 0.10) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7DE7F7; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ---------- typography ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }

.display {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.035em;
}

h2.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
h3 { font-size: 1.35rem; }

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

.lede { color: var(--text-dim); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 640px; }

/* mono eyebrow label — telemetry style */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--grad);
}

/* vertical cyan rail on section heads — brand signature */
.rail { border-left: 2px solid var(--cyan); padding-left: 26px; }

/* diamond bullets — brand signature */
ul.diamonds { list-style: none; }
ul.diamonds li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 11px;
  color: var(--text-dim);
}
ul.diamonds li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 7px; height: 7px;
  background: var(--grad);
  transform: rotate(45deg);
}
ul.diamonds li strong { color: var(--text); font-weight: 600; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 11, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo img, .logo svg { height: 34px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--grad);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}
.btn-primary {
  background: var(--grad);
  color: #04101e !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(34, 211, 238, 0.45); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text) !important;
  background: rgba(34, 211, 238, 0.05);
}
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.12); transform: translateY(-2px); }
.nav .btn { padding: 9px 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  color: var(--cyan);
  font-size: 1.2rem;
  line-height: 1;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}
.hero .glow {
  position: absolute;
  width: 720px; height: 720px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
}
.hero .glow.g1 { background: var(--cyan); top: -340px; right: -180px; }
.hero .glow.g2 { background: var(--indigo); bottom: -420px; left: -240px; opacity: 0.18; }

.hero .display { max-width: 850px; margin-bottom: 26px; }
.hero .lede { margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* telemetry stat strip */
.stat-strip {
  margin-top: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stat {
  padding: 26px 28px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 6px;
}

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

section { padding: 92px 0; position: relative; }
section.tight { padding: 64px 0; }
.section-head { margin-bottom: 56px; }
.section-head .lede { margin-top: 6px; }

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  position: relative;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 30px rgba(34, 211, 238, 0.07);
}
.card:hover::after { opacity: 1; }

.card .icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  color: var(--cyan);
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-dim); font-size: 0.97rem; }
.card .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.05);
  white-space: nowrap;
}
.tag.violet { color: var(--violet); border-color: rgba(168, 85, 247, 0.25); background: rgba(168, 85, 247, 0.06); }
.tag.indigo { color: #9aa0ff; border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.08); }

.card .more { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; font-weight: 600; font-size: 0.92rem; }
.card .more::after { content: "→"; transition: transform 0.2s; }
.card:hover .more::after { transform: translateX(4px); }

/* ---------- product feature sections (products page) ---------- */

.product-block {
  border-top: 1px solid var(--line);
  padding: 84px 0;
  scroll-margin-top: 90px;
}
.product-block .inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
}
.product-block.flip .inner > .p-side { order: -1; }

.p-kicker {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.p-kicker .idx {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  letter-spacing: 0.15em;
}
.p-kicker .idx b { color: var(--cyan); font-weight: 500; }

.product-block h3.p-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 8px; }
.p-pitch { color: var(--cyan); font-weight: 600; font-size: 1.05rem; margin-bottom: 18px; font-family: var(--font-display); }
.product-block p.desc { color: var(--text-dim); margin-bottom: 26px; }

.spec-strip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 11, 26, 0.55);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 28px;
}
.spec-strip span b { color: var(--cyan); font-weight: 500; }

.p-side .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 30px;
}
.p-side .panel h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}

/* ---------- process timeline (services) ---------- */

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px 22px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 14px;
}
.step h4 { font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.86rem; color: var(--text-dim); }

/* ---------- CTA band ---------- */

.cta-band {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 120% at 85% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 120% at 10% 100%, rgba(34, 211, 238, 0.14), transparent 60%),
    var(--panel);
  padding: 70px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 560px; }
.cta-band p { color: var(--text-dim); margin-top: 10px; max-width: 520px; }

/* ---------- team (about) ---------- */

.person { text-align: left; }
.person .avatar {
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #04101e;
  margin-bottom: 20px;
}
.person .role {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 4px;
}

/* ---------- contact form ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }

form .field { margin-bottom: 22px; }
form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 9px;
}
form input, form select, form textarea {
  width: 100%;
  background: rgba(5, 11, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
form textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-note { font-size: 0.85rem; color: var(--text-faint); margin-top: 14px; }

.alert {
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  display: none;
}
.alert.show { display: block; }
.alert-ok { background: rgba(34, 211, 238, 0.08); border: 1px solid var(--line-strong); color: var(--cyan); }
.alert-err { background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.35); color: #fda4af; }

.contact-channels .ch {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.contact-channels .ch:first-child { padding-top: 0; }
.contact-channels .ch .icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
}
.contact-channels h4 { font-size: 1.02rem; margin-bottom: 3px; }
.contact-channels p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  margin-top: 40px;
  background: rgba(5, 11, 26, 0.7);
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid .blurb { color: var(--text-faint); font-size: 0.92rem; margin-top: 18px; max-width: 300px; }
.footer-grid h5 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 11px; }
.footer-grid li a { color: var(--text-dim); font-size: 0.93rem; }
.footer-grid li a:hover { color: var(--cyan); }

.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.z-glyph { font-family: var(--font-mono); color: var(--cyan); letter-spacing: 0.1em; }

/* ---------- reveal animation ---------- */

/* hidden state only when JS is running (html.js set by main.js) — no-JS users see everything */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- page hero (inner pages) ---------- */

.page-hero { padding: 84px 0 30px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.03em; margin-bottom: 18px; max-width: 760px; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .product-block .inner { grid-template-columns: 1fr; gap: 36px; }
  .product-block.flip .inner > .p-side { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 44px 30px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(5, 11, 26, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 28px 24px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 0; font-size: 1.05rem; }
  .nav-links a.active::after { display: none; }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle { display: block; }
  .hero { padding: 70px 0 60px; }
  section { padding: 64px 0; }
}
