/* MetricMaster — landing page
   Design tokens and layout converted from the source design export. */

:root {
  --bg: #05070d;
  --panel: #0a0e16;
  --text: #e6edf5;
  --bright: #c7d1dd;
  --muted: #9aa7b8;
  --dim: #5c6a7d;
  --ac: #22d3ee;
  --indigo: #818cf8;
  --line: rgba(230, 237, 245, .07);
  --line-2: rgba(230, 237, 245, .09);
  --line-3: rgba(230, 237, 245, .15);
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --pad-x: clamp(20px, 5vw, 48px);
  --pad-y: clamp(64px, 9vw, 110px);
  --wrap: 1280px;
}

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

/* An explicit display rule (e.g. .form { display: grid }) outranks the
   user-agent style for [hidden], so state it here or hiding silently fails. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, figure, blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--text); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ac); }

::selection { background: rgba(34, 211, 238, .3); }

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ac);
  color: var(--bg);
  font-weight: 600;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: var(--bg); }

/* ---------- shared bits ---------- */

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ac), rgba(34, 211, 238, .25));
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
}
.logo-mark--sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12.5px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ac);
  margin-bottom: 14px;
}

.grad {
  background: linear-gradient(100deg, var(--ac), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x);
  background: rgba(5, 7, 13, .75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  font-size: 14.5px;
}

.nav__link { color: var(--muted); }
.nav__link:hover { color: var(--ac); }

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 9px;
  border: 1px solid rgba(34, 211, 238, .4);
  color: var(--ac);
  font-family: var(--mono);
  font-size: 13px;
  transition: background .2s ease, box-shadow .2s ease;
}
.btn-ghost-sm:hover {
  background: rgba(34, 211, 238, .1);
  box-shadow: 0 0 24px rgba(34, 211, 238, .25);
}

@media (max-width: 620px) {
  .is-desktop { display: none; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) var(--pad-x) clamp(72px, 12vw, 130px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(230, 237, 245, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 237, 245, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  animation: gridmove 4s linear infinite;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}
.hero__glow--cyan {
  top: -180px; left: -120px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 65%);
  animation: drift 14s ease-in-out infinite;
}
.hero__glow--indigo {
  bottom: -220px; right: -100px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(99, 102, 241, .18), transparent 65%);
  animation: drift2 18s ease-in-out infinite;
}

.hero__copy {
  position: relative;
  animation: fadeUp .9s cubic-bezier(.22, 1, .36, 1) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 237, 245, .12);
  background: rgba(230, 237, 245, .04);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}
.badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 10px var(--ac);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  margin-bottom: 24px;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.hero__lede {
  margin-bottom: 40px;
  max-width: 540px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 11px;
  background: var(--ac);
  color: var(--bg);
  font-weight: 600;
  font-size: 15.5px;
  box-shadow: 0 0 36px rgba(34, 211, 238, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 48px rgba(34, 211, 238, .5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border-radius: 11px;
  border: 1px solid var(--line-3);
  font-size: 15.5px;
  transition: border-color .2s ease, color .2s ease;
}
.btn-ghost:hover { border-color: rgba(34, 211, 238, .5); color: var(--ac); }

/* ---------- terminal card ---------- */

.hero__terminal {
  position: relative;
  animation: fadeUp .9s .2s cubic-bezier(.22, 1, .36, 1) both;
}

.term {
  border-radius: 16px;
  border: 1px solid rgba(230, 237, 245, .12);
  background: rgba(10, 14, 22, .85);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(34, 211, 238, .08);
  overflow: hidden;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(230, 237, 245, .08);
}
.term__dot { width: 11px; height: 11px; border-radius: 50%; }
.term__dot--red { background: #ff5f57; }
.term__dot--amber { background: #febc2e; }
.term__dot--green { background: #28c840; }
.term__title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.term__body {
  padding: 20px clamp(14px, 3.5vw, 24px);
  font-family: var(--mono);
  font-size: clamp(11px, 3.3vw, 13.5px);
  line-height: 2.1;
}

.term__line--muted { color: var(--muted); }
.term__line--dim { color: var(--dim); }
.term__line--last { margin-top: 6px; }
.term__prompt { color: var(--ac); }

.term__row { display: flex; gap: 12px; }
.term__mark--wip { color: #febc2e; }
.term__mark--ok { color: #28c840; }
.term__name { color: var(--text); font-weight: 500; }
.term__state { color: var(--dim); }

.term__caret {
  display: inline-block;
  width: 9px; height: 17px;
  background: var(--ac);
  vertical-align: -3px;
  animation: blink 1.1s step-end infinite;
}

.term__badge {
  position: absolute;
  top: -14px; right: -14px;
  padding: 8px 14px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid rgba(34, 211, 238, .35);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ac);
  box-shadow: 0 0 24px rgba(34, 211, 238, .2);
}

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

.section {
  position: relative;
  padding: var(--pad-y) var(--pad-x);
  border-top: 1px solid var(--line);
}
.section--about { overflow: hidden; }
.section--contact { padding-bottom: clamp(72px, 12vw, 130px); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.section__head--stack { display: block; }

.section__title {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.section__intro {
  max-width: 420px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.card {
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(230, 237, 245, .035), transparent);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.card:hover {
  border-color: rgba(34, 211, 238, .4);
  box-shadow: 0 0 40px rgba(34, 211, 238, .1);
  transform: translateY(-4px);
}

.card__num {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ac);
  margin-bottom: 18px;
}
.card__title { margin-bottom: 12px; font-size: 19px; font-weight: 600; }
.card__text { font-size: 14.5px; line-height: 1.65; color: var(--muted); }

/* ---------- about ---------- */

.about {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}

.about__glow {
  position: absolute;
  top: 50%; left: -160px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .1), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.about .section__title { margin-bottom: 22px; }

.about__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}
.about__text + .about__text { margin-top: 18px; }

.pillars { display: grid; gap: 16px; }

.pillar {
  display: flex;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(230, 237, 245, .03);
}
.pillar__arrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ac);
  padding-top: 3px;
}
.pillar__title { margin-bottom: 7px; font-size: 16.5px; font-weight: 600; }
.pillar__text { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* ---------- testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.quote {
  height: 100%;
  padding: 32px 30px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(230, 237, 245, .035), transparent);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.quote__mark {
  font-size: 34px;
  line-height: 0;
  color: var(--ac);
  font-family: Georgia, serif;
}
.quote__text {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--bright);
  text-wrap: pretty;
}
.quote__by {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
}

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

.cta {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 80px) clamp(22px, 5vw, 56px);
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, .25);
  background: radial-gradient(ellipse 80% 120% at 50% -20%, rgba(34, 211, 238, .14), rgba(10, 14, 22, .9) 60%);
  text-align: center;
  overflow: hidden;
}

.cta__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(230, 237, 245, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 237, 245, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
}

.cta__inner { position: relative; }

.cta__title {
  margin: 0 auto 20px;
  max-width: 640px;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.cta__lede {
  margin: 0 auto 40px;
  max-width: 480px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.cta .eyebrow { margin-bottom: 18px; }

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

.form {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  text-align: left;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-3);
  background: rgba(5, 7, 13, .6);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: var(--dim); }
.input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .15);
}
.input--area { line-height: 1.6; resize: vertical; }

.input[aria-invalid="true"] {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .12);
}

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:not(:empty) { margin: 2px 0; }

.btn-submit {
  padding: 16px 32px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  background: var(--ac);
  color: var(--bg);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15.5px;
  box-shadow: 0 0 36px rgba(34, 211, 238, .35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 48px rgba(34, 211, 238, .5);
}
.btn-submit:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.form__status {
  min-height: 1.2em;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.form__status--error { color: #ff8f8f; }

.form__note { font-size: 13px; color: var(--dim); }

.sent {
  max-width: 520px;
  margin: 0 auto;
  padding: 36px 28px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, .35);
  background: rgba(34, 211, 238, .06);
}
.sent__tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ac);
  margin-bottom: 10px;
}
.sent__text { font-size: 15px; line-height: 1.6; color: var(--bright); }

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

.footer {
  padding: 48px var(--pad-x);
  border-top: 1px solid var(--line);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer__brand { display: grid; gap: 12px; }

.footer__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.footer__addr {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--dim);
  max-width: 320px;
}

.footer__col { display: grid; gap: 10px; font-size: 13.5px; }

.footer__label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: .08em;
}

.footer__link { color: var(--muted); }
.footer__link:hover { color: var(--ac); }

.footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(230, 237, 245, .06);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- reveal on scroll ---------- */

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(26px);
}
[data-reveal] {
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1),
              transform .8s cubic-bezier(.22, 1, .36, 1);
}

/* ---------- animations ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 50px) scale(1.1); }
}
@keyframes gridmove {
  from { background-position: 0 0; }
  to { background-position: 0 56px; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal].is-hidden { opacity: 1; transform: none; }
}
