/* ==========================================================================
   Arkanpute design system
   Palette adapted from the "Darkmatter" theme (21st.dev community).
   Layout rails adapted from the 21st.dev bordered-hero pattern.
   ========================================================================== */

@layer base, rmx;

:root {
  --bg: #121113;
  --bg-deep: #0c0b0d;
  --card: #141315;
  --card-raised: #181619;
  --fg: #c1c1c1;
  --fg-strong: #f2efec;
  --muted: #222222;
  --muted-fg: #888888;
  --border: #222222;
  --border-bright: #2e2b2f;
  --primary: #e78a53;
  --primary-soft: rgba(231, 138, 83, 0.12);
  --primary-fg: #121113;
  --secondary: #5f8787;
  --secondary-soft: rgba(95, 135, 135, 0.12);
  --sand: #fbcb97;

  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --rail: 1180px;

  --font-sans: Inter, system-ui, -apple-system, 'Segoe UI', Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
  }

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

  h1,
  h2,
  h3,
  h4 {
    color: var(--fg-strong);
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    text-wrap: balance;
  }

  p {
    margin: 0;
    text-wrap: pretty;
  }

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

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

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

  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
    margin: 0;
  }

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

/* ------------------------------ Layout rails ----------------------------- */

.rail {
  width: 100%;
  max-width: var(--rail);
  margin-inline: auto;
  border-inline: 1px solid var(--border);
}

.band {
  border-bottom: 1px solid var(--border);
  position: relative;
}

.pad {
  padding: 5.5rem 2.5rem;
}

.pad-sm {
  padding: 2.5rem;
}

/* Faint blueprint grid behind the whole page. */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

.page {
  position: relative;
  z-index: 1;
}

/* -------------------------------- Typography ----------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.eyebrow-muted {
  color: var(--muted-fg);
}

.h-xl {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

.h-lg {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.h-md {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  color: var(--muted-fg);
  line-height: 1.7;
  max-width: 62ch;
}

.body-muted {
  color: var(--muted-fg);
  font-size: 0.9375rem;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* --------------------------------- Buttons ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.8125rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 10px 30px -10px rgba(231, 138, 83, 0.55);
}

.btn-primary:hover {
  background: #f0a072;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-bright);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

/* ---------------------------------- Nav ---------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 17, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

.nav-links a:hover {
  color: var(--fg-strong);
}

/* --------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-primary {
  width: 460px;
  height: 460px;
  top: -180px;
  right: -120px;
  background: rgba(231, 138, 83, 0.16);
}

.glow-secondary {
  width: 420px;
  height: 420px;
  bottom: -200px;
  left: -140px;
  background: rgba(95, 135, 135, 0.14);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.75rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--secondary);
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid var(--border-bright);
  background: var(--card);
  border-radius: 999px;
  padding: 0.4375rem 0.9375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(231, 138, 83, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(231, 138, 83, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(231, 138, 83, 0);
  }
}

/* ------------------------- Hero rack mockup panel ------------------------ */

.mock-wrap {
  position: relative;
  z-index: 2;
  padding: 0 2.5rem 4rem;
}

.mock-stack {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
}

.mock-stack::before,
.mock-stack::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 50%;
  translate: -50% 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--card);
}

.mock-stack::before {
  top: -20px;
  width: 86%;
  height: 40px;
  opacity: 0.5;
}

.mock-stack::after {
  top: -10px;
  width: 93%;
  height: 40px;
  opacity: 0.75;
}

.mock {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--card-raised), var(--card));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.mock-dots {
  display: flex;
  gap: 0.375rem;
}

.mock-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.mock-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.mock-pane {
  background: var(--card);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.mock-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg);
  padding: 0.5rem 0.6875rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-deep);
}

.mock-row b {
  color: var(--secondary);
  font-weight: 500;
}

.mock-row.on b {
  color: var(--primary);
}

.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.mock-chat {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.bubble {
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  background: var(--bg-deep);
}

.bubble.me {
  border-color: rgba(231, 138, 83, 0.3);
  background: var(--primary-soft);
  color: var(--fg-strong);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--primary);
  vertical-align: -2px;
  animation: blink 1.1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* -------------------------------- Logo strip ----------------------------- */

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3.5rem;
  margin-top: 1.75rem;
}

/* svgl ships these as dark-on-light marks; flatten them to white for the dark page. */
.logos img {
  height: 28px;
  width: auto;
  opacity: 0.5;
  filter: brightness(0) invert(1);
  transition: opacity 0.25s ease;
}

.logos img:hover {
  opacity: 0.92;
}

/* --------------------------------- Stats --------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.stat {
  background: var(--bg);
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: -0.03em;
}

.stat span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

/* --------------------------------- Grids --------------------------------- */

.section-head {
  max-width: 68ch;
  margin-bottom: 3rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center .lede {
  margin-inline: auto;
}

.section-head h2 {
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.75rem;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  background: var(--card-raised);
}

.card h3 {
  margin-bottom: 0.625rem;
}

.icon-box {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 0.625rem;
  border: 1px solid var(--border-bright);
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.icon-box.teal {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.125rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--border);
}

.card-list li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* --------------------------------- Steps --------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.step {
  background: var(--card);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-no {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.step-when {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-fg);
  border-top: 1px dashed var(--border-bright);
}

/* -------------------------------- Pricing -------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.tier {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 1.875rem;
  height: 100%;
}

.tier.featured {
  border-color: rgba(231, 138, 83, 0.45);
  background: linear-gradient(180deg, rgba(231, 138, 83, 0.07), var(--card) 45%);
  box-shadow: 0 30px 70px -40px rgba(231, 138, 83, 0.6);
}

/* Min-height absorbs the "Most installed" badge so every tier header is the same height. */
.tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 1.75rem;
  margin-bottom: 0.5rem;
}

/* Reserve two lines so prices and feature lists line up across all three tiers. */
.tier-blurb {
  min-height: 3.25em;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-fg);
  background: var(--primary);
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
}

.price {
  margin: 1.5rem 0 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price b {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: -0.04em;
}

.price span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.price-then {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  margin-bottom: 1.75rem;
}

.features li {
  display: flex;
  gap: 0.6875rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.5;
}

.check {
  flex: none;
  margin-top: 0.25rem;
  color: var(--secondary);
}

.tier.featured .check {
  color: var(--primary);
}

.pricing-note {
  margin-top: 1.75rem;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  padding: 1.125rem 1.375rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  text-align: center;
}

.pricing-note b {
  color: var(--fg-strong);
  font-weight: 600;
}

/* ---------------------------------- FAQ ---------------------------------- */

.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq details {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--fg-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--primary);
}

.faq summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary);
  flex: none;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  padding: 0 1.5rem 1.375rem;
  color: var(--muted-fg);
  font-size: 0.9375rem;
  max-width: 78ch;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 1.875rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.field input,
.field select,
.field textarea {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--fg-strong);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 118px;
  font-family: inherit;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
}

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

.error {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #e3675f;
}

.form-error {
  border: 1px solid rgba(227, 103, 95, 0.4);
  background: rgba(227, 103, 95, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #e3675f;
}

.form-fine {
  font-size: 0.75rem;
  color: var(--muted-fg);
  text-align: center;
}

.contact-points {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-point {
  display: flex;
  gap: 0.875rem;
}

.contact-point b {
  display: block;
  color: var(--fg-strong);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* -------------------------------- Thanks --------------------------------- */

.thanks {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  padding: 6rem 2.5rem;
}

.thanks-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(231, 138, 83, 0.4);
  background: var(--primary-soft);
  color: var(--primary);
}

/* -------------------------------- Footer --------------------------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2.25rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ------------------------------- Responsive ------------------------------ */

@media (max-width: 960px) {
  .pad {
    padding: 4rem 1.5rem;
  }

  .pad-sm,
  .nav-inner,
  .footer,
  .mock-wrap {
    padding-inline: 1.5rem;
  }

  .grid-3,
  .grid-2,
  .tiers,
  .steps,
  .contact-grid,
  .mock-body {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 1px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    gap: 2.5rem;
  }

  .nav-links {
    display: none;
  }

  .rail {
    border-inline: 0;
  }
}

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

  .nav-inner .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .nav-inner .btn svg {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@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;
  }
}
