/* ===================================
   KINDLED — Design System
   =================================== */

:root {
  --bg: #0F0906;
  --bg-card: #1A1109;
  --bg-raised: #251709;
  --fg: #F5EDE0;
  --fg-muted: #A89070;
  --fg-dim: #6B5540;
  --accent: #FF6B1A;
  --accent-light: #FF9A4D;
  --accent-dim: rgba(255, 107, 26, 0.15);
  --border: rgba(245, 237, 224, 0.08);
  --tag-bg: rgba(255, 107, 26, 0.12);
  --tag-text: #FF9A4D;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }

.btn-large { font-size: 1rem; padding: 1rem 2.25rem; }

/* ===================================
   HERO
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(255, 107, 26, 0.08) 0%, transparent 70%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.hero-headline-accent {
  display: block;
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  color: var(--fg-muted);
  font-size: 1.125rem;
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Ember orbs */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
}

.ember-orbs {
  position: relative;
  width: 300px;
  height: 300px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 26, 0.6) 0%, rgba(255, 107, 26, 0) 70%);
  animation: pulse 3s ease-in-out infinite;
}
.orb-1 { width: 200px; height: 200px; top: 20%; left: 10%; animation-delay: 0s; }
.orb-2 { width: 140px; height: 140px; top: 5%; right: 10%; animation-delay: 1s; background: radial-gradient(circle, rgba(255, 154, 77, 0.5) 0%, rgba(255, 154, 77, 0) 70%); }
.orb-3 { width: 100px; height: 100px; bottom: 10%; left: 30%; animation-delay: 2s; background: radial-gradient(circle, rgba(255, 200, 100, 0.4) 0%, rgba(255, 200, 100, 0) 70%); }

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

.agent-badge {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 8px #22C55E;
  animation: blink 2s ease-in-out infinite;
}

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

.badge-text {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
}

/* ===================================
   PAIN
   =================================== */
.pain {
  padding: 8rem 4rem;
  border-top: 1px solid var(--border);
}

.pain-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pain-label { margin-bottom: 2rem; }

.pain-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--fg);
  max-width: 700px;
  margin-bottom: 4rem;
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.pain-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.pain-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: var(--accent);
}

.pain-item p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ===================================
   FEATURES
   =================================== */
.features {
  padding: 8rem 4rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 50%, var(--bg) 100%);
}

.features-inner { max-width: 1200px; margin: 0 auto; }

.features-header { margin-bottom: 4rem; }

.features-headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--fg);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.feature-card {
  padding: 2.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  position: relative;
}

.feature-card-main {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-raised) 0%, rgba(255, 107, 26, 0.08) 100%);
  border-color: rgba(255, 107, 26, 0.2);
}

.feature-number {
  font-family: 'Fraunces', serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.feature-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--fg);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.feature-desc {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.feature-example {
  margin-top: 1.5rem;
  background: rgba(255, 107, 26, 0.06);
  border: 1px solid rgba(255, 107, 26, 0.15);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-msg {
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.chat-msg.user {
  background: rgba(255,255,255,0.05);
  color: var(--fg-muted);
  align-self: flex-start;
  max-width: 80%;
}

.chat-msg.ai {
  background: rgba(255, 107, 26, 0.15);
  color: var(--fg);
  align-self: flex-end;
  border-left: 2px solid var(--accent);
}

.feature-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.cta-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--fg-muted);
  text-align: center;
  line-height: 1.5;
}

.cta-attribution {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--fg-dim);
  text-align: center;
}

/* ===================================
   PROCESS
   =================================== */
.process {
  padding: 8rem 4rem;
  border-top: 1px solid var(--border);
}

.process-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.process-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--fg);
  margin: 1.5rem 0 4rem;
  max-width: 600px;
}

.process-steps {
  display: flex;
  align-items: center;
}

.step {
  flex: 1;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

.step-num {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 107, 26, 0.2);
  margin-bottom: 1rem;
}

.step-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  color: var(--fg);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.step-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  flex-shrink: 0;
  align-self: center;
}

/* ===================================
   CLOSER
   =================================== */
.closer {
  padding: 10rem 4rem 8rem;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.closer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.closer-headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--fg);
  max-width: 650px;
  margin-bottom: 1.5rem;
}

.closer-sub {
  color: var(--fg-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.flame-shape {
  width: 120px;
  height: 180px;
  background: radial-gradient(ellipse at bottom, var(--accent) 0%, rgba(255, 107, 26, 0.3) 40%, transparent 70%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  25% { transform: scaleY(1.03) scaleX(0.97); }
  50% { transform: scaleY(0.97) scaleX(1.03); }
  75% { transform: scaleY(1.02) scaleX(0.98); }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  padding: 3rem 4rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}

.footer-tagline {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.footer-copy {
  color: var(--fg-dim);
  font-size: 0.8rem;
}

/* ===================================
   MOBILE
   =================================== */
@media (max-width: 768px) {
  .hero { padding: 4rem 1.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { height: 200px; }
  .hero-sub { font-size: 1rem; }
  .pain { padding: 5rem 1.5rem; }
  .pain-grid { grid-template-columns: 1fr; }
  .features { padding: 5rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card-main { grid-column: span 1; }
  .process { padding: 5rem 1.5rem; }
  .process-steps { flex-direction: column; gap: 1rem; }
  .step-connector { width: 40px; height: 20px; background: linear-gradient(180deg, var(--border), var(--accent), var(--border)); }
  .closer { padding: 5rem 1.5rem; }
  .closer-inner { grid-template-columns: 1fr; }
  .flame-shape { display: none; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}