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

:root {
  --cloop-50: #EEF2FF; --cloop-100: #E0E7FF; --cloop-200: #C7D2FE;
  --cloop-300: #A5B4FC; --cloop-400: #818CF8; --cloop-500: #6366F1;
  --cloop-600: #4F46E5; --cloop-700: #4338CA; --cloop-800: #3730A3;
  --cloop-900: #312E81; --cloop-950: #1E1B4B;

  --accent-50: #ECFDF5; --accent-100: #D1FAE5; --accent-200: #A7F3D0;
  --accent-400: #34D399; --accent-500: #10B981; --accent-600: #059669;

  --stone-50: #FAFAF9; --stone-100: #F5F5F4; --stone-200: #E7E5E4;
  --stone-300: #D6D3D1; --stone-400: #A8A29E; --stone-500: #78716C;
  --stone-600: #57534E; --stone-700: #44403C; --stone-800: #292524;
  --stone-900: #1C1917;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --tracking-tight: -0.025em;
  --tracking-wide: 0.05em;

  --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem;
  --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem;
  --space-3xl: 4rem; --space-4xl: 6rem;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
  --radius-xl: 24px; --radius-full: 9999px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--stone-900); background: var(--stone-50); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cloop-600); text-decoration: none; }
a:hover { color: var(--cloop-700); }
a, button, input { touch-action: manipulation; }
a.nav-cta, a.nav-cta:visited, a.hero-btn, a.hero-btn:visited { color: white; }

/* ─── Layout ───────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-xl); }
section { padding: var(--space-4xl) 0; }
.section-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--cloop-600);
  margin-bottom: var(--space-sm); text-align: center;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700;
  letter-spacing: var(--tracking-tight); text-align: center;
  margin-bottom: var(--space-lg); color: var(--stone-900);
}
.section-subtitle {
  text-align: center; color: var(--stone-500); max-width: 50ch;
  margin: 0 auto var(--space-2xl); font-size: 1.0625rem;
}

/* ─── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,249,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-200);
  transform: translateZ(0);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-sm) 0; gap: var(--space-lg);
}
.nav-brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; }
.nav-brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav-brand-name { font-weight: 700; font-size: 1.125rem; color: var(--stone-900); }
.nav-brand-sub { font-size: 0.75rem; color: var(--stone-400); margin-left: var(--space-xs); display: none; }
.nav-links { display: flex; align-items: center; gap: var(--space-lg); }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--stone-500);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--cloop-600); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover { color: white; }
.nav-lang {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; color: var(--stone-400);
  border: 1px solid var(--stone-200); border-radius: var(--radius-sm);
  padding: 2px 6px;
}
.nav-lang-link {
  color: var(--stone-500);
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 4px;
}
.nav-lang-link:visited { color: var(--stone-500); }
.nav-lang-link:hover {
  color: var(--cloop-600);
  background: var(--cloop-50);
}
.nav-lang-link-active,
.nav-lang-link-active:hover,
.nav-lang-link-active:visited {
  color: var(--cloop-600);
  background: var(--cloop-50);
}
.nav-console {
  padding: 0.3rem 0.7rem; font-size: 0.75rem !important; font-weight: 600;
  background: var(--accent-500); color: white !important; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-console:hover { background: var(--accent-600); color: white !important; }
.nav-cta {
  display: inline-flex; align-items: center; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 600; font-family: var(--font);
  background: var(--cloop-600); color: white; border: none;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s;
  text-decoration: none;
}
.nav-cta:hover { background: var(--cloop-700); color: white; }

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--cloop-950) 0%, var(--cloop-800) 40%, var(--cloop-600) 100%);
  color: white; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl);
  align-items: center; padding: var(--space-4xl) 0;
  position: relative; z-index: 1;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  letter-spacing: var(--tracking-tight); line-height: 1.1;
  margin-bottom: var(--space-lg);
}
.hero-sub {
  font-size: 1.125rem; color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-xl); max-width: 42ch; line-height: 1.5;
}
.hero-form { display: flex; gap: var(--space-sm); max-width: 480px; }
.hero-input {
  flex: 1; padding: 0.75rem 1rem; font-size: 0.9375rem; font-family: var(--font);
  border: 2px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); color: white; outline: none;
  transition: border-color 0.15s;
}
.hero-input::placeholder { color: rgba(255,255,255,0.5); }
.hero-input:focus { border-color: rgba(255,255,255,0.5); }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; font-size: 0.9375rem; font-weight: 600;
  font-family: var(--font); background: var(--accent-500); color: white;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap; transition: background 0.15s; text-decoration: none;
}
.hero-btn:hover { background: var(--accent-600); color: white; }
.hero-helper {
  font-size: 0.8125rem; color: rgba(255,255,255,0.5);
  margin-top: var(--space-sm);
}
.hero-trust {
  display: flex; gap: var(--space-lg); margin-top: var(--space-xl);
  font-size: 0.8125rem; color: rgba(255,255,255,0.6);
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 14px; height: 14px; opacity: 0.6; }
.hero-widget-hint {
  margin-top: var(--space-lg); font-size: 0.8125rem;
  color: rgba(255,255,255,0.5); font-style: italic;
}

/* Chat mockup */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
}
.chat-demo {
  width: 100%; max-width: 360px; background: white;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.chat-header {
  background: var(--cloop-600); color: white;
  padding: var(--space-md) var(--space-lg);
  display: flex; align-items: center; gap: var(--space-sm);
}
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-400); }
.chat-header-title { font-size: 0.875rem; font-weight: 600; }
.chat-body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.chat-msg {
  max-width: 85%; padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md); font-size: 0.8125rem; line-height: 1.5;
}
.chat-msg.bot {
  background: var(--stone-100); color: var(--stone-800);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--cloop-600); color: white;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-source {
  display: inline-block; margin-top: 4px;
  font-size: 0.6875rem; color: var(--cloop-500); font-weight: 500;
}
.chat-input-bar {
  border-top: 1px solid var(--stone-200);
  padding: var(--space-sm) var(--space-md);
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: 0.8125rem; color: var(--stone-400);
}
.chat-send-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cloop-600); border: none;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ─── Cards grid (Problem, Solution) ──────────────────── */
.cards-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.card {
  background: white; border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg); padding: var(--space-xl);
}
.card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md); color: white;
}
.card-icon.problem { background: var(--stone-700); }
.card-icon.solution { background: var(--cloop-600); }
.card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-sm); }
.card p { font-size: 0.9375rem; color: var(--stone-600); line-height: 1.6; }

/* ─── Origin story ─────────────────────────────────────── */
.origin {
  background: white; border: 1px solid var(--stone-200);
  border-radius: var(--radius-xl); padding: var(--space-3xl);
  text-align: center; max-width: 720px; margin: 0 auto;
}
.origin h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--space-md); }
.origin p { color: var(--stone-600); max-width: 55ch; margin: 0 auto var(--space-md); }
.origin-quote {
  font-style: italic; color: var(--stone-500); margin-top: var(--space-xl);
  padding-top: var(--space-lg); border-top: 1px solid var(--stone-200);
  font-size: 0.9375rem;
}
.origin-quote cite {
  display: block; font-style: normal; font-weight: 600;
  color: var(--stone-700); margin-top: var(--space-sm); font-size: 0.875rem;
}
.origin-byline {
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  margin-top: var(--space-lg); font-size: 0.8125rem; color: var(--stone-400);
}
.origin-byline a { color: var(--stone-500); }
.origin-byline a:hover { color: var(--cloop-600); }

/* ─── Steps ────────────────────────────────────────────── */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg); position: relative;
}
.step {
  text-align: center; padding: var(--space-xl);
  background: white; border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg); position: relative;
}
.step-number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cloop-600); color: white;
  font-weight: 700; font-size: 1.125rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-md);
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-xs); }
.step p { font-size: 0.875rem; color: var(--stone-500); }
.step-arrow {
  position: absolute; top: 50%; right: calc(-1 * var(--space-lg) / 2 - 10px);
  transform: translateY(-50%); color: var(--stone-300); z-index: 1;
}

/* ─── Showcase (split layout) ──────────────────────────── */
.showcase {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl); align-items: center;
}
.showcase-visual {
  display: flex; align-items: center; justify-content: center;
}
.chat-demo--lead { max-width: 100%; }
.chat-lead-capture {
  background: var(--cloop-50); border: 1px solid var(--cloop-200);
  border-radius: var(--radius-md); padding: var(--space-md);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.chat-lead-icon {
  color: var(--cloop-500);
}
.chat-lead-text strong {
  display: block; font-size: 0.8125rem; color: var(--stone-800);
}
.chat-lead-text span {
  font-size: 0.75rem; color: var(--stone-500);
}
.chat-lead-input {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border: 1px solid var(--stone-200);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 0.8125rem; color: var(--stone-600);
}
.chat-lead-sent {
  font-size: 0.75rem; font-weight: 600; color: var(--accent-500);
}
.showcase-benefits { list-style: none; display: flex; flex-direction: column; gap: var(--space-lg); }
.showcase-benefits li {
  display: flex; gap: var(--space-md); align-items: flex-start;
}
.benefit-icon {
  width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px;
  color: var(--accent-500);
}
.benefit-text strong { display: block; font-weight: 600; margin-bottom: 2px; }
.benefit-text span { font-size: 0.9375rem; color: var(--stone-500); }

/* ─── Console showcase ─────────────────────────────────── */
.console-showcase {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl); align-items: start;
}
.console-screenshot {
  border: 1px solid var(--stone-200); border-radius: var(--radius-lg);
  overflow: hidden;
}
.console-screenshot img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
}
.console-features {
  display: flex; flex-direction: column; gap: var(--space-xl);
}
.console-feature {
  display: flex; gap: var(--space-md); align-items: flex-start;
}
.console-feature-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--cloop-50); color: var(--cloop-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.console-feature strong {
  display: block; font-size: 1rem; margin-bottom: 2px;
}
.console-feature p {
  font-size: 0.9375rem; color: var(--stone-500); line-height: 1.5;
}
.console-cta {
  text-align: center; margin-top: var(--space-2xl);
}

/* ─── Build-it-yourself ────────────────────────────────── */
.build-section {
  background: var(--stone-900); color: white;
  border-radius: var(--radius-xl); padding: var(--space-3xl);
  text-align: center;
}
.build-section h2 { color: white; }
.build-section p { color: var(--stone-400); max-width: 50ch; margin: 0 auto var(--space-xl); }
.build-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-xl); text-align: left;
  max-width: 640px; margin: 0 auto var(--space-xl);
}
.build-grid span {
  font-size: 0.875rem; color: var(--stone-300);
  padding: var(--space-sm) 0; border-bottom: 1px solid var(--stone-700);
  display: flex; align-items: center; gap: var(--space-sm);
}
.build-grid span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cloop-400); flex-shrink: 0;
}
.build-punchline {
  font-size: 1.25rem; font-weight: 700; color: white; margin-top: var(--space-lg);
}

/* ─── FAQ ──────────────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--stone-200);
}
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-lg) 0; background: none; border: none;
  font-family: var(--font); font-size: 1rem; font-weight: 600;
  color: var(--stone-900); cursor: pointer; text-align: left;
}
.faq-question:hover { color: var(--cloop-600); }
.faq-icon {
  width: 24px; height: 24px; flex-shrink: 0; color: var(--stone-400);
  transition: transform 0.2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding-bottom: var(--space-lg); font-size: 0.9375rem;
  color: var(--stone-600); line-height: 1.7; max-width: 60ch;
}

/* ─── Final CTA ────────────────────────────────────────── */
.final-cta {
  background: var(--cloop-50); border-radius: var(--radius-xl);
  padding: var(--space-3xl); text-align: center;
}
.final-cta h2 { color: var(--stone-900); margin-bottom: var(--space-lg); }
.final-cta-form {
  display: flex; gap: var(--space-sm);
  max-width: 480px; margin: 0 auto var(--space-md);
}
.final-cta-input {
  flex: 1; padding: 0.75rem 1rem; font-size: 0.9375rem; font-family: var(--font);
  border: 1px solid var(--stone-300); border-radius: var(--radius-sm);
  background: white; outline: none;
}
.final-cta-input:focus { border-color: var(--cloop-500); box-shadow: 0 0 0 3px var(--cloop-100); }
.final-cta-helper { font-size: 0.8125rem; color: var(--stone-400); }

/* ─── Footer ───────────────────────────────────────────── */
.footer { border-top: 1px solid var(--stone-200); padding: var(--space-2xl) 0; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-tagline { font-size: 0.875rem; color: var(--stone-500); }
.footer-roffi { font-size: 0.8125rem; color: var(--stone-400); }
.footer-roffi a { color: var(--stone-500); }
.footer-fi { font-size: 0.8125rem; color: var(--stone-400); font-style: italic; margin-top: var(--space-xs); }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--stone-400);
  margin-bottom: var(--space-md);
}
.footer-col a {
  display: block; font-size: 0.875rem; color: var(--stone-600);
  margin-bottom: var(--space-sm); transition: color 0.15s;
}
.footer-col a:hover { color: var(--cloop-600); }
.footer-legal-note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--stone-400);
}
.footer-bottom {
  margin-top: var(--space-xl); padding-top: var(--space-lg);
  border-top: 1px solid var(--stone-200);
  font-size: 0.8125rem; color: var(--stone-400);
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-form { max-width: 100%; justify-content: center; }
  .hero-trust { justify-content: center; flex-wrap: wrap; }
  .hero-visual { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
  .showcase { grid-template-columns: 1fr; }
  .console-showcase { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-brand-sub { display: none; }
  .nav-links a.nav-hide-mobile { display: none; }
  .nav-links { gap: var(--space-sm); }
  .container { padding: 0 var(--space-md); }
  .nav-inner { gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
}

@media (min-width: 901px) {
  .nav-brand-sub { display: inline; }
}

@media (max-width: 480px) {
  .hero-form { flex-direction: column; }
  .final-cta-form { flex-direction: column; }
  .hero h1 { font-size: 1.75rem; }
  .nav-links { gap: var(--space-xs); }
  .nav-lang { font-size: 0.6875rem; padding: 2px 4px; gap: 4px; }
  .container { padding: 0 var(--space-sm); }
  .nav-inner { gap: var(--space-xs); padding: var(--space-sm); }
  .nav-console, .nav-cta {
    min-height: 38px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}
