/* Klaro AI Landing Page — Design System Tokens for Web */
/* Based on klaro-design-system-v2.0.md, adapted for responsive web */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=Playfair+Display:wght@600&display=swap');

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

:root {
  /* Surfaces */
  --surface-page: #F5F2EE;
  --surface-card: #FFFFFF;
  --surface-input: #FAF9F7;
  --surface-voice-stage: #FAF8F5;
  --surface-divider: #E7E5E4;

  /* Text */
  --text-primary: #1C1917;
  --text-secondary: #44403C;
  --text-muted: #A8A29E;
  --text-inverse: #FFFFFF;
  --text-link: #B45309;

  /* Accents */
  --color-amber: #B45309;
  --color-amber-light: #FEF3C7;
  --color-teal: #0F766E;
  --color-teal-light: #CCFBF1;
  --color-purple: #7C3AED;
  --color-purple-light: #EDE9FE;

  /* CTA */
  --cta-cream: #F5F0E8;
  --cta-cream-hover: #EBE5DA;
  --cta-dark: #1C1917;
  --cta-dark-hover: #292524;

  /* Goals */
  --goal-career-work: #1E40AF;
  --goal-confidence: #BE185D;
  --goal-travel: #4338CA;
  --goal-daily-life: #B45309;
  --goal-study: #475569;
  --goal-social: #0F766E;

  /* Semantic */
  --semantic-success: #059669;
  --semantic-warning: #D97706;
  --semantic-error: #DC2626;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Radii */
  --radius-input: 12px;
  --radius-card: 16px;
  --radius-bubble: 18px;
  --radius-sheet: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(28, 25, 23, 0.10);
  --shadow-card-hover: 0 4px 16px rgba(28, 25, 23, 0.14);
  --shadow-elevated: 0 8px 24px rgba(28, 25, 23, 0.16);

  /* Motion */
  --motion-fast: 100ms;
  --motion-base: 200ms;
  --motion-slow: 260ms;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text-primary);
  background: var(--surface-page);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Typography ---- */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-sans { font-family: 'DM Sans', system-ui, sans-serif; }

.t-page-headline { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.2; }
.t-section-headline { font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 600; line-height: 1.2; }
.t-card-title { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600; }
.t-body { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 400; line-height: 1.6; }
.t-description { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400; }
.t-caption { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500; }
.t-tag { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

@media (min-width: 768px) {
  .t-page-headline { font-size: 56px; }
  .t-section-headline { font-size: 40px; }
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 768px) {
  .container { padding-left: 64px; padding-right: 64px; }
}

.section { padding: 80px 0; }
@media (min-width: 768px) { .section { padding: 112px 0; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--motion-fast) ease;
  padding: 14px 32px;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-dark {
  background: var(--cta-dark);
  color: var(--text-inverse);
}
.btn-dark:hover { background: var(--cta-dark-hover); }

.btn-cream {
  background: var(--cta-cream);
  color: var(--text-primary);
}
.btn-cream:hover { background: var(--cta-cream-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 16px; height: 48px; }
.btn-full { width: 100%; }

/* ---- Cards ---- */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card-elevated { box-shadow: var(--shadow-card-hover); }

.card-accent-left {
  border-left: 4px solid var(--color-amber);
}

/* ---- Inputs ---- */
.input-field {
  width: 100%;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  background: var(--surface-card);
  border: 1px solid var(--surface-divider);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--motion-fast) ease;
}

.input-field::placeholder { color: var(--text-muted); }
.input-field:focus { border-color: var(--color-amber); border-width: 2px; padding: 13px 19px; }

/* ---- Badge ---- */
.badge-pill {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  transition: all var(--motion-base) ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.navbar-brand {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.navbar-links {
  display: none;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .navbar-links { display: flex; }
}

.navbar-links a {
  font-size: 14px;
  color: #78716C;
  transition: color var(--motion-fast) ease;
}
.navbar-links a:hover { color: var(--text-primary); }

.navbar-cta { display: none; }
@media (min-width: 768px) { .navbar-cta { display: block; } }

.navbar-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
}
@media (min-width: 768px) { .navbar-mobile-toggle { display: none; } }

.navbar-mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--surface-divider);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
}

.navbar-mobile-menu.open { display: flex; flex-direction: column; gap: 16px; }

.navbar-mobile-menu a {
  font-size: 14px;
  color: #78716C;
  padding: 4px 0;
}

/* ---- Accordion (FAQ) ---- */
.accordion-item { border-bottom: 1px solid var(--surface-divider); }
.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  gap: 16px;
}

.accordion-trigger svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--motion-base) ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content-inner {
  padding-bottom: 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.accordion-item.open .accordion-trigger svg { transform: rotate(180deg); }
.accordion-item.open .accordion-content { max-height: 300px; }

/* ---- Footer ---- */
.footer {
  background: var(--surface-card);
  border-top: 1px solid var(--surface-divider);
  padding: 48px 0;
}

/* ---- Sticky Mobile CTA ---- */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: white;
  padding: 12px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
  .sticky-mobile-cta.visible { display: block; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-amber { color: var(--color-amber); }
.text-teal { color: var(--color-teal); }
.text-purple { color: var(--color-purple); }
.text-inverse { color: var(--text-inverse); }
.text-error { color: var(--semantic-error); }

.bg-page { background: var(--surface-page); }
.bg-white { background: var(--surface-card); }
.bg-warm { background: #FFFBF5; }
.bg-voice { background: var(--surface-voice-stage); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .md-grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .md-grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.max-w-sm { max-width: 400px; }
.max-w-md { max-width: 520px; }
.max-w-lg { max-width: 680px; }
.max-w-xl { max-width: 768px; }
.max-w-2xl { max-width: 960px; }
.max-w-3xl { max-width: 1080px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mb-16 { margin-bottom: 64px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.p-10 { padding: 40px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }

.rounded-full { border-radius: var(--radius-pill); }
.rounded-2xl { border-radius: var(--radius-card); }
.rounded-xl { border-radius: var(--radius-input); }
.rounded-lg { border-radius: 8px; }

.shadow-card { box-shadow: var(--shadow-card); }
.shadow-hover { box-shadow: var(--shadow-card-hover); }

.border-t { border-top: 1px solid var(--surface-divider); }
.border-b { border-bottom: 1px solid var(--surface-divider); }
.border-y { border-top: 1px solid var(--surface-divider); border-bottom: 1px solid var(--surface-divider); }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.relative { position: relative; }
.absolute { position: absolute; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-in.visible:nth-child(2) { transition-delay: 0.1s; }
.animate-in.visible:nth-child(3) { transition-delay: 0.2s; }
.animate-in.visible:nth-child(4) { transition-delay: 0.3s; }

/* ---- Table ---- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: center;
}

.comparison-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-input);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
}

.comparison-table td {
  color: var(--text-secondary);
  border-top: 1px solid var(--surface-divider);
}

.comparison-table .col-klaro {
  background: var(--color-amber-light);
}

.comparison-table th.col-klaro {
  color: var(--text-primary);
  font-weight: 700;
}
