/*
  Kafoo landing page styles.
  Extends design-system.css. All colors route through design-system tokens —
  raw hex only appears inside var(--foo, #hex) fallbacks.
*/

.landing-body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-primary, "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif);
  min-height: 100vh;
  line-height: 1.6;
}

/* =========================================================================
   HEADER + NAV + LANG TOGGLE
   ========================================================================= */

.landing-header {
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-sidebar);
  color: var(--text-on-dark);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-sidebar);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: auto;
}

.landing-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.landing-nav a:hover {
  color: var(--text-primary);
}

.landing-nav .nav-login {
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
}

.landing-nav .nav-login:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.lang-toggle {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  gap: 2px;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.lang-btn-active {
  background: var(--bg-sidebar);
  color: var(--text-on-dark);
}

/* =========================================================================
   GENERIC SECTION RHYTHM
   ========================================================================= */

.landing-section {
  padding: 80px 24px;
}

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

.section-inner-narrow {
  max-width: 780px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.section-eyebrow {
  text-align: center;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin-bottom: 20px;
}

/* =========================================================================
   HERO — editorial 2-column split
   ========================================================================= */

.landing-hero {
  background: linear-gradient(
    180deg,
    var(--bg-canvas) 0%,
    var(--bg-elevated) 100%
  );
  padding: 80px 24px 120px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.hero-copy {
  min-width: 0;
}

.hero-headline {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.hero-subtitle-en {
  font-size: 16px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 32px;
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn-lg:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Hero visual — WhatsApp mockup */

.hero-visual {
  display: flex;
  justify-content: center;
}

.wa-phone-frame {
  width: 100%;
  max-width: 380px;
  background: var(--bg-sidebar);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  color: var(--text-on-dark);
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid var(--border-on-dark);
}

.wa-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-sidebar);
}

.wa-name {
  font-weight: 700;
  font-size: 15px;
}

.wa-status {
  font-size: 12px;
  color: var(--text-on-dark-secondary);
}

.wa-chat-body {
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}

.wa-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  animation: fade-in-up 500ms ease forwards;
}

.wa-bubble-client {
  align-self: flex-end;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.wa-bubble-agent {
  align-self: flex-start;
  background: var(--accent);
  color: var(--bg-sidebar);
  border-bottom-left-radius: 4px;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   SOCIAL-PROOF STRIP
   ========================================================================= */

.section-social {
  padding: 40px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.social-logos {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: center;
  color: var(--text-tertiary);
}

.social-logo {
  opacity: 0.6;
}

/* =========================================================================
   HOW IT WORKS — 3-step grid
   ========================================================================= */

.section-how {
  background: var(--bg-canvas);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  padding: 32px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-card p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* =========================================================================
   PILLARS — 4-card grid
   ========================================================================= */

.section-pillars {
  background: var(--bg-elevated);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pillar-card {
  padding: 28px 20px;
  background: var(--bg-surface);
  border-radius: 14px;
  border: 1px solid var(--border-default);
}

.pillar-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.pillar-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* =========================================================================
   PRICING — 2-column (Free active / Premium disabled)
   ========================================================================= */

.section-pricing {
  background: var(--bg-canvas);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  padding: 36px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.pricing-card-free {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
}

.pricing-card-premium {
  opacity: 0.65;
}

.pricing-badge-coming {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.pricing-tier {
  font-size: 14px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
}

.pricing-unit {
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 15px;
}

.pricing-features li:last-child {
  border-bottom: 0;
}

.pricing-cta {
  width: 100%;
}

/* =========================================================================
   FAQ — native <details>
   ========================================================================= */

.section-faq {
  background: var(--bg-elevated);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 18px 24px;
}

.faq-item > summary {
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item > summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  transition: transform 200ms ease;
}

.faq-item[open] > summary::after {
  transform: rotate(45deg);
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* =========================================================================
   WAITLIST FORM
   ========================================================================= */

.section-waitlist {
  background: var(--bg-canvas);
  padding-bottom: 120px;
}

.landing-form,
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-surface);
  padding: 32px;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label,
.form-fieldset legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-field input,
.form-field select {
  padding: 11px 14px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface);
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-fieldset {
  border: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-fieldset legend {
  width: 100%;
  margin-bottom: 4px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.radio-pill:hover {
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.form-feedback {
  font-size: 14px;
  color: var(--text-secondary);
}

.waitlist-thankyou {
  text-align: center;
  padding: 40px 32px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: 16px;
}

.waitlist-thankyou h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.waitlist-thankyou p {
  color: var(--text-secondary);
}

/* =========================================================================
   LOGIN PAGE
   ========================================================================= */

.login-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-header {
  flex-shrink: 0;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
  text-align: center;
}

.login-footnote {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

.login-footnote a {
  color: var(--accent);
}

.login-footer {
  flex-shrink: 0;
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.landing-footer {
  background: var(--bg-sidebar);
  color: var(--text-on-dark);
  padding: 60px 24px 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 20px;
}

.footer-tagline {
  color: var(--text-on-dark-secondary);
  font-size: 14px;
  max-width: 420px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  color: var(--text-on-dark-secondary);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent);
}

.legal-draft-tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  background: var(--warning-bg);
  color: var(--warning-text);
  letter-spacing: 0.06em;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-on-dark);
  color: var(--text-on-dark-secondary);
  font-size: 13px;
  text-align: center;
}

.footer-bottom a {
  color: var(--text-on-dark);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .step-grid {
    grid-template-columns: 1fr;
  }
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .landing-nav {
    display: none; /* minimal mobile header; room for a hamburger post-pilot */
  }
}

@media (max-width: 520px) {
  .pillar-grid {
    grid-template-columns: 1fr;
  }
  .landing-section {
    padding: 60px 20px;
  }
  .section-header h2 {
    font-size: 28px;
  }
}
