/* ==========================================================================
   QP Landingpage — Dark Tech
   ========================================================================== */

:root {
  --bg: #07070c;
  --bg-elevated: #0e0e16;
  --bg-card: rgba(18, 18, 28, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8e8f0;
  --text-muted: #8b8ba0;
  --cyan: #2ee6d6;
  --cyan-dim: rgba(46, 230, 214, 0.15);
  --violet: #a78bfa;
  --violet-dim: rgba(167, 139, 250, 0.15);
  --pink: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --font-sans: "Outfit", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 0 0 1px var(--border), 0 24px 48px rgba(0, 0, 0, 0.45);
  --header-h: 72px;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #7ff5eb;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 20% 10%, rgba(46, 230, 214, 0.12), transparent 60%),
    radial-gradient(ellipse 45% 35% at 85% 15%, rgba(167, 139, 250, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 80%, rgba(244, 114, 182, 0.06), transparent 50%);
  pointer-events: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(7, 7, 12, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.logo:hover {
  color: var(--text);
}

.logo-mark {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(46, 230, 214, 0.35);
}

.logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.03);
}

.nav-cta:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.eyebrow.mono,
.mono {
  font-family: var(--font-mono);
}

.eyebrow code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--cyan-dim);
  border: 1px solid rgba(46, 230, 214, 0.25);
  color: var(--cyan);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse-ring 2s ease-out infinite;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 50%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #22c1b0);
  color: #041210;
  box-shadow: 0 0 24px rgba(46, 230, 214, 0.25);
}

.btn-primary:hover {
  color: #041210;
  box-shadow: 0 0 36px rgba(46, 230, 214, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--violet);
  background: var(--violet-dim);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Terminal */
.terminal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 60px rgba(167, 139, 250, 0.08);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-dot.red { background: #ff5f57; }
.term-dot.yellow { background: #febc2e; }
.term-dot.green { background: #28c840; }

.term-title {
  margin-left: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 1.15rem 1.25rem 1.35rem;
  min-height: 260px;
}

.terminal-body p {
  margin: 0 0 0.15rem;
}

.t-prompt {
  color: var(--cyan);
  margin-right: 0.4rem;
}

.t-out {
  color: var(--text-muted);
  padding-left: 1rem;
}

.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-err { color: var(--err); }
.t-muted { color: #5c5c72; }

.cursor {
  color: var(--cyan);
  animation: blink 1s step-end infinite;
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2,
.about-grid h2,
.contact-intro h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
}

/* Metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  padding: 1.35rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.metric-card:hover {
  border-color: rgba(46, 230, 214, 0.3);
  transform: translateY(-2px);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  letter-spacing: 0.02em;
}

.metric-value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.metric-value .unit {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.1rem;
}

.glow-cyan {
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(46, 230, 214, 0.4);
}

.glow-violet {
  color: var(--violet);
  text-shadow: 0 0 24px rgba(167, 139, 250, 0.4);
}

.metric-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(46, 230, 214, 0.5);
  animation: progress-pulse 2.5s ease-in-out infinite;
}

/* Log panel */
.log-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}

.log-header {
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.log-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.55rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
}

.log-list li:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: var(--cyan);
  color: var(--text);
}

.log-time {
  color: #5c5c72;
  min-width: 3rem;
}

.log-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.tag-info { background: rgba(46, 230, 214, 0.12); color: var(--cyan); }
.tag-warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.tag-ok { background: rgba(52, 211, 153, 0.12); color: var(--ok); }
.tag-err { background: rgba(248, 113, 113, 0.12); color: var(--err); }

/* About */
.section-about {
  border-block: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.04), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-grid p {
  color: var(--text-muted);
  max-width: 36rem;
}

.about-grid p + p {
  margin-top: 1rem;
}

.tag-cloud {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tag-cloud li {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.tag-cloud li:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: var(--violet-dim);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-intro p {
  color: var(--text-muted);
  max-width: 28rem;
}

.contact-meta {
  margin-top: 2rem;
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.85rem;
}

.contact-meta p {
  margin: 0;
}

.contact-meta p + p {
  margin-top: 0.5rem;
}

.contact-meta .label {
  color: var(--text-muted);
  margin-right: 0.65rem;
}

.contact-meta .muted,
.muted {
  color: var(--text-muted);
}

.contact-form {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5c5c72;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.field input.invalid,
.field textarea.invalid {
  border-color: var(--err);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-privacy {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-feedback.success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--ok);
}

.form-feedback.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--err);
}

.form-feedback.info {
  background: var(--cyan-dim);
  border: 1px solid rgba(46, 230, 214, 0.3);
  color: var(--cyan);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.25rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text);
}

/* Animations */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes progress-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(7, 7, 12, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.35rem;
  }

  .menu-toggle {
    display: flex;
  }

  .site-header.menu-open .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .site-header.menu-open .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
}

@media (max-width: 560px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .terminal-body {
    font-size: 0.75rem;
  }

  .log-list li {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor,
  .pulse,
  .logo-dot,
  .progress-bar {
    animation: none;
  }
}
