/* ============================================================
   linearstories — Landing Page Styles
   ============================================================ */

/* ----- Reset & Base ----- */

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

:root {
  /* Color palette */
  --bg-base:       #0a0d12;
  --bg-surface:    #0f1218;
  --bg-raised:     #161a24;
  --bg-overlay:    #1c2130;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-muted:  rgba(255, 255, 255, 0.1);

  --accent-start:  #3b82f6;
  --accent-end:    #06b6d4;
  --accent-mid:    #0ea5e9;

  --text-primary:   #f0f2f8;
  --text-secondary: #8892a8;
  --text-muted:     #4a5168;

  --code-bg:       #0c1018;
  --code-border:   rgba(14, 165, 233, 0.2);

  --green:  #34d399;
  --amber:  #fbbf24;
  --red:    #f87171;

  /* Typography */
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               sans-serif, "Apple Color Emoji";
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas,
               monospace;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1080px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ----- Utilities ----- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-mid);
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
  margin-bottom: var(--space-4);
}

.section-heading {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 56ch;
  line-height: 1.7;
}

section {
  padding-block: var(--space-24);
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin-block: 0;
}

/* ----- Navigation ----- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13, 15, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.15s;
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-muted);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.2), 0 2px 8px rgba(14, 165, 233, 0.15);
}

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

.hero {
  padding-block: var(--space-24) var(--space-20);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(14, 165, 233, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 30% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 75% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-raised);
  border: 1px solid var(--border-muted);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  margin-bottom: var(--space-8);
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  max-width: 18ch;
  margin-inline: auto;
  position: relative;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-12);
}

.btn-large {
  padding: var(--space-3) var(--space-8);
  font-size: 1rem;
}

.hero-install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: 0.9rem;
  max-width: 100%;
  box-shadow: 0 0 60px rgba(14, 165, 233, 0.06), 0 0 0 1px rgba(14, 165, 233, 0.12);
  transition: box-shadow 0.3s ease;
}

.hero-install:hover {
  box-shadow: 0 0 80px rgba(14, 165, 233, 0.1), 0 0 0 1px rgba(14, 165, 233, 0.2);
}

.hero-install code {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.hero-install-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-1);
  display: flex;
  align-items: center;
  transition: color 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--text-secondary);
}

.copy-btn svg {
  width: 15px;
  height: 15px;
}

.hero-social-proof {
  margin-top: var(--space-8);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.hero-social-proof span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-social-proof svg {
  width: 13px;
  height: 13px;
  opacity: 0.5;
}

/* ----- Problem ----- */

.problem {
  background: var(--bg-surface);
}

.problem-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.problem-content {
  max-width: 44ch;
}

.problem-illustration {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.msg-bubble {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  max-width: 80%;
}

.msg-bubble-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
}

.msg-agent {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  color: var(--text-secondary);
}

.msg-vague {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  align-self: flex-end;
  color: var(--text-secondary);
}

.msg-confused {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  color: var(--text-secondary);
}

.msg-bubble p {
  color: var(--text-primary);
}

.problem-points {
  list-style: none;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.problem-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.problem-points li::before {
  content: "";
  width: 18px;
  height: 18px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* ----- Solution ----- */

.solution-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.solution-list {
  list-style: none;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.solution-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.solution-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.solution-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.solution-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border-subtle);
}

.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.traffic-dot.red    { background: #ff5f57; }
.traffic-dot.amber  { background: #ffbd2e; }
.traffic-dot.green  { background: #28c941; }

.solution-card-filename {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: auto;
}

.solution-card-body {
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
}

.solution-card-body pre {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--text-secondary);
  white-space: pre;
}

/* Syntax-like coloring for the code preview */
.tok-comment  { color: #545870; }
.tok-key      { color: #7b99f5; }
.tok-string   { color: #86e0a5; }
.tok-number   { color: #f0a96b; }
.tok-heading  { color: var(--text-primary); font-weight: 600; }
.tok-keyword  { color: #c586c0; }
.tok-check    { color: var(--text-muted); }
.tok-checked  { color: var(--green); }
.tok-label    { color: #79c5f0; }
.tok-bracket  { color: #fbbf24; }

/* ----- How it works ----- */

.how {
  background: var(--bg-surface);
  text-align: center;
}

.how-heading-wrap {
  margin-bottom: var(--space-16);
}

.how-heading-wrap .section-sub {
  margin-inline: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 40px;
  left: calc(33.33% + var(--space-3));
  right: calc(33.33% + var(--space-3));
  height: 1px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  opacity: 0.3;
}

.step {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  position: relative;
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--border-muted);
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-icon {
  width: 44px;
  height: 44px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-mid);
}

.step-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----- Features ----- */

.features-inner {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(14, 165, 233, 0.08);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-mid);
  fill: none;
  stroke-width: 1.75;
}

.feature-card h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ----- Markdown Showcase ----- */

.showcase {
  background: var(--bg-surface);
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-16);
  align-items: start;
}

.showcase-content .section-sub {
  margin-bottom: var(--space-6);
}

.template-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.template-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.template-field-key {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-mid);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

.template-field-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.code-window {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.code-window-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.code-window-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: var(--space-2);
}

.code-window-body {
  padding: var(--space-6);
  overflow-x: auto;
}

.code-window-body pre {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
  tab-size: 2;
}

/* ----- Quick Start ----- */

.quickstart-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.quickstart-content .section-sub {
  margin-bottom: var(--space-6);
}

.terminal {
  background: #0a0c12;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: var(--space-2);
}

.terminal-body {
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 2;
  overflow-x: auto;
}

.t-prompt {
  color: var(--accent-start);
  user-select: none;
}

.t-cmd {
  color: var(--text-primary);
}

.t-comment {
  color: var(--text-muted);
  display: block;
  margin-top: var(--space-2);
}

.t-out {
  color: var(--text-secondary);
  display: block;
  font-size: 0.76rem;
}

.t-success {
  color: var(--green);
  display: block;
}

.t-line {
  display: block;
}

.quickstart-tips {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tip {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tip strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--space-1);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--accent-mid);
}

.tip code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

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

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-12);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-brand-name .nav-logo-mark {
  width: 24px;
  height: 24px;
}

.footer-brand-name .nav-logo-mark svg {
  width: 13px;
  height: 13px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.15s;
}

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

.footer-meta {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ----- Grain Overlay ----- */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ----- Hero Entrance Animation ----- */

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .hero-eyebrow,
.hero h1,
.hero .hero-sub,
.hero .hero-actions,
.hero .hero-install,
.hero .hero-social-proof {
  opacity: 0;
  animation: hero-enter 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero .hero-eyebrow   { animation-delay: 0ms; }
.hero h1              { animation-delay: 120ms; }
.hero .hero-sub       { animation-delay: 240ms; }
.hero .hero-actions   { animation-delay: 360ms; }
.hero .hero-install   { animation-delay: 480ms; }
.hero .hero-social-proof { animation-delay: 600ms; }

/* ----- Scroll Reveal Animation ----- */

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
}

.reveal.revealed {
  animation: reveal-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger children inside revealed containers */
.reveal.revealed .step:nth-child(1),
.reveal.revealed .feature-card:nth-child(1) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0ms forwards; opacity: 0; }
.reveal.revealed .step:nth-child(2),
.reveal.revealed .feature-card:nth-child(2) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 100ms forwards; opacity: 0; }
.reveal.revealed .step:nth-child(3),
.reveal.revealed .feature-card:nth-child(3) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards; opacity: 0; }
.reveal.revealed .feature-card:nth-child(4) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 300ms forwards; opacity: 0; }
.reveal.revealed .feature-card:nth-child(5) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 400ms forwards; opacity: 0; }
.reveal.revealed .feature-card:nth-child(6) { animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 500ms forwards; opacity: 0; }

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

@media (max-width: 900px) {
  section {
    padding-block: var(--space-16);
  }

  .problem-inner,
  .solution-inner,
  .quickstart-inner,
  .showcase-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .problem-content,
  .solution-content {
    max-width: 100%;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .steps::before {
    display: none;
  }

  .features-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    text-align: left;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    gap: var(--space-2);
  }
}

@media (max-width: 600px) {
  :root {
    --space-24: 4rem;
    --space-16: 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-install {
    flex-wrap: wrap;
    text-align: left;
  }

  .features-inner {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-social-proof {
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* ----- Focus styles for a11y ----- */

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

/* ----- Selection ----- */

::selection {
  background: rgba(14, 165, 233, 0.35);
  color: #fff;
}
