/* ========================================================================
   Quipu Landing Page Styles
   ======================================================================== */

/* --- Tokens --- */
:root {
  /* Backgrounds — warm cream/yellow */
  --bg-base: #f7f5ef;
  --bg-surface: #fffdf8;
  --bg-elevated: #f2efe8;
  --bg-overlay: #e8e5de;

  /* Text */
  --text-primary: #1a2030;
  --text-secondary: #4a5568;
  --text-tertiary: #8a94a6;

  /* Accent — icon blue */
  --accent: #1a73d2;
  --accent-hover: #0099e5;
  --accent-muted: #e4eef9;

  /* Secondary accent — warm orange complement */
  --accent-secondary: #e58a3a;
  --accent-secondary-muted: #fdf0e2;

  /* Borders */
  --border: #ddd9d0;

  /* Editor page */
  --page-bg: #fffcf7;
  --page-text: #1a2030;

  /* Misc */
  --radius: 12px;
  --radius-sm: 8px;
  --nav-height: 64px;

  /* Theme-specific mockup */
  --mock-bg: #0f1520;
  --mock-surface: #182030;
  --mock-elevated: #1e2a3a;
  --mock-border: #2a3a50;
  --mock-text: #e8ecf0;
  --mock-text-dim: #8a94a6;
  --mock-accent: #4792e6;
}

/* Dark mode tokens */
:root.dark {
  --bg-base: #0c1018;
  --bg-surface: #111820;
  --bg-elevated: #182030;
  --bg-overlay: #1e2a3a;

  --text-primary: #e8ecf0;
  --text-secondary: #8fbcee;
  --text-tertiary: #4a6080;

  --accent: #4792e6;
  --accent-hover: #0099e5;
  --accent-muted: #1a2a40;

  --accent-secondary: #e5915b;
  --accent-secondary-muted: #2d2018;

  --border: #2a3a50;

  --page-bg: #111820;
  --page-text: #e8ecf0;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grain overlay */
:root {
  --grain-blend: multiply;
  --grain-opacity: 0.35;
}

:root.dark {
  --grain-blend: soft-light;
  --grain-opacity: 0.55;
}

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

img, svg {
  display: block;
}

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

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-accent {
  color: var(--accent);
}

/* --- Animation --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================================
   Navigation
   ======================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: color-mix(in srgb, var(--bg-base) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ========================================================================
   Buttons
   ======================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--text-tertiary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius);
}

/* ========================================================================
   Hero
   ======================================================================== */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ea043;
}

.hero-title {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-accent {
  color: var(--accent-secondary);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-mockup {
  max-width: 960px;
  margin: 64px auto 0;
  padding: 0 24px;
}

/* ========================================================================
   macOS Window Frame (real screenshot)
   ======================================================================== */
.window-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 40px 100px rgba(0, 0, 0, 0.14);
  background: #1e1e1e;
}

.window-frame-titlebar {
  height: 38px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.window-frame-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.window-dot-close    { background: #ff5f57; }
.window-dot-minimize { background: #febc2e; }
.window-dot-maximize { background: #28c840; }

.window-frame-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
}

.window-frame-body {
  line-height: 0;
}

.window-frame-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================================================
   Editor Mockup
   ======================================================================== */
.mockup {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08),
              0 8px 40px rgba(0, 0, 0, 0.12),
              0 24px 80px rgba(0, 0, 0, 0.08);
  background: var(--mock-bg);
}

:root.dark .mockup {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
              0 8px 40px rgba(0, 0, 0, 0.4),
              0 24px 80px rgba(0, 0, 0, 0.3);
}

.mockup-titlebar {
  height: 40px;
  background: var(--mock-surface);
  border-bottom: 1px solid var(--mock-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mockup-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mock-border);
}

.dot-close { background: #ff5f56; }
.dot-minimize { background: #ffbd2e; }
.dot-maximize { background: #27c93f; }

.mockup-title {
  font-size: 12px;
  color: var(--mock-text-dim);
  font-family: 'Inter', sans-serif;
}

.mockup-body {
  display: flex;
  height: 400px;
}

.mockup-activity-bar {
  width: 44px;
  background: var(--mock-surface);
  border-right: 1px solid var(--mock-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 4px;
  flex-shrink: 0;
}

.ab-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--mock-text-dim);
  cursor: default;
}

.ab-icon-active {
  color: var(--mock-text);
  background: rgba(255, 255, 255, 0.06);
}

.mockup-sidebar {
  width: 180px;
  background: var(--mock-surface);
  border-right: 1px solid var(--mock-border);
  padding: 12px 0;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--mock-text-dim);
  padding: 4px 16px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 16px;
  font-size: 13px;
  color: var(--mock-text-dim);
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-folder {
  color: var(--mock-accent);
}

.sidebar-nested {
  padding-left: 36px;
}

.sidebar-active {
  color: var(--mock-text);
  background: rgba(255, 255, 255, 0.06);
}

.mockup-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mockup-tabs {
  display: flex;
  background: var(--mock-surface);
  border-bottom: 1px solid var(--mock-border);
  height: 36px;
  flex-shrink: 0;
}

.tab {
  padding: 0 16px;
  font-size: 12px;
  color: var(--mock-text-dim);
  display: flex;
  align-items: center;
  border-right: 1px solid var(--mock-border);
  cursor: default;
}

.tab-active {
  color: var(--mock-text);
  background: var(--mock-elevated);
}

/* Warm tinted editor — matches app's tinted theme */
.mockup-editor {
  flex: 1;
  padding: 20px 28px;
  background: #fdf8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mockup-editor-with-comment {
  flex-direction: row;
}

.mockup-editor-content {
  flex: 1;
  min-width: 0;
}

.editor-line {
  font-size: 13.5px;
  line-height: 1.75;
  font-family: 'Inter', sans-serif;
  color: #3d3530;
  white-space: normal;
}

/* Rendered headings — no markdown syntax visible */
.ed-h1-rendered {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #2a2420;
  display: block;
}

.ed-h2-rendered {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #2a2420;
  display: block;
}

.ed-text {
  color: #3d3530;
}

/* Comment highlight — warm orange background like app */
.ed-comment-highlight {
  background: #fde8c8;
  border-bottom: 2px solid var(--accent-secondary);
  padding: 1px 2px;
  border-radius: 2px;
  color: #3d3530;
}

/* Comment sidebar card — floats on the right */
.mockup-comment-sidebar {
  width: 180px;
  flex-shrink: 0;
  padding-left: 16px;
  padding-top: 60px;
}

.mockup-comment-card {
  background: #fffefa;
  border: 1px solid #e8dcc8;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.mockup-comment-meta {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.mockup-comment-body {
  font-size: 11px;
  line-height: 1.5;
  color: #3d3530;
  margin-bottom: 6px;
}

.mockup-comment-quote {
  font-size: 10px;
  font-style: italic;
  color: #9e8e78;
  border-top: 1px solid #e8dcc8;
  padding-top: 5px;
}

.editor-cursor {
  position: relative;
}

.editor-cursor::after {
  content: '';
  width: 2px;
  height: 18px;
  background: var(--accent);
  display: inline-block;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.mockup-terminal {
  height: 80px;
  border-top: 1px solid var(--mock-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 4px 16px;
  background: var(--mock-surface);
  border-bottom: 1px solid var(--mock-border);
  height: 28px;
  flex-shrink: 0;
}

.terminal-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--mock-text-dim);
}

.terminal-body {
  flex: 1;
  background: var(--mock-bg);
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.term-line {
  color: var(--mock-text);
  white-space: normal;
  line-height: 1.6;
  font-size: 12px;
}

.term-prompt {
  color: var(--accent-secondary);
}

.term-cmd {
  color: var(--mock-text);
}

.term-frame {
  color: var(--mock-accent);
  font-weight: 600;
}

.term-file {
  color: var(--accent-secondary);
}

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

.term-cursor {
  color: var(--mock-text);
  animation: blink 1s steps(1) infinite;
}

/* ========================================================================
   Features
   ======================================================================== */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(196, 131, 90, 0.08);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ========================================================================
   Editor Section
   ======================================================================== */
.editor-section {
  padding: 100px 0;
  background: var(--bg-elevated);
}

:root.dark .editor-section {
  background: var(--bg-surface);
}

.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.editor-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.editor-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.editor-list li svg {
  color: var(--accent);
  flex-shrink: 0;
}

.editor-visual {
  display: flex;
  justify-content: center;
}

.format-demo {
  display: flex;
  align-items: center;
  gap: 24px;
}

.format-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  width: 220px;
}

.format-label {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-tertiary);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.format-code {
  padding: 16px;
  background: var(--bg-surface);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.format-code code {
  display: block;
  min-height: 1.6em;
}

.format-arrow {
  color: var(--accent);
  flex-shrink: 0;
}

.format-card-rich {
  background: var(--page-bg);
}

.format-rich {
  padding: 16px;
  background: var(--page-bg);
}

.rich-h1 {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 8px;
}

.rich-p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rich-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 2px 0;
}

.rich-check::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
}

.rich-checked {
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.rich-checked::before {
  background: var(--accent);
  border-color: var(--accent);
  /* Checkmark via box-shadow trick */
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* ========================================================================
   FRAME Section
   ======================================================================== */
.frame-section {
  padding: 100px 0;
  background: var(--bg-elevated);
}

:root.dark .frame-section {
  background: var(--bg-surface);
}

.frame-layout {
  margin-top: 56px;
}

/* Two-step visual */
.frame-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
  margin-bottom: 56px;
}

.frame-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.frame-step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.frame-step-label code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

.frame-step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.frame-step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  padding-top: 200px;
  color: var(--text-tertiary);
}

/* Document mockup */
.frame-mockup {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.frame-mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.frame-mockup-titlebar-dark {
  background: var(--mock-elevated);
  border-color: var(--mock-border);
}

.frame-mockup-filename {
  font-size: 11.5px;
  color: var(--text-tertiary);
  flex: 1;
  text-align: center;
}

.frame-mockup-filename-dark {
  color: var(--mock-text-dim);
}

.frame-mockup-dots {
  display: flex;
  gap: 6px;
}

.frame-mockup-body {
  padding: 28px 32px;
  background: var(--page-bg);
}

.frame-mockup-dark {
  background: var(--mock-bg);
  border-color: var(--mock-border);
}

/* Document content */
.frame-doc {
  max-width: 480px;
}

.frame-doc-title {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 14px;
}

.frame-doc-h2 {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--page-text);
  margin: 16px 0 8px;
}

.frame-doc-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--page-text) 75%, transparent);
  margin-bottom: 10px;
  position: relative;
}

.frame-doc-text strong {
  color: var(--page-text);
  font-weight: 600;
}

.frame-doc-highlighted {
  background: color-mix(in srgb, var(--accent-secondary) 10%, transparent);
  border-left: 3px solid var(--accent-secondary);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 14px;
}

/* Comment cards — matches app's warm tinted sidebar comments */
.frame-comment-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fffefa;
  border: 1px solid #e8dcc8;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

:root.dark .frame-comment-card {
  background: var(--mock-surface);
  border-color: var(--mock-border);
  border-left-color: var(--accent);
}

.frame-comment-author {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.frame-comment-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--page-text);
}

:root.dark .frame-comment-text {
  color: var(--mock-text);
}

/* Terminal mockup */
.frame-terminal-body {
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--mock-text);
}

.frame-term-line {
  white-space: pre-wrap;
}

.frame-term-line strong {
  color: #ffffff;
  font-weight: 600;
}

.frame-term-prompt {
  color: var(--accent-secondary);
}

.frame-term-claude {
  color: var(--accent-secondary);
  font-weight: 700;
}

.frame-term-cmd {
  color: #ffffff;
}

.frame-term-dim {
  color: var(--mock-text-dim);
}

.frame-term-accent {
  color: var(--mock-accent);
  font-weight: 600;
}

.frame-term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--mock-accent);
  opacity: 0.7;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

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

/* Detail cards */
.frame-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

.frame-detail-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-base);
}

.frame-detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.frame-detail-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.frame-detail-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Principles */
.frame-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-base);
}

.frame-principle {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.frame-principle strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.frame-principle code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

/* ========================================================================
   Themes Section
   ======================================================================== */
.themes-section {
  padding: 100px 0;
}

.theme-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.theme-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.theme-preview {
  aspect-ratio: 16 / 10;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-bar {
  height: 8px;
  border-radius: 4px;
  opacity: 0.3;
}

.tp-body {
  flex: 1;
  display: flex;
  gap: 6px;
  border-radius: 4px;
  overflow: hidden;
}

.tp-sidebar {
  width: 28%;
  border-radius: 4px;
  opacity: 0.5;
}

.tp-editor {
  flex: 1;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-line {
  height: 6px;
  border-radius: 3px;
  width: 80%;
  opacity: 0.3;
}

.tp-line-h {
  width: 50%;
  height: 10px;
  border-radius: 5px;
  opacity: 0.5;
}

.tp-line-short {
  width: 55%;
}

/* Light theme card */
.theme-card-light .theme-preview {
  background: #f0f0f0;
}
.theme-card-light .tp-bar { background: #e0e0e0; }
.theme-card-light .tp-sidebar { background: #ffffff; }
.theme-card-light .tp-editor { background: #ffffff; }
.theme-card-light .tp-line { background: #1e1e1e; }

/* Tinted theme card */
.theme-card-tinted .theme-preview {
  background: #efe3c4;
}
.theme-card-tinted .tp-bar { background: #e0d4b8; }
.theme-card-tinted .tp-sidebar { background: #fcf1d4; }
.theme-card-tinted .tp-editor { background: #f7f3e6; }
.theme-card-tinted .tp-line { background: #5a4e48; }

/* Dark theme card */
.theme-card-dark .theme-preview {
  background: #1a1a1a;
}
.theme-card-dark .tp-bar { background: #383838; }
.theme-card-dark .tp-sidebar { background: #242424; }
.theme-card-dark .tp-editor { background: #2b2926; }
.theme-card-dark .tp-line { background: #e8e8e0; }

.theme-label {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  background: var(--bg-surface);
}

/* ========================================================================
   CTA Section
   ======================================================================== */
.cta-section {
  padding: 100px 0;
}

.cta-card {
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.cta-title {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cta-platforms {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========================================================================
   Footer
   ======================================================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-brand .logo-mark {
  width: 28px;
  height: 28px;
}

.footer-brand .logo-text {
  font-family: 'Clash Grotesk', 'Inter', sans-serif;
  font-size: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-copy a {
  color: var(--accent);
}

.footer-copy a:hover {
  text-decoration: underline;
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editor-split {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .format-demo {
    flex-direction: column;
  }

  .format-arrow {
    transform: rotate(90deg);
  }

  .format-card {
    width: 100%;
    max-width: 280px;
  }

  .frame-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .frame-step-arrow {
    transform: rotate(90deg);
    padding: 16px 0;
  }

  .frame-details,
  .frame-principles {
    grid-template-columns: 1fr;
  }

  .mockup-sidebar {
    display: none;
  }

  .mockup-body {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .nav-mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

  .theme-cards {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 48px;
  }

  .hero-mockup {
    margin-top: 40px;
  }

  .mockup-activity-bar {
    width: 36px;
  }

  .ab-icon {
    width: 28px;
    height: 28px;
  }

  .ab-icon svg {
    width: 14px;
    height: 14px;
  }

  .features,
  .editor-section,
  .themes-section,
  .cta-section {
    padding: 64px 0;
  }

  .cta-card {
    padding: 48px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
