/* ============================================================
   Karii — Marketing Site
   Shared design system
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  /* Brand */
  --amber:       #EFA94A;
  --amber-light: #F4C677;
  --amber-deep:  #C88631;
  --amber-soft:  #FFF0DC;
  --teal:        #4BBFB8;
  --teal-light:  #72D4CE;
  --teal-deep:   #2D9590;
  --violet:      #6E56CF;

  /* Neutrals */
  --cream:    #F5F2EC;
  --warm:     #EAE6DE;
  --warm-deep:#D8D2C2;
  --white:    #FFFFFF;
  --ink:      #0D0F22;
  --ink-soft: #2A2D45;
  --dust:     #6B7280;
  --dust-light:#9CA3AF;

  /* Surfaces */
  --bg:           var(--cream);
  --bg-alt:       var(--warm);
  --surface:      #FFFFFF;
  --border:       #E2DED2;
  --border-soft:  #EDE9DD;

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  48px;
  --fs-4xl:  64px;
  --fs-5xl:  84px;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Radii */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(13, 15, 34, 0.04), 0 1px 3px rgba(13, 15, 34, 0.06);
  --shadow-md: 0 4px 12px rgba(13, 15, 34, 0.06), 0 2px 4px rgba(13, 15, 34, 0.04);
  --shadow-lg: 0 12px 32px rgba(13, 15, 34, 0.08), 0 4px 12px rgba(13, 15, 34, 0.05);
  --shadow-amber: 0 12px 32px rgba(239, 169, 74, 0.20), 0 4px 12px rgba(239, 169, 74, 0.12);

  /* Layout */
  --container: 1180px;
  --container-narrow: 880px;
}

/* ── Base ────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--amber); color: var(--ink); }

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: var(--fs-4xl); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-3xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { color: var(--ink-soft); }
.lead { font-size: var(--fs-md); line-height: 1.55; color: var(--ink-soft); }

a:not(.btn):not(.nav-link):not(.footer-link):not(.logo) {
  color: var(--amber-deep);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:not(.btn):not(.nav-link):not(.footer-link):not(.logo):hover {
  border-bottom-color: var(--amber-deep);
}

/* ── Layout primitives ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.section {
  padding: var(--s-9) 0;
}
.section-tight {
  padding: var(--s-7) 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-ink {
  background: var(--ink);
  color: var(--cream);
}
.section-ink h1, .section-ink h2, .section-ink h3, .section-ink h4 { color: var(--cream); }
.section-ink p, .section-ink .lead { color: rgba(245, 242, 236, 0.75); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: var(--s-4);
}
.section-ink .eyebrow { color: var(--amber-light); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: var(--ink);
  box-shadow: var(--shadow-amber);
}
.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(239, 169, 74, 0.28), 0 6px 16px rgba(239, 169, 74, 0.15);
}
.btn-secondary {
  background: var(--ink);
  color: var(--cream);
}
.btn-secondary:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-lg { padding: 18px 32px; font-size: var(--fs-md); }
.btn-sm { padding: 10px 18px; font-size: var(--fs-sm); }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}
.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.logo .hl { color: var(--amber-deep); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
}
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}
.nav-cta { margin-left: var(--s-2); }
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  align-items: center; justify-content: center;
}
.nav-mobile-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); position: relative;
}
.nav-mobile-toggle span::before,
.nav-mobile-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 20px; height: 2px; background: var(--ink);
}
.nav-mobile-toggle span::before { top: -6px; }
.nav-mobile-toggle span::after { top: 6px; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(245, 242, 236, 0.65);
  padding: var(--s-9) 0 var(--s-6);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}
.footer-brand .logo { color: var(--cream); font-size: 32px; }
.footer-brand .logo .hl { color: var(--amber); }
.footer-tagline { margin-top: var(--s-3); color: rgba(245, 242, 236, 0.55); max-width: 320px; }
.footer h5 {
  color: var(--cream);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.footer-link {
  display: block;
  color: rgba(245, 242, 236, 0.65);
  padding: 4px 0;
  transition: color 0.15s ease;
}
.footer-link:hover { color: var(--amber-light); }
.footer-bottom {
  border-top: 1px solid rgba(245, 242, 236, 0.08);
  padding-top: var(--s-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  color: rgba(245, 242, 236, 0.45);
  font-size: var(--fs-xs);
}

/* ── Cards & surfaces ────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  border-color: var(--warm-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-elevated {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow-md);
}
.card-feature {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.card-feature .number {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
  color: var(--amber-deep);
  font-weight: 700;
  font-size: var(--fs-md);
  margin-bottom: var(--s-4);
}

/* ── Hero shapes ─────────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--s-10) 0 var(--s-9);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(239, 169, 74, 0.25) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -300px; left: -300px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(75, 191, 184, 0.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: var(--fs-5xl);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: var(--s-5);
  max-width: 900px;
}
.hero-title .hl { color: var(--amber-deep); }
.hero-sub {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: var(--s-6);
  line-height: 1.55;
}
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ── Pill / Tag ──────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--amber-soft);
  color: var(--amber-deep);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-5);
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

/* ── Forms ───────────────────────────────────────────────── */
.field { margin-bottom: var(--s-5); }
.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(239, 169, 74, 0.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field-help {
  font-size: var(--fs-xs);
  color: var(--dust);
  margin-top: var(--s-2);
}
.form-status {
  padding: var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-4);
}
.form-status.success { background: #E8F6F5; color: var(--teal-deep); border: 1px solid var(--teal-light); }
.form-status.error { background: #FCE8E6; color: #B42318; border: 1px solid #F4A6A0; }

/* ── Kāi orb (simplified for marketing) ──────────────────── */
.kai-orb {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    var(--amber-light) 0%,
    var(--amber) 45%,
    var(--amber-deep) 100%);
  position: relative;
  box-shadow:
    0 0 60px rgba(239, 169, 74, 0.50),
    0 0 120px rgba(239, 169, 74, 0.25),
    inset 0 -8px 24px rgba(200, 134, 49, 0.3);
  animation: kai-float 6s ease-in-out infinite;
}
.kai-orb::before {
  content: '';
  position: absolute;
  inset: -24px;
  border: 1.5px solid rgba(75, 191, 184, 0.35);
  border-radius: 50%;
  animation: kai-halo 8s linear infinite;
}
.kai-orb::after {
  content: '';
  position: absolute;
  inset: -48px;
  border: 1px dashed rgba(75, 191, 184, 0.20);
  border-radius: 50%;
  animation: kai-halo 12s linear infinite reverse;
}
.kai-orb .eye {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--cream);
  border-radius: 50%;
  top: 50%; transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(110, 86, 207, 0.7);
  animation: kai-blink 6s ease-in-out infinite;
}
.kai-orb .eye-left  { left: 36%; }
.kai-orb .eye-right { right: 36%; }

@keyframes kai-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes kai-halo {
  to { transform: rotate(360deg); }
}
@keyframes kai-blink {
  0%, 92%, 100% { transform: translateY(-50%) scaleY(1); }
  95%           { transform: translateY(-50%) scaleY(0.1); }
}

/* ── Pricing table ───────────────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.price-card {
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--amber);
  box-shadow: var(--shadow-amber);
}
.price-card.featured::before {
  content: 'Most popular';
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
}
.price-tag { margin-bottom: var(--s-5); }
.price-tag .amount {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: inline-block;
}
.price-tag .period {
  display: inline-block;
  color: var(--dust);
  font-size: var(--fs-sm);
  margin-left: 6px;
}
.price-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--s-2); }
.price-desc { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--s-5); }
.price-features { list-style: none; margin-bottom: var(--s-6); flex: 1; }
.price-features li {
  padding: 10px 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  border-bottom: 1px solid var(--border-soft);
}
.price-features li:last-child { border-bottom: 0; }
.price-features li::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--amber-soft);
  background-image: linear-gradient(135deg, transparent 50%, var(--amber-deep) 50%);
  flex-shrink: 0;
  margin-top: 3px;
}
.price-features li.muted { color: var(--dust); }
.price-features li.muted::before {
  background: var(--warm);
  background-image: none;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s-5) 0;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--dust);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 0 var(--s-5);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 640px;
}

/* ── Misc utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.center-block { margin-left: auto; margin-right: auto; }
.mb-3 { margin-bottom: var(--s-3); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-7 { margin-bottom: var(--s-7); }
.mt-7 { margin-top: var(--s-7); }
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--s-7) 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 880px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-lg); }

  .hero-title { font-size: var(--fs-4xl); }
  .hero { padding: var(--s-8) 0 var(--s-7); }
  .section { padding: var(--s-8) 0; }
  .section-tight { padding: var(--s-7) 0; }

  .grid-2, .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-mobile-toggle.open + .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: var(--s-5);
    border-bottom: 1px solid var(--border-soft);
    gap: var(--s-4);
  }
}

@media (max-width: 520px) {
  .hero-title { font-size: var(--fs-3xl); }
  .footer-grid { grid-template-columns: 1fr; }
  .price-tag .amount { font-size: 36px; }
  .container, .container-narrow { padding: 0 var(--s-4); }
}
