/* ==========================================================
   vuktod.cloud — Tesla dashboard
   ========================================================== */

:root {
  --bg: #0a0d12;
  --bg-2: #0f141b;
  --panel: rgba(18, 24, 33, 0.72);
  --panel-solid: #121821;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e6edf3;
  --muted: #8b98a8;
  --dim: #5b6776;
  --accent: #38f2a5;
  --accent-2: #5cc8ff;
  --warn: #f5c451;
  --danger: #ff6b6b;
  --radius: 14px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(56, 242, 165, .25); color: #fff; }

a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--font-mono); }
code {
  font-size: .88em;
  padding: .12em .4em;
  border-radius: 6px;
  background: rgba(92, 200, 255, .08);
  color: var(--accent-2);
}
.dim { color: var(--dim); }
.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -1;
  width: 900px; height: 600px;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(56,242,165,.14), rgba(92,200,255,.06) 55%, transparent);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translateX(-56%) translateY(0); }
  to   { transform: translateX(-44%) translateY(40px); }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 13, 18, .7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--font-mono); font-size: .92rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(56,242,165,.35);
}
.nav { display: flex; gap: .25rem; }
.nav a {
  position: relative;
  padding: .45rem .8rem;
  font-size: .9rem;
  color: var(--muted);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(148,163,184,.08); }
.nav a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

.section { padding: clamp(4rem, 9vw, 7rem) 0 0; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-index {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--accent);
  padding: .2rem .55rem;
  border: 1px solid rgba(56,242,165,.3);
  border-radius: 6px;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
.section-note { color: var(--muted); font-size: .92rem; margin: -1rem 0 1.6rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 3rem 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 1.4rem;
  padding: .35rem .8rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  animation: fadeUp .8s var(--ease) both;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(56,242,165,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(56,242,165,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(56,242,165,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,242,165,0); }
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  animation: fadeUp .9s .1s var(--ease) both;
}
.lead {
  max-width: 34rem;
  margin: 1.4rem 0 2rem;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--muted);
  animation: fadeUp .9s .2s var(--ease) both;
}
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; animation: fadeUp .9s .3s var(--ease) both; }

.btn {
  display: inline-flex; align-items: center;
  padding: .75rem 1.25rem;
  font-weight: 600; font-size: .95rem;
  border-radius: 10px;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), #2ad7c9);
  box-shadow: 0 8px 30px -8px rgba(56,242,165,.55);
}
.btn-primary:hover { box-shadow: 0 12px 36px -8px rgba(56,242,165,.75); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(56,242,165,.06); }

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

/* ---------- Terminal ---------- */
.terminal {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(8, 11, 15, .88);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(56,242,165,.04), 0 0 60px -20px rgba(56,242,165,.2);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .75rem 1rem;
  background: rgba(148,163,184,.05);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.terminal-title { margin-left: auto; margin-right: auto; font-family: var(--font-mono); font-size: .78rem; color: var(--dim); transform: translateX(-20px); }
.terminal-body {
  margin: 0;
  padding: 1.2rem 1.3rem 1.4rem;
  min-height: 330px;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.75;
  color: #c9d4df;
  white-space: pre-wrap;
  word-break: break-word;
}
.t-prompt { color: var(--accent); }
.t-path { color: var(--accent-2); }
.t-ok { color: var(--accent); }
.t-warn { color: var(--warn); }
.t-dim { color: var(--dim); }
.cursor {
  display: inline-block;
  width: .55em; height: 1.1em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.about-text p { margin: 0 0 1.15rem; color: #c3ccd6; }
.about-text strong { color: var(--text); }
.about-lead { font-size: 1.22rem; line-height: 1.6; color: var(--text) !important; font-weight: 500; }

.about-card, .stat, .service, .principles li, .log, .partnership {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.about-card { padding: 1.4rem 1.5rem; position: sticky; top: 96px; }
.card-head { margin-bottom: .9rem; font-size: .82rem; }
.kv { margin: 0; display: grid; gap: .1rem; }
.kv div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .92rem;
}
.kv div:last-child { border-bottom: 0; }
.kv dt { font-family: var(--font-mono); color: var(--dim); font-size: .84rem; }
.kv dd { margin: 0; text-align: right; color: var(--text); }

.partnership {
  display: flex; gap: 1.5rem; align-items: flex-start;
  margin-top: 2rem;
  padding: 1.8rem;
  border-color: rgba(56,242,165,.18);
  background: linear-gradient(135deg, rgba(56,242,165,.06), rgba(92,200,255,.04) 60%, rgba(18,24,33,.7));
}
.partnership-icon {
  flex: none;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(56,242,165,.08);
  border: 1px solid rgba(56,242,165,.2);
}
.partnership-icon svg { width: 34px; height: 34px; }
.partnership h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.partnership p { margin: 0; color: #c3ccd6; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; transition: border-color .25s, transform .25s var(--ease); }
.stat:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-label { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.stat-value { font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 600; color: var(--text); }
.stat-sub { font-size: .85rem; color: var(--muted); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.service {
  position: relative;
  padding: 1.5rem;
  overflow: hidden;
  transition: border-color .3s, transform .3s var(--ease);
}
.service::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(56,242,165,.09), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.service:hover { border-color: rgba(56,242,165,.28); transform: translateY(-3px); }
.service:hover::before { opacity: 1; }
.service-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.service-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(56,242,165,.08);
  border: 1px solid rgba(56,242,165,.18);
}
.service h3 { margin-bottom: .45rem; }
.service p { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.service-meta { font-size: .76rem; color: var(--dim); }

.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .6rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(92,200,255,.08);
  border: 1px solid rgba(92,200,255,.2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.up   { color: var(--accent); background: rgba(56,242,165,.08); border-color: rgba(56,242,165,.25); }
.badge.warn { color: var(--warn);   background: rgba(245,196,81,.08); border-color: rgba(245,196,81,.25); }
.badge.down { color: var(--danger); background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.25); }

/* ---------- Principles ---------- */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.principles li { padding: 1.5rem; transition: border-color .3s; }
.principles li:hover { border-color: var(--border-strong); }
.p-num { display: block; font-size: .78rem; color: var(--accent); margin-bottom: .8rem; }
.principles h3 { margin-bottom: .45rem; }
.principles p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Log ---------- */
.log {
  padding: 1.1rem 1.3rem;
  font-family: var(--font-mono);
  font-size: .84rem;
  max-height: 340px;
  overflow: hidden;
  background: rgba(8, 11, 15, .82);
  mask-image: linear-gradient(to bottom, transparent, #000 18%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px;
}
.log-line {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: .9rem;
  padding: .28rem 0;
  animation: logIn .5s var(--ease) both;
}
.log-time { color: var(--dim); }
.log-tag { min-width: 4.5rem; }
.log-tag.info { color: var(--accent-2); }
.log-tag.ok   { color: var(--accent); }
.log-tag.note { color: var(--warn); }
.log-msg { color: #c3ccd6; }
@keyframes logIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 3.5rem 0 1rem; }
  .about { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: .6rem 1rem 1rem;
    background: rgba(10, 13, 18, .97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .75rem .8rem; }
  .services, .principles { grid-template-columns: 1fr; }
  .partnership { flex-direction: column; padding: 1.4rem; }
  .terminal-body { min-height: 280px; font-size: .78rem; }
  .log-line { grid-template-columns: auto 1fr; }
  .log-time { display: none; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .brand-text { font-size: .82rem; }
}

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