/* ============================================================
   VekX — diagnostic workbench design system
   Palette
     --ink      #0d1219  deep charcoal-blue (workbench under lamp)
     --ink-2    #131b25  raised surface
     --ink-3    #1b2531  card / border base
     --amber    #f0a64a  solder / warm lamp glow (primary accent)
     --amber-hi #ffc579  highlight
     --teal     #5fd6c4  diagnostic signal (secondary)
     --paper    #e8ecf1  near-white text
     --mut      #8a97a6  muted text
   ============================================================ */

:root {
  --ink: #0d1219;
  --ink-2: #131b25;
  --ink-3: #1b2531;
  --line: #263241;
  --amber: #f0a64a;
  --amber-hi: #ffc579;
  --teal: #5fd6c4;
  --paper: #e8ecf1;
  --mut: #8a97a6;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1140px;
  --r: 14px;
}

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

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

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .hero-illustration .spin { transform: translate(330px,70px); }
}

#circuit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

main, .nav, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 48px);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, padding .3s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-mark { color: var(--amber); transform: translateY(1px); }
.brand .x, .x { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: .92rem; }
.nav-links a { color: var(--mut); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--paper); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--amber);
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600;
  transition: transform .15s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px var(--amber); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--paper); border-radius: 2px; transition: .25s; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .25s, background .2s, border-color .2s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--amber); }
.btn-ghost { border-color: var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-hi); }
.btn.full { width: 100%; }

/* ---------- HERO ---------- */
.hero { padding: clamp(120px, 16vh, 180px) clamp(18px, 5vw, 48px) clamp(60px, 9vh, 110px); max-width: var(--maxw); margin: 0 auto; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(30px, 5vw, 70px); align-items: center; }

.eyebrow { font-family: var(--mono); font-size: .82rem; color: var(--teal); letter-spacing: .04em; display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; text-transform: uppercase; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 22px; }
.hero h1 .accent { color: var(--amber); }
.lede { font-size: clamp(1rem, 1.4vw, 1.16rem); color: var(--mut); max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 26px; font-size: .92rem; color: var(--mut); }
.hero-trust strong { color: var(--paper); font-family: var(--display); }

/* readout card */
/* hero visual column: illustration above readout */
.hero-visual { display: flex; flex-direction: column; gap: 18px; }
.hero-illustration {
  background: radial-gradient(120% 120% at 70% 0%, color-mix(in srgb, var(--amber) 9%, var(--ink-2)), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
}
.hero-illustration svg { width: 100%; height: auto; display: block; }
.hero-illustration .float { animation: floaty 5s ease-in-out infinite; transform-origin: center; }
.hero-illustration .tool { animation: floaty 6s ease-in-out infinite reverse; }
.hero-illustration .spin { animation: slowspin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes slowspin { to { transform: translate(330px,70px) rotate(360deg); } }

/* optional real photo (see index.html drop-in zone) */
.hero-photo {
  width: 100%; height: auto; display: block;
  border-radius: var(--r); border: 1px solid var(--line);
  aspect-ratio: 4/3; object-fit: cover;
}

.readout {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px #000, inset 0 1px 0 rgba(255,255,255,.03);
}
.readout-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--amber) 6%, transparent); }
.readout-led { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.readout-title { font-family: var(--mono); font-size: .82rem; letter-spacing: .05em; color: var(--amber-hi); }
.readout-body { padding: 20px 18px; font-family: var(--mono); font-size: .9rem; min-height: 132px; }
.readout-body p { margin-bottom: 10px; }
.rk { color: var(--mut); }
.rk::after { content: " :"; }
.rv { color: var(--paper); }
.rv.ok { color: var(--teal); }
.readout-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .76rem; color: var(--mut); letter-spacing: .04em; }

/* ---------- SECTIONS ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 10vh, 110px) clamp(18px, 5vw, 48px); }
.section.alt { max-width: none; background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 46px; max-width: 60ch; }
.kicker { font-family: var(--mono); font-size: .8rem; color: var(--amber); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.section h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -.02em; line-height: 1.1; }
.sub { color: var(--mut); margin-top: 14px; font-size: 1.05rem; }

/* ---------- CARDS (services / projects) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.section.alt .card { background: var(--ink-3); }
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.card:hover::before { transform: scaleX(1); }
.card-num { font-family: var(--mono); font-size: .8rem; color: var(--amber); margin-bottom: 14px; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-top .card-num { margin-bottom: 0; }
.svc-icon-wrap {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 11px;
  background: color-mix(in srgb, var(--amber) 10%, var(--ink-3));
  border: 1px solid color-mix(in srgb, var(--amber) 22%, var(--line));
  color: var(--amber);
  transition: background .25s, color .25s;
}
.card:hover .svc-icon-wrap { background: var(--amber); color: var(--ink); }
.svc-icon { width: 24px; height: 24px; }
.card h3 { font-family: var(--display); font-size: 1.18rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.card p { color: var(--mut); font-size: .95rem; }
.project-link { margin-top: 16px; }
.project-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.project-link a, .project-link-btn {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: .85rem; font-weight: 500;
  color: var(--amber);
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--line));
  background: color-mix(in srgb, var(--amber) 7%, transparent);
  transition: background .2s, transform .15s;
}
.project-link a:hover, .project-link-btn:hover { background: var(--amber); color: var(--ink); transform: translateX(2px); }

/* ---------- PRODUCTS ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.product {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ink-3);
  transition: border-color .2s, background .2s, transform .15s;
  overflow: hidden;
}
.product:hover { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 6%, var(--ink-3)); transform: translateY(-3px); }
.product-img {
  aspect-ratio: 4/3;
  border-radius: 9px;
  overflow: hidden;
  background: var(--ink-2);
  margin-bottom: 4px;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-img.placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--amber) 8%, var(--ink-2)), var(--ink-2));
  border: 1px dashed var(--line);
}
.product-img.placeholder .pi { font-size: 2.1rem; opacity: .9; }
.product h4 { font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 0 4px; }
.product > span { color: var(--mut); font-size: .82rem; padding: 0 4px 4px; }
.shop-note { margin-top: 26px; color: var(--mut); }

/* devices for sale */
.devices-head { margin-top: 52px; margin-bottom: 24px; }
.devices-head h3 { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.devices-head .sub { margin-top: 8px; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.device {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  background: var(--ink-3); display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, transform .15s;
}
.device:hover { border-color: var(--amber); transform: translateY(-3px); }
.device-img { aspect-ratio: 1/1; border-radius: 9px; overflow: hidden; background: var(--ink-2); }
.device-img img { width: 100%; height: 100%; object-fit: cover; }
.device h4 { font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 0 4px; margin-top: 4px; }
.device > span { color: var(--mut); font-size: .82rem; padding: 0 4px; }
.device-cta { font-family: var(--mono); font-size: .82rem; color: var(--amber); padding: 6px 4px 2px; font-weight: 500; }
.device-cta:hover { color: var(--amber-hi); }
.shop-note a { color: var(--amber); border-bottom: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }

/* ---------- PROOF ---------- */
.proof-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.proof-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shot {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, var(--ink-3) 0 12px, var(--ink-2) 12px 24px);
  display: flex;
  align-items: flex-end;
}
.shot .tag { font-family: var(--mono); font-size: .72rem; padding: 6px 10px; margin: 10px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--teal); border: 1px solid var(--line); position: relative; z-index: 2; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.shot.placeholder::after {
  content: "add photo";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .78rem; color: var(--mut); letter-spacing: .05em;
}

.testimonials { display: flex; flex-direction: column; gap: 14px; }
.quote { background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 10px; padding: 18px 20px; }
.quote p { font-size: .98rem; }
.quote .who { font-family: var(--mono); font-size: .8rem; color: var(--mut); margin-top: 10px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.badge { font-family: var(--mono); font-size: .8rem; color: var(--teal); padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; background: color-mix(in srgb, var(--teal) 5%, transparent); }

/* ---------- ABOUT + SKILLS ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 64px); }
.about-copy h2 { margin-bottom: 18px; }
.about-copy p { color: var(--mut); margin-bottom: 16px; max-width: 56ch; }
.about-copy p:first-of-type { color: var(--paper); }

.skills { border: 1px solid var(--line); border-radius: var(--r); padding: 26px; background: var(--ink-2); align-self: start; }
.skill-tier { margin-top: 22px; }
.skill-tier:first-of-type { margin-top: 16px; }
.skill-tier::before { content: attr(data-tier); font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); display: block; margin-bottom: 12px; }
.skill-tier[data-tier="Intermediate"]::before { color: var(--teal); }
.skill-tier[data-tier="Beginner"]::before { color: var(--mut); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: .85rem; padding: 7px 12px; border-radius: 8px; background: var(--ink-3); border: 1px solid var(--line); color: var(--paper); }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: start; }
.contact-form { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.section.alt .contact-form { background: var(--ink); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .85rem; color: var(--mut); font-family: var(--mono); letter-spacing: .03em; }
.field input, .field select, .field textarea {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--body);
  font-size: .98rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 18%, transparent);
}
.field textarea { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { margin-top: 14px; font-size: .9rem; font-family: var(--mono); min-height: 1.2em; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #ff8b6b; }

.contact-side { display: flex; flex-direction: column; gap: 12px; }
.contact-line {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  background: var(--ink); transition: border-color .2s, transform .15s;
}
.contact-line:hover { border-color: var(--amber); transform: translateY(-2px); }
.cl-label { font-family: var(--mono); font-size: .76rem; color: var(--mut); letter-spacing: .05em; text-transform: uppercase; }
.cl-value { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.socials a { font-family: var(--mono); font-size: .82rem; padding: 9px 13px; border: 1px solid var(--line); border-radius: 100px; color: var(--mut); transition: .2s; }
.socials a:hover { color: var(--amber); border-color: var(--amber); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px clamp(18px, 5vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; max-width: var(--maxw); margin: 0 auto; }
.foot-brand { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.foot-meta { color: var(--mut); font-size: .88rem; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: var(--teal); color: var(--ink);
  font-family: var(--display); font-weight: 700;
  padding: 14px 20px; border-radius: 100px;
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--teal) 70%, transparent);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
/* fallback: if JS hasn't enhanced the page, content stays fully visible */
html.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .hero-grid, .proof-wrap, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .readout { order: -1; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 0;
    flex-direction: column; align-items: flex-start;
    gap: 4px; padding: 90px 28px 28px;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    transform: translateY(-100%); transition: transform .3s; height: auto;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.1rem; padding: 10px 0; width: 100%; }
  .nav-cta { display: inline-block; margin-top: 8px; }
  .nav-toggle { display: flex; z-index: 51; }
  .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); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .hero-trust { gap: 18px; }
}
