/* ============================================================
  VibeAtScale – Stylesheet
   Dark DevOps theme
   ============================================================ */

/* ----- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0e1a;
  --bg-2:       #0e1425;
  --bg-card:    #111827;
  --bg-card-2:  #141d2e;
  --border:     rgba(99, 130, 255, 0.12);
  --border-2:   rgba(99, 130, 255, 0.22);
  --accent:     #6366f1;
  --accent-2:   #8b5cf6;
  --cyan:       #22d3ee;
  --green:      #4ade80;
  --text:       #e2e8f0;
  --text-muted: #8892a4;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 8px 48px rgba(0, 0, 0, 0.7);
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
  --nav-h:      68px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Utility --------------------------------------------- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 56px;
}

/* ----- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn--sm { padding: 8px 18px; font-size: 0.85rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn--primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn--outline:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.btn--scale {
  background: linear-gradient(135deg, #0ea5e9 0%, var(--cyan) 100%);
  color: #0a0e1a;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.3);
}
.btn--scale:hover {
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}

.btn--full { width: 100%; }

/* ----- Navigation ------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 14, 26, 0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s;
}

.nav--scrolled { background: rgba(10, 14, 26, 0.95); }

.nav__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-right: auto;
}

.logo-mark {
  color: var(--cyan);
  font-weight: 700;
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

/* ----- Hero ------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero__glow--1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}
.hero__glow--2 {
  width: 500px; height: 500px;
  bottom: -100px; right: -50px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto;
  gap: 48px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 100px;
}

.hero__eyebrow {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.terminal-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero__headline {
  grid-column: 1;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__sub {
  grid-column: 1;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

.hero__actions {
  grid-column: 1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__metrics {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.metric { text-align: left; }
.metric__value {
  display: block;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.metric__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric__divider {
  width: 1px;
  height: 40px;
  background: var(--border-2);
}

/* Floating code card */
.hero__code-card {
  grid-column: 2;
  grid-row: 1 / 6;
  align-self: center;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 380px;
  font-family: var(--mono);
  font-size: 0.82rem;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.code-card__title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-card__body {
  padding: 20px;
  line-height: 1.8;
  white-space: pre;
  overflow-x: auto;
}

.ct-key    { color: var(--cyan); }
.ct-str    { color: #a5f3fc; }
.ct-comment{ color: #4ade80; font-style: italic; }

/* ----- Services -------------------------------------------- */
.services {
  padding: 100px 0;
  background: var(--bg-2);
}

.workflow {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 42px 36px;
  box-shadow: var(--shadow);
}

.workflow__canvas {
  display: grid;
  grid-template-columns: 1fr 110px 1fr 110px 1fr;
  gap: 16px;
  align-items: center;
}

.workflow__stage {
  position: relative;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.12) 0%, rgba(20, 29, 46, 0.95) 55%);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  min-height: 108px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

.workflow__stage::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12) 0%, transparent 75%);
}

.workflow__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.workflow__meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow__arrow {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.3) 0%, rgba(34, 211, 238, 0.5) 100%);
}

.workflow__arrow::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  transform: translateY(-50%) rotate(45deg);
}

.workflow__pulse {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
  transform: translate(-50%, -50%);
  animation: workflowFlow 2.4s linear infinite;
}

.workflow__pulse--2 {
  animation-delay: 1.2s;
}

.workflow__cluster {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.cluster-node {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18) 0%, rgba(99, 102, 241, 0.16) 100%);
  border: 1px solid var(--border-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  animation: clusterScale 2.8s ease-in-out infinite;
}

.cluster-node--2 { animation-delay: 0.2s; }
.cluster-node--3 { animation-delay: 0.4s; }
.cluster-node--4 { animation-delay: 0.6s; }
.cluster-node--5 { animation-delay: 0.8s; }
.cluster-node--6 { animation-delay: 1s; }

@keyframes workflowFlow {
  0% {
    left: 0%;
    opacity: 0;
  }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes clusterScale {
  0%, 100% {
    transform: scale(1);
    border-color: var(--border-2);
  }
  50% {
    transform: scale(1.12);
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.28);
  }
}

/* ----- Pricing --------------------------------------------- */
.pricing {
  padding: 100px 0;
  background: var(--bg);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
}

.plan-card--featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-card) 60%);
  box-shadow: 0 0 48px rgba(99, 102, 241, 0.15), var(--shadow);
}

.plan-card--featured:hover { box-shadow: 0 0 64px rgba(99, 102, 241, 0.25), var(--shadow-lg); }

.plan-card--scale {
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.07) 0%, var(--bg-card) 60%);
  border-color: rgba(34, 211, 238, 0.25);
}
.plan-card--scale:hover { border-color: var(--cyan); }

.plan-card__badge-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 50px;
}

.plan-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  margin-bottom: 16px;
}
.plan-badge--pro {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.plan-badge--scale {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.plan-price__currency {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
}
.plan-price__amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.plan-price__period {
  font-size: 1rem;
  color: var(--text-muted);
}
.plan-price--custom { margin-bottom: 8px; }
.plan-price__amount--custom {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0ea5e9, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-price__note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  min-height: 1.4em;
}
.plan-price__note strong { color: var(--text); }

.plan-features { margin-bottom: 32px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.plan-features li:last-child { border-bottom: none; }

.check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--green);
  margin-top: 2px;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.plan-outcome {
  background: rgba(99, 130, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 28px;
}
.plan-outcome strong { color: var(--accent); }

.plan-cta { width: 100%; }

/* ----- Contact -------------------------------------------- */
.contact {
  padding: 100px 0;
  background: var(--bg-2);
}

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

.contact__copy .section-sub { margin-bottom: 36px; }

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__details li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.contact__details svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }

/* Form */
.contact__form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input, select, textarea {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder, textarea::placeholder { color: #4a5568; }

select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238892a4'%3E%3Cpath d='M7 7l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}

select option { background: var(--bg-card); }

textarea { resize: vertical; min-height: 100px; }

.form-success {
  display: none;
  color: var(--green);
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
}
.form-success.visible { display: block; }

/* ----- Footer ---------------------------------------------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

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

.footer__copy {
  font-size: 0.78rem;
  color: #4a5568;
}

/* ----- Responsive ------------------------------------------ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }
  .hero__code-card {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
    min-width: unset;
  }
  .hero__eyebrow,
  .hero__headline,
  .hero__sub,
  .hero__actions,
  .hero__metrics { grid-column: 1; }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .workflow {
    padding: 30px 24px;
  }

  .workflow__canvas {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .workflow__arrow {
    width: 4px;
    height: 60px;
    margin: 0 auto;
  }


  .workflow__arrow::after {
    left: 50%;
    right: auto;
    top: auto;
    bottom: -6px;
    transform: translateX(-50%) rotate(135deg);
    border-top: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
  }
  .workflow__cluster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .plan-card { padding: 28px 22px; }
  .contact__form { padding: 28px 20px; }
  .hero__headline { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; }
  .pricing__grid { grid-template-columns: 1fr; }
}


/* ----- FAQ ------------------------------------------------- */
.faq {
  padding: 100px 0;
  background: var(--bg-2);
}

.faq__list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq__item[open] {
  border-color: var(--border-2);
}

.faq__item:hover {
  border-color: var(--border-2);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 16px;
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq__item[open] > .faq__question::after {
  transform: rotate(45deg);
}

.faq__answer {
  padding: 0 28px 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.form-messages {
  justify-content: center;
  display: flex;
}

/* ----- Performance: compositor hints ----------------------- */
.hero__code-card {
  will-change: transform;
}

.cluster-node {
  will-change: transform;
}

.workflow__pulse {
  will-change: left, opacity;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}