/* =============================================================
   LOOM by MAZE — design system
   All tokens here. Never hardcode colors / fonts in HTML or JS.
   ============================================================= */

:root {
  /* Colors */
  --bg:           #08080C;
  --bg-elevated:  #0E0E15;
  --surface:      #13131D;
  --surface-2:    #1A1A28;
  --border:       #232333;
  --border-bright:#3A3A55;
  --text:         #F4F4F8;
  --text-dim:     #A8A8BC;
  --text-muted:   #6E6E84;
  --lime:         #C7FF3F;
  --pink:         #FF2D87;
  --cyan:         #4DFFD4;
  --amber:        #FFB347;

  /* Type */
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body:    'Sora', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1320px;
  --section-y: clamp(64px, 10vw, 160px);
  --radius:    16px;
  --radius-sm: 10px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
input, textarea { font: inherit; color: inherit; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =============================================================
   Container & sections
   ============================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.section { padding: var(--section-y) 0; }
.section-tight { padding: clamp(40px, 6vw, 80px) 0; }

/* =============================================================
   Typography
   ============================================================= */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-block;
}
.eyebrow::before {
  content: '↳ ';
  color: var(--lime);
  margin-right: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
  line-height: 1.05;
}

.h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 110px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
.h1 .accent { color: var(--lime); }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}

.h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }

.lead {
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 64ch;
}

.muted   { color: var(--text-muted); }
.dim     { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

a { color: var(--text); text-decoration: none; }
a.link {
  color: var(--text);
  border-bottom: 1px solid var(--border-bright);
  transition: border-color 120ms ease, color 120ms ease;
}
a.link:hover { color: var(--lime); border-bottom-color: var(--lime); }

/* =============================================================
   Buttons
   ============================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn:hover {
  background: var(--surface);
  border-color: var(--text-dim);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
  filter: brightness(1.1);
  box-shadow: 0 0 32px rgba(199, 255, 63, 0.3);
}

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

.btn-arrow::after {
  content: '→';
  font-family: var(--font-body);
  font-weight: 400;
}

/* =============================================================
   Header / nav
   ============================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
}
.logo .by {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 2px;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 120ms ease;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { color: var(--lime); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-bright);
  background: transparent;
  width: 36px; height: 36px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--bg-elevated);
    padding: 22px clamp(20px, 4vw, 48px);
    border-bottom: 1px solid var(--border);
  }
}

/* =============================================================
   Demo banner
   ============================================================= */

.demo-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.demo-banner b {
  color: var(--lime);
  font-weight: 700;
}
.demo-banner .sep {
  color: var(--border-bright);
  margin: 0 16px;
}

/* =============================================================
   Hero
   ============================================================= */

.hero {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0 clamp(64px, 8vw, 120px);
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero-eyebrow { margin-bottom: 24px; }
.hero h1 { margin-bottom: 28px; }
.hero .lead { margin-bottom: 36px; }
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 56px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 36px;
  max-width: 880px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
}
.hero-stat .num .of { color: var(--text-muted); font-weight: 400; }
.hero-stat .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 10px;
  display: block;
}

/* =============================================================
   Effects grid
   ============================================================= */

.effects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.effects-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.effect-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-elevated);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
  text-decoration: none;
  color: var(--text);
}
.effect-card:hover {
  border-color: var(--border-bright);
  background: var(--surface);
  transform: translateY(-2px);
}
.effect-card.locked {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.effect-card .effect-thumb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.65;
}

.effect-name {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.7vw, 22px);
  letter-spacing: -0.01em;
  z-index: 1;
}

.effect-meta {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

.effect-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(6px);
}
.effect-tag.new {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
  font-weight: 700;
}
.effect-tag.live {
  color: var(--cyan);
  border-color: var(--cyan);
}
.effect-tag.locked-tag {
  color: var(--text-muted);
}

/* =============================================================
   Effects.html — bigger tiles
   ============================================================= */

.effects-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 36px;
  margin-bottom: 36px;
}
.effects-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.effects-meta .meta-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.effects-meta .meta-num .accent { color: var(--lime); }
.effects-meta .meta-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tile {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  aspect-ratio: 5 / 4;
  overflow: hidden;
  transition: border-color 140ms ease, transform 140ms ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}
.tile.locked {
  pointer-events: none;
  opacity: 0.55;
}

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.tile-version {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tile-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(8, 8, 12, 0.6);
}
.tile-badge.new {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
  font-weight: 700;
}
.tile-badge.live { color: var(--cyan); border-color: var(--cyan); }

.tile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 6px;
}
.tile-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =============================================================
   Roadmap
   ============================================================= */

.roadmap {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.roadmap-row {
  display: grid;
  grid-template-columns: 80px 1fr 200px 140px;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.roadmap-row .week {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.roadmap-row .name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.roadmap-row .cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.roadmap-row .status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}
.roadmap-row.shipped .name { color: var(--text); }
.roadmap-row.shipped .status { color: var(--cyan); }
.roadmap-row.next .week,
.roadmap-row.next .name,
.roadmap-row.next .cat { color: var(--text); }
.roadmap-row.next .status { color: var(--lime); }
.roadmap-row.queued .name,
.roadmap-row.queued .week,
.roadmap-row.queued .cat,
.roadmap-row.queued .status { color: var(--text-muted); }

@media (max-width: 720px) {
  .roadmap-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "week status"
      "name name"
      "cat cat";
    gap: 4px;
    padding: 14px 0;
  }
  .roadmap-row .week { grid-area: week; }
  .roadmap-row .status { grid-area: status; }
  .roadmap-row .name { grid-area: name; font-size: 16px; }
  .roadmap-row .cat { grid-area: cat; }
}

/* =============================================================
   Marquee
   ============================================================= */

.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 32px 0;
  background: var(--bg-elevated);
}
.marquee-track {
  display: flex;
  gap: 56px;
  align-items: center;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 32px);
  color: var(--text);
  letter-spacing: -0.01em;
}
.marquee-item.text-muted { color: var(--text-muted); }
.marquee-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-bright);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================================
   Step / how-it-works
   ============================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  background: var(--bg-elevated);
}
.step .num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 24px;
  display: block;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 10px;
}
.step p { color: var(--text-dim); }

/* =============================================================
   Pricing tiers
   ============================================================= */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 920px;
}
.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
}
.tier.featured {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime), 0 0 60px rgba(199, 255, 63, 0.06) inset;
  position: relative;
}
.tier.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -12px; left: 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  background: var(--lime);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 999px;
}
.tier .tier-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.tier .tier-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  letter-spacing: -0.03em;
  margin: 14px 0 4px;
  line-height: 1;
}
.tier .tier-price .per {
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  margin-left: 2px;
}
.tier .tier-tag {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.tier li {
  font-size: 14px;
  color: var(--text-dim);
  padding-left: 22px;
  position: relative;
}
.tier li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--lime);
  font-weight: 700;
}
.tier .btn { justify-content: center; }

/* =============================================================
   FAQ
   ============================================================= */

.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq details[open] summary { color: var(--lime); }
.faq summary {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-muted);
}
.faq details[open] summary::after { content: '−'; color: var(--lime); }
.faq summary::-webkit-details-marker { display: none; }
.faq p {
  margin-top: 14px;
  color: var(--text-dim);
  max-width: 64ch;
}

/* =============================================================
   Forms / checkout
   ============================================================= */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
  background: var(--bg-elevated);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}
.form input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 120ms ease;
}
.form input:focus {
  outline: none;
  border-color: var(--lime);
}
.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.form .submit-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.form .submit-row .btn { justify-content: center; }
.form .legal {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* =============================================================
   Success page
   ============================================================= */

.success-card {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
  padding: 48px 32px;
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 0 60px rgba(199, 255, 63, 0.12);
}
.success-card .check {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 40px rgba(199, 255, 63, 0.5);
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 36px;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.site-footer a:hover { color: var(--text); }
.site-footer .colophon {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* =============================================================
   Utility
   ============================================================= */

.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.divider { height: 1px; background: var(--border); width: 100%; margin: 36px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 16ch; }
.section-head .lead { max-width: 50ch; }

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
  .effects-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
