/* ========================================================================
   VisionFlow — Warm Editorial Design System
   ======================================================================== */

:root {
  /* Colors – Warm, Spiritual, Grounded */
  --bg-primary: #FAF7F2;
  --bg-secondary: #F5EFE7;
  --bg-card: #FFFFFF;
  --text-primary: #2C2419;
  --text-secondary: #6B5D52;
  --text-muted: #9B8C7F;
  
  --accent-gold: #D4A373;
  --accent-rust: #C7856A;
  --accent-sage: #A8B5A0;
  
  --border-subtle: rgba(107, 93, 82, 0.12);
  --shadow-soft: 0 2px 12px rgba(44, 36, 25, 0.06);
  --shadow-lift: 0 8px 32px rgba(44, 36, 25, 0.12);
  
  /* Typography */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  
  /* Layout */
  --max-w-text: 42rem;
  --max-w-wide: 68rem;
  --radius: 8px;
  --radius-lg: 16px;
}

/* ========================================================================
   Reset & Base
   ======================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grain texture overlay */
.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

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

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

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

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

.display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-rust);
}

.h2-serif {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
}

.lede {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: var(--max-w-text);
}

/* ========================================================================
   Layout
   ======================================================================== */

.site-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.brand-mark {
  font-size: 1.75rem;
  color: var(--accent-gold);
}

.brand-name em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-rust);
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.site-nav a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.site-main {
  flex: 1;
}

.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.foot-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.foot-inner p { margin: 0.5rem 0; }
.foot-inner a { text-decoration: underline; }
.foot-tag { font-style: italic; color: var(--text-secondary); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-rust), var(--accent-gold));
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.btn-block { width: 100%; }
.btn-wide { min-width: 16rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ========================================================================
   Hero Section (Landing)
   ======================================================================== */

.hero {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w-text);
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

.hero .eyebrow { animation-delay: 0.1s; }
.hero .display { animation-delay: 0.2s; margin: var(--space-md) 0; }
.hero .lede { animation-delay: 0.3s; margin-bottom: var(--space-lg); }
.hero .cta-row { animation-delay: 0.4s; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--space-md);
}

.trust {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-art {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  height: 80%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  padding: 2rem;
  opacity: 0.3;
}

.tile {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-sage), var(--accent-gold));
  animation: float 6s ease-in-out infinite;
}

.tile:nth-child(1) { animation-delay: 0s; }
.tile:nth-child(2) { animation-delay: 0.5s; }
.tile:nth-child(3) { animation-delay: 1s; }
.tile:nth-child(4) { animation-delay: 1.5s; }
.tile:nth-child(5) { animation-delay: 2s; }
.tile:nth-child(6) { animation-delay: 2.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================================
   Content Sections (Landing)
   ======================================================================== */

.why, .how, .pricing {
  padding: var(--space-xl) var(--space-lg);
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.why-grid, .how-row {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.why-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.why-card {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.why-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
}

.why-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.why-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.how-row { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.how-item {
  padding: var(--space-lg);
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-card);
  border-radius: var(--radius);
}

.how-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-rust);
  margin-bottom: var(--space-xs);
}

.how-item h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.how-item p {
  color: var(--text-secondary);
}

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

.pricing {
  display: flex;
  justify-content: center;
}

.price-card {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 2px solid var(--accent-gold);
  max-width: 28rem;
  text-align: center;
}

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  margin: var(--space-lg) 0;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent-rust);
}

.price-currency {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.price-note {
  font-size: 1rem;
  color: var(--text-muted);
}

.price-list {
  list-style: none;
  text-align: left;
  margin: var(--space-lg) 0;
  padding: 0;
}

.price-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  padding-left: 1.75rem;
}

.price-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-sage);
  font-weight: 700;
}

/* ========================================================================
   Wizard
   ======================================================================== */

.wizard-container {
  max-width: 52rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.wizard-progress {
  margin-bottom: var(--space-lg);
}

.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-rust));
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.wizard-card {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.wizard-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.wizard-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: var(--space-lg);
}

.option-card {
  cursor: pointer;
  position: relative;
  border-radius: var(--radius);
  border: 2px solid var(--border-subtle);
  background: var(--bg-secondary);
  transition: all 0.2s;
  overflow: hidden;
}

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

.option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  text-align: center;
}

.option-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
}

.option-label {
  font-weight: 500;
}

.option-card:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card);
}

.option-card:has(input:checked),
.option-card.checked {
  border-color: var(--accent-rust);
  background: var(--bg-card);
  box-shadow: 0 0 0 2px rgba(199, 133, 106, 0.2);
}

.option-card input:checked + .option-inner {
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.15), rgba(199, 133, 106, 0.15));
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: var(--space-lg);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border-subtle);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.option-row:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card);
}

.option-row input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent-rust);
}

.option-row input:checked ~ .option-text {
  font-weight: 600;
}

.wizard-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  resize: vertical;
  min-height: 10rem;
  margin-bottom: var(--space-lg);
  font-size: 1.05rem;
  line-height: 1.6;
}

.wizard-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--bg-card);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.wizard-error {
  margin-top: var(--space-md);
  padding: 1rem;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: var(--radius);
  color: #842029;
  font-size: 0.95rem;
}

/* ========================================================================
   Processing
   ======================================================================== */

.processing-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.processing-card {
  max-width: 32rem;
  text-align: center;
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.processing-visual {
  margin-bottom: var(--space-lg);
}

.spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 6px solid var(--bg-secondary);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.processing-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  min-height: 2rem;
}

.processing-progress {
  margin-bottom: var(--space-lg);
}

.progress-percent {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-rust);
  margin-top: var(--space-sm);
}

.processing-info {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.processing-info p {
  margin: 0.25rem 0;
}

/* ========================================================================
   Download
   ======================================================================== */

.download-container {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.download-hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.download-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.download-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: var(--max-w-text);
  margin: 0 auto;
}

.download-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.download-card {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.card-primary {
  border: 2px solid var(--accent-gold);
  box-shadow: var(--shadow-lift);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
}

.card-icon {
  font-size: 2rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.card-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.item-label strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.item-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.download-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.thumb-link {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  transition: all 0.2s;
}

.thumb-link:hover {
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

.thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-footer {
  margin-top: var(--space-xl);
}

.download-footer h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.tip-card {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-sage);
}

.tip-card strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tip-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.upsell-banner {
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.1), rgba(199, 133, 106, 0.1));
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-gold);
  text-align: center;
}

.upsell-banner h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.upsell-banner p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  max-width: var(--max-w-text);
  margin-left: auto;
  margin-right: auto;
}

/* ========================================================================
   Responsive
   ======================================================================== */

@media (max-width: 768px) {
  .hero-art { display: none; }
  .hero { min-height: auto; padding: var(--space-lg); }
  .cta-row { flex-direction: column; }
  .btn-wide { min-width: auto; width: 100%; }
  .option-grid { grid-template-columns: 1fr; }
  .wizard-actions { flex-direction: column-reverse; }
}
