/* The Matrix by ChunkLand — landing styles
 * System font stack, mobile-first, CSS custom properties for palette.
 */

:root {
  --orange-light: #F7931E;
  --orange-dark:  #D97706;
  --brown:        #784104;
  --ink:          #1F2937;
  --ink-soft:     #4B5563;
  --ink-muted:    #6B7280;
  --line:         #E5E7EB;
  --surface:      #FFFFFF;
  --surface-2:    #F9FAFB;
  --surface-3:    #F3F4F6;
  --white:        #FFFFFF;

  --brand-gradient: linear-gradient(180deg, var(--orange-light) 0%, var(--orange-dark) 100%);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
  --shadow:    0 4px 12px rgba(16,24,40,.08);
  --shadow-lg: 0 20px 48px rgba(16,24,40,.14);

  --max-w: 1200px;
  --prose: 65ch;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--orange-dark);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--brown); }

p { max-width: var(--prose); }

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.nav-brand img { width: 32px; height: 32px; }
.nav-brand span { letter-spacing: -0.01em; }
.nav-links { display: none; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

@media (min-width: 820px) {
  .nav-links { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: .97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  color: var(--white);
  box-shadow: var(--shadow);
  filter: brightness(1.03);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--ink);
  border-color: #D1D5DB;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--ink); }

.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange-dark);
  margin-bottom: 10px;
}
.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p { margin: 8px auto 0; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(247,147,30,.14), transparent 60%),
    radial-gradient(800px 400px at 0% 10%, rgba(120,65,4,.06), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(247,147,30,.12);
  color: var(--brown);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  margin: 0 0 .4em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
}
.hero .subhead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 28px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 22px;
  color: var(--ink-muted);
  font-size: .9rem;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta .dot { width: 4px; height: 4px; background: var(--ink-muted); border-radius: 50%; }

.hero-visual {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  overflow: hidden;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--brand-gradient);
  z-index: -1;
  border-radius: inherit;
  opacity: .0;
}
.hv-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.hv-row + .hv-row { border-top: 1px dashed var(--line); }
.hv-thumb {
  width: 44px;
  height: 56px;
  border-radius: 4px;
  background: var(--surface-3);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}
.hv-thumb::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 50%, var(--ink) 50%, var(--ink) 75%, transparent 75%) 0 0 / 4px 4px;
  border-radius: 2px;
  opacity: .85;
}
.hv-meta { flex: 1; }
.hv-meta strong { display: block; font-size: .92rem; color: var(--ink); }
.hv-meta span { font-size: .82rem; color: var(--ink-muted); }
.hv-badge {
  font-size: .72rem;
  font-weight: 600;
  color: var(--orange-dark);
  background: rgba(247,147,30,.12);
  padding: 3px 8px;
  border-radius: 999px;
}
.hv-badge.ok { color: #065F46; background: rgba(16,185,129,.12); }
.hv-badge.blue { color: #1E40AF; background: rgba(59,130,246,.12); }

@keyframes sortPulse {
  0%, 70%, 100% { opacity: .55; transform: scale(.96); }
  20%, 40%     { opacity: 1;   transform: scale(1.04); }
}
.hv-badge { animation: sortPulse 3s ease-in-out infinite; will-change: transform, opacity; }
.hv-row:nth-child(1) .hv-badge { animation-delay: 0s; }
.hv-row:nth-child(2) .hv-badge { animation-delay: .4s; }
.hv-row:nth-child(3) .hv-badge { animation-delay: .8s; }
.hv-row:nth-child(4) .hv-badge { animation-delay: 1.2s; }
@media (prefers-reduced-motion: reduce) {
  .hv-badge { animation: none; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 1fr; }
}

/* ---------- Problem cards ---------- */
.problem-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .problem-grid { grid-template-columns: repeat(3, 1fr); } }

.problem-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.problem-card .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(247,147,30,.12);
  color: var(--orange-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.problem-card h3 { margin-bottom: 6px; }
.problem-card p { color: var(--ink-soft); margin: 0; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px; left: 20px;
  width: 32px; height: 32px;
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.step-illus {
  height: 110px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Features ---------- */
.features {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.feature .icon {
  width: 36px; height: 36px;
  color: var(--orange-dark);
  margin-bottom: 12px;
}
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .94rem; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 820px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.tier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, box-shadow .2s ease, border-color .15s ease;
}
.tier:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #D1D5DB;
}
.tier.highlight {
  border-color: var(--orange-light);
  box-shadow: 0 0 0 3px rgba(247,147,30,.12), var(--shadow);
  position: relative;
}
.tier.highlight::after {
  content: "Most popular";
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand-gradient);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tier h3 { margin-bottom: 4px; }
.tier .tier-desc { color: var(--ink-muted); font-size: .9rem; margin: 0 0 16px; }
.tier .price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 18px;
}
.tier .price .amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.tier .price .period { color: var(--ink-muted); }
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.tier li {
  display: flex;
  gap: 10px;
  font-size: .94rem;
  color: var(--ink-soft);
}
.tier li::before {
  content: "";
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 4px;
  background: var(--orange-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 4L6 11.5 2.5 8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 4L6 11.5 2.5 8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.tier-enterprise {
  margin-top: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
}
.tier-enterprise h3 { margin: 0 0 4px; }
.tier-enterprise p { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .testimonials { grid-template-columns: repeat(2, 1fr); } }

.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.quote blockquote {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 500;
}
.quote cite {
  font-style: normal;
  color: var(--ink-muted);
  font-size: .9rem;
}
.quote.placeholder { border-style: dashed; background: var(--surface-2); }
.quote.placeholder::before {
  content: "Placeholder";
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq details[open] summary { color: var(--orange-dark); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  transition: transform .15s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  max-width: none;
}

/* ---------- Final CTA ---------- */
.cta-band {
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 10px; }
.cta-band p {
  color: rgba(255,255,255,.92);
  margin: 0 auto 22px;
  max-width: 56ch;
}
.cta-band .btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: transparent;
}
.cta-band .btn-secondary:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- Footer ---------- */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: .92rem;
}
.foot {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.foot-brand img { width: 28px; height: 28px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { color: var(--ink-soft); }
.foot nav a:hover { color: var(--ink); }

/* ---------- Modal (video) ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-panel {
  width: 100%;
  max-width: 880px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-video {
  aspect-ratio: 16 / 9;
  background: #0F172A;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  text-align: center;
  padding: 20px;
}
.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.modal-foot p { margin: 0; color: var(--ink-muted); font-size: .9rem; }

/* ---------- Download page ---------- */
.download-hero {
  padding: 56px 0 32px;
  text-align: center;
}
.license-card {
  max-width: 620px;
  margin: 24px auto 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.license-label {
  text-transform: uppercase;
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--ink-muted);
  font-weight: 700;
  margin: 0 0 8px;
}
.license-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.license-key {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: nowrap;
}

.os-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 40px auto 0;
}
@media (min-width: 720px) { .os-grid { grid-template-columns: repeat(3, 1fr); } }

.os-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}
.os-card .icon {
  width: 42px; height: 42px;
  margin: 4px auto 12px;
  color: var(--ink-soft);
}
.os-card h3 { margin-bottom: 8px; }
.os-card .btn { width: 100%; }
.os-card small { display: block; margin-top: 8px; color: var(--ink-muted); font-size: .82rem; }

.install-steps {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  max-width: 1000px;
  margin: 56px auto 0;
}
@media (min-width: 820px) { .install-steps { grid-template-columns: repeat(3, 1fr); } }
.install-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.install-card h3 { margin-bottom: 12px; }
.install-card ol { padding-left: 20px; margin: 0; color: var(--ink-soft); }
.install-card li { margin-bottom: 8px; }

.resend {
  margin: 56px auto 0;
  max-width: 620px;
  text-align: center;
  color: var(--ink-soft);
}
.resend-status { margin-top: 10px; font-size: .9rem; color: var(--ink-muted); min-height: 1.4em; }

/* ---------- Success page ---------- */
.success-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.success-card {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.success-check {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: var(--brand-gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.success-meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-muted);
  word-break: break-all;
}

/* ---------- Legal pages ---------- */
.doc {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px;
}
.doc h1 { font-size: 2rem; }
.doc h2 { margin-top: 2em; font-size: 1.3rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc .placeholder-note {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin: 16px 0;
}
.doc dt { font-weight: 600; color: var(--ink); margin-top: 12px; }
.doc dd { margin: 4px 0 0; color: var(--ink-soft); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.muted { color: var(--ink-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
