/* ==========================================================================
   Web Design Stack — Sophisticated Tech Aesthetic
   Inspired by: DeepJudge, BallSystem, Solowire
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Cream/warm palette inspired by DeepJudge */
  --color-bg: #f5f3ef;
  --color-bg-warm: #ebe7e0;
  --color-surface: #ffffff;
  --color-surface-alt: #faf9f7;
  
  --color-ink: #1a1a1a;
  --color-ink-muted: #5c5c5c;
  --color-ink-subtle: #8a8a8a;
  
  --color-accent: #6366f1;
  --color-accent-muted: rgba(99, 102, 241, 0.1);
  
  --color-success: #22c55e;
  --color-error: #ef4444;
  
  --color-border: rgba(26, 26, 26, 0.08);
  --color-border-strong: rgba(26, 26, 26, 0.15);
  
  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Fluid type scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1.05rem, 1rem + 0.25vw, 1.125rem);
  --text-xl: clamp(1.2rem, 1.1rem + 0.5vw, 1.375rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 4.5rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 6rem);
  
  /* Spacing */
  --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;
  --space-32: 8rem;
  
  /* Layout */
  --max-width: 1400px;
  --content-width: 1100px;
  --header-height: 4rem;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration: 200ms;
  --duration-slow: 400ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-8));
}

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

::selection {
  background-color: var(--color-accent-muted);
  color: var(--color-accent);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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

input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Background (removed barcode pattern)
   -------------------------------------------------------------------------- */
.barcode-bg {
  display: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(245, 243, 239, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: var(--text-xs);
}

.logo-divider {
  color: var(--color-ink-subtle);
}

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

.nav-version {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.nav-link {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  transition: color var(--duration) var(--ease-out);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link:hover {
  color: var(--color-ink);
}

.nav-link--external svg {
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 0;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-bg);
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-ink);
}

.btn-ghost:hover {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}

.btn-theme {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 1px solid var(--color-border-strong);
  font-size: var(--text-sm);
}

.btn-theme:hover {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-arrow {
  font-family: var(--font-mono);
  font-size: 1.1em;
  transition: transform var(--duration) var(--ease-out);
}

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

.btn-submit {
  width: 100%;
  padding: var(--space-4);
}

/* --------------------------------------------------------------------------
   Section Utilities
   -------------------------------------------------------------------------- */
section {
  position: relative;
  z-index: 1;
}

.section-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  letter-spacing: 0.05em;
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: var(--space-2);
}

.section-desc {
  color: var(--color-ink-muted);
  font-size: var(--text-base);
  max-width: 480px;
  margin-top: var(--space-3);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-height) + var(--space-16)) var(--space-6) var(--space-16);
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.label-dot {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.label-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink-muted);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.hero-title em {
  font-style: italic;
  color: var(--color-ink-muted);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-ink-muted);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

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

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--color-border);
}

/* Code Window */
.hero-right {
  position: relative;
}

.code-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 16px rgba(0,0,0,0.04);
}

.code-chrome {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

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

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-strong);
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-tab {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-right: -1px;
  margin-bottom: -1px;
}

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

.code-body pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.c-comment { color: var(--color-ink-subtle); }
.c-key { color: var(--color-ink); font-weight: 500; }
.c-attr { color: var(--color-ink-muted); margin-left: 1em; }
.c-string { color: var(--color-ink-muted); }
.c-value { color: var(--color-accent); }

.code-annotation {
  position: absolute;
  right: -120px;
  top: 50%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.annotation-line {
  width: 80px;
  height: 1px;
  background: var(--color-border-strong);
}

.annotation-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Comparison Section
   -------------------------------------------------------------------------- */
.comparison {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.comparison-header {
  margin-bottom: var(--space-12);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.comparison-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
}

.card-header {
  margin-bottom: var(--space-6);
}

.card-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-1) var(--space-3);
}

.card-badge--bad {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.card-badge--good {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

/* Mock UI */
.card-visual {
  aspect-ratio: 2/1;
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.mock-bad {
  height: 100%;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mock-nav {
  display: flex;
  justify-content: space-between;
}

.mock-logo {
  width: 40px;
  height: 12px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
}

.mock-links {
  display: flex;
  gap: var(--space-2);
}

.mock-links span {
  width: 32px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}

.mock-hero-bad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-2);
  flex: 1;
}

.mock-badge-bad {
  width: 80px;
  height: 16px;
  background: rgba(255,255,255,0.3);
  border-radius: 8px;
}

.mock-title-bad {
  width: 120px;
  height: 20px;
  background: white;
  border-radius: 2px;
}

.mock-text-bad {
  width: 160px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
}

.mock-btn-bad {
  width: 80px;
  height: 24px;
  background: white;
  border-radius: 4px;
  margin-top: var(--space-2);
}

/* Good mock */
.mock-good {
  height: 100%;
  background: var(--color-bg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
}

.mock-nav-good {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.mock-logo-good {
  width: 24px;
  height: 24px;
  background: var(--color-ink);
}

.mock-links-good {
  display: flex;
  gap: var(--space-3);
}

.mock-links-good span {
  width: 40px;
  height: 8px;
  background: var(--color-ink);
  opacity: 0.3;
}

.mock-hero-good {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mock-lines {
  display: flex;
  gap: 3px;
  height: 40px;
}

.mock-lines::before {
  content: '';
  display: block;
  width: 100%;
  background: 
    repeating-linear-gradient(
      90deg,
      var(--color-ink) 0px,
      var(--color-ink) 2px,
      transparent 2px,
      transparent 5px
    );
  opacity: 0.15;
}

.mock-title-good {
  width: 70%;
  height: 16px;
  background: var(--color-ink);
}

.mock-grid-good {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-top: auto;
}

.mock-grid-good > div {
  aspect-ratio: 4/3;
  background: var(--color-border-strong);
}

/* Card List */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.list-x {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-error);
}

.list-check {
  font-family: var(--font-mono);
  color: var(--color-success);
}

/* --------------------------------------------------------------------------
   Formats Section
   -------------------------------------------------------------------------- */
.formats {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.formats-header {
  margin-bottom: var(--space-10);
}

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

.format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease-out);
}

.format-btn:hover {
  border-color: var(--color-border-strong);
}

.format-btn.active {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}

.format-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: white;
  padding: 4px;
}

.format-name {
  font-weight: 500;
  font-size: var(--text-base);
}

.format-file {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
}

.format-btn.active .format-file {
  color: var(--color-ink-subtle);
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Themes Section (Bento Grid)
   -------------------------------------------------------------------------- */
.themes {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.themes-header {
  margin-bottom: var(--space-12);
}

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

.theme-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease-out);
  overflow: hidden;
}

.theme-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.theme-preview {
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.theme-card--large .theme-preview {
  min-height: 280px;
}

.theme-info {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.theme-info h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.theme-info p {
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  margin-bottom: var(--space-3);
}

.theme-card--large .theme-info p,
.theme-card--wide .theme-info p {
  margin-bottom: 0;
}

.theme-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.theme-tags span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg);
}

.theme-actions {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg);
}

.theme-actions .btn-theme {
  flex: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  transition: all var(--duration) var(--ease-out);
}

.theme-actions .btn-theme:first-child {
  border-right: 1px solid var(--color-border);
}

.theme-actions .btn-theme:hover {
  background: var(--color-ink);
  color: var(--color-bg);
}

/* Theme Preview Styles */

/* Minimalist */
.theme-preview--minimalist {
  background: #fafafa;
  position: relative;
}

.preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-6);
  text-align: center;
}

.preview-label-sm {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #aaa;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}

.preview-headline {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: #1a1a1a;
  font-style: italic;
}

.theme-preview--minimalist::before {
  content: '';
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd 20%, #ddd 80%, transparent);
}

.theme-preview--minimalist::after {
  content: '';
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd 20%, #ddd 80%, transparent);
}

/* Bold */
.theme-preview--bold {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.theme-preview--bold::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, transparent 70%);
}

.theme-preview--bold::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
}

.preview-bold-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6);
  position: relative;
  z-index: 1;
}

.preview-bold-accent {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #f472b6, #fbbf24);
}

.preview-bold-title {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1;
}

.preview-bold-subtitle {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Corporate */
.theme-preview--corporate {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.preview-corp-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  width: 100%;
  height: 100%;
}

.corp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.corp-logo {
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 4px;
}

.corp-nav {
  display: flex;
  gap: var(--space-2);
}

.corp-nav span {
  width: 40px;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.corp-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-top: var(--space-4);
}

.corp-bar {
  flex: 1;
  background: linear-gradient(to top, #0ea5e9, #38bdf8);
  border-radius: 2px 2px 0 0;
  min-height: 20%;
}

.corp-bar:nth-child(1) { height: 45%; }
.corp-bar:nth-child(2) { height: 65%; }
.corp-bar:nth-child(3) { height: 40%; }
.corp-bar:nth-child(4) { height: 80%; }
.corp-bar:nth-child(5) { height: 55%; }
.corp-bar:nth-child(6) { height: 70%; }

/* Creative */
.theme-preview--creative {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.preview-creative-shapes {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-preview--creative:hover .shape {
  transform: scale(1.1);
}

.shape-1 {
  width: 100px;
  height: 100px;
  background: #fde047;
  top: 10%;
  left: 15%;
  box-shadow: 0 0 40px rgba(253, 224, 71, 0.4);
}

.shape-2 {
  width: 80px;
  height: 80px;
  background: #f97316;
  top: 25%;
  left: 45%;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

.shape-3 {
  width: 50px;
  height: 50px;
  background: #ec4899;
  top: 55%;
  left: 25%;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.5);
}

.shape-4 {
  width: 30px;
  height: 30px;
  background: #8b5cf6;
  top: 15%;
  right: 20%;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* Dark Mode */
.theme-preview--darkmode {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.theme-preview--darkmode::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #22d3ee 50%, transparent);
  opacity: 0.5;
}

.preview-dark-content {
  padding: var(--space-5);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-dark-code {
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: rgba(255,255,255,0.03);
  padding: var(--space-4);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}

.dark-line {
  color: #666;
}

.dark-kw {
  color: #c084fc;
}

.dark-str {
  color: #4ade80;
}

.dark-accent {
  color: #22d3ee;
}

.dark-comment {
  color: #4b5563;
  font-style: italic;
}

.preview-dark-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Editorial */
.theme-preview--editorial {
  background: #faf8f5;
  position: relative;
}

.preview-editorial-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.editorial-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.editorial-dropcap {
  font-family: var(--font-serif);
  font-size: 72px;
  line-height: 0.8;
  color: #1c1917;
  font-weight: 400;
}

.editorial-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: #1c1917;
  font-style: italic;
  line-height: 1.3;
}

.editorial-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-3);
}

.editorial-lines span {
  height: 4px;
  background: #292524;
  opacity: 0.12;
  border-radius: 2px;
}

.editorial-lines span:nth-child(1) { width: 100%; }
.editorial-lines span:nth-child(2) { width: 90%; }
.editorial-lines span:nth-child(3) { width: 70%; }

.editorial-accent {
  width: 40px;
  height: 2px;
  background: #dc2626;
  margin-bottom: var(--space-3);
}

.editorial-lines span:nth-child(1) { width: 100px; }
.editorial-lines span:nth-child(2) { width: 80px; }
.editorial-lines span:nth-child(3) { width: 90px; }

/* --------------------------------------------------------------------------
   Builder Section
   -------------------------------------------------------------------------- */
.builder {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.builder-header {
  margin-bottom: var(--space-12);
}

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-8);
  align-items: start;
}

.builder-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Field Groups */
.field-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-5);
}

.field-group legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.field-group legend + * {
  clear: both;
}

.legend-content {
  flex: 1;
}

.legend-text {
  font-weight: 600;
  font-size: var(--text-sm);
  display: block;
  margin-bottom: var(--space-1);
}

.legend-hint {
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
  display: block;
}

.legend-icon {
  width: 24px;
  height: 24px;
  color: var(--color-ink-subtle);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

/* Color Inputs */
.color-row {
  display: flex;
  gap: var(--space-4);
}

.color-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.color-input input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: transparent;
}

.color-input input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.color-input input[type="color"]::-webkit-color-swatch {
  border: none;
}

.color-input label {
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
}

/* Select Fields */
.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

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

.select-field label {
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
}

.select-field select {
  padding: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.select-field select:focus {
  outline: none;
  border-color: var(--color-ink);
}

/* Radio Cards */
.radio-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

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

.radio-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-align: center;
  transition: all var(--duration) var(--ease-out);
}

.radio-card:hover {
  border-color: var(--color-border-strong);
}

.radio-card:has(input:checked) {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-label {
  font-size: var(--text-sm);
  font-weight: 500;
}

.radio-desc {
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* Checkboxes */
.checkbox-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all var(--duration) var(--ease-out);
}

.checkbox-item:hover {
  border-color: var(--color-border-strong);
}

.checkbox-item:has(input:checked) {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}

.checkbox-item input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-strong);
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  background: var(--color-surface);
  cursor: pointer;
}

.checkbox-item input:checked {
  background: var(--color-ink);
  border-color: var(--color-ink);
}

.checkbox-item input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-bg);
  font-size: 11px;
  font-weight: 700;
}

.checkbox-item:has(input:checked) input {
  background: var(--color-bg);
  border-color: var(--color-bg);
}

.checkbox-item:has(input:checked) input::after {
  color: var(--color-ink);
}

/* Builder Preview */
.builder-preview {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.preview-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.preview-filename {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
}

.btn-copy {
  padding: var(--space-2);
  color: var(--color-ink-subtle);
  transition: color var(--duration);
}

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

.preview-body {
  max-height: 500px;
  overflow-y: auto;
}

.preview-body pre {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   How It Works
   -------------------------------------------------------------------------- */
.how-it-works {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.how-header {
  margin-bottom: var(--space-12);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step-num {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--color-ink-subtle);
  line-height: 1;
}

.step-content h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.step-content p {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.step-connector {
  width: 60px;
  height: 1px;
  background: var(--color-border);
  margin-top: 24px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  padding: var(--space-20) var(--space-6);
  text-align: center;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta h2 {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.cta h2 em {
  font-style: italic;
}

.cta p {
  font-size: var(--text-lg);
  color: var(--color-ink-muted);
  margin-bottom: var(--space-8);
}

.cta-barcode {
  display: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-10) var(--space-6);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: var(--text-xs);
}

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

.footer-right {
  display: flex;
  gap: var(--space-6);
}

.footer-right a {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  transition: color var(--duration);
}

.footer-right a:hover {
  color: var(--color-ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: var(--space-6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(4px);
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration) var(--ease-out);
}

.modal[open] {
  opacity: 1;
  visibility: visible;
}

.modal::backdrop {
  background: transparent;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-8);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xl);
  color: var(--color-ink-subtle);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-ink);
}

.modal-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  background: var(--color-bg);
  margin-bottom: var(--space-4);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.modal-desc {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  margin-bottom: var(--space-6);
}

.modal-file {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}

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

.file-name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  flex: 1;
}

.file-size {
  font-size: var(--text-xs);
  color: var(--color-ink-subtle);
}

.modal-steps {
  margin-bottom: var(--space-6);
}

.modal-steps h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.modal-steps ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-5);
  list-style: decimal;
}

.modal-steps li {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
}

.modal-actions .btn {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: var(--space-3) var(--space-6);
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: var(--text-sm);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration) var(--ease-out);
  z-index: 1001;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .code-annotation {
    display: none;
  }
  
  .themes-bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-12));
  }
  
  .hero-right {
    order: -1;
  }
  
  .builder-layout {
    grid-template-columns: 1fr;
  }
  
  .builder-preview {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-right {
    gap: var(--space-4);
  }
  
  .nav-version {
    display: none;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    flex-wrap: wrap;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .themes-bento {
    grid-template-columns: 1fr;
  }
  
  .color-row {
    flex-wrap: wrap;
  }
  
  .color-input {
    min-width: calc(33% - var(--space-4));
  }
  
  .select-row {
    grid-template-columns: 1fr;
  }
  
  .radio-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .checkbox-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps {
    flex-direction: column;
    gap: var(--space-8);
  }
  
  .step-connector {
    display: none;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--space-6);
    text-align: center;
  }
  
  .footer-left {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .formats-grid {
    grid-template-columns: 1fr;
  }
  
  .radio-row,
  .radio-row--2 {
    grid-template-columns: 1fr;
  }
  
  .checkbox-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
