/* ============================================================
   Entscheid.io landing page
   Styled from the app's design tokens (entscheid.io/theme/tokens.js):
   - fonts:    Inter (sans) + Caveat (display accent)
   - primary:  cyan.600 #0891b2 (FAB / links), cyan.700 #0e7490
   - surface:  blueGray.50 #f8fafc, cards #fff
   - text:     blueGray.800 #1e293b / blueGray.500 #64748b
   - border:   blueGray.200 #e2e8f0
   - radius:   12 / 16 / 24 / full
   ============================================================ */

:root {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --primary-50: #ecfeff;
  --primary-100: #cffafe;
  --surface: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-2: #64748b;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, .08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, .12);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Caveat', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Header ---------------- */
#header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo {
  font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px;
  display: inline-flex; align-items: center;
}
.logo img { display: block; margin-right: 10px; }
.logo span { color: var(--primary); }

#navbar { display: flex; align-items: center; gap: 28px; }
#navbar a { color: var(--text-2); font-weight: 500; font-size: 15px; }
#navbar a:hover { color: var(--primary); }
#navbar .btn-docs {
  background: var(--primary); color: #fff; font-weight: 600;
  padding: 9px 20px; border-radius: 9999px; box-shadow: var(--shadow-sm);
}
#navbar .btn-docs:hover { background: var(--primary-dark); color: #fff; }

.nav-toggle { display: none; font-size: 24px; background: none; border: none; color: var(--text); cursor: pointer; }

/* ---------------- Hero ---------------- */
#hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.eyebrow {
  font-family: var(--font-display); font-size: 28px; color: var(--primary);
  transform: rotate(-1.5deg); margin-bottom: 4px;
}
#hero h1 {
  font-size: 52px; line-height: 1.1; font-weight: 800; letter-spacing: -1.5px;
  margin-bottom: 18px;
}
#hero .sub { font-size: 18px; color: var(--text-2); max-width: 34em; margin-bottom: 28px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.download-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: #fff; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 9999px; transition: transform .15s, box-shadow .15s;
}
.download-btn em { font-style: normal; font-weight: 400; opacity: .7; }
.download-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.download-btn.muted { background: #e2e8f0; color: var(--text-2); }
.download-btn.muted:hover { color: var(--text); }

.privacy-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  color: var(--primary-dark); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 9999px;
}

/* Phone frames */
.phone-frame {
  border-radius: 32px; overflow: hidden;
  border: 6px solid var(--text);
  box-shadow: var(--shadow-lg);
  background: var(--text);
  max-width: 300px;
}
.phone-frame img { border-radius: 24px; }
.hero-phone { display: flex; justify-content: center; }
.hero-phone .phone-frame { max-width: 320px; transform: rotate(2deg); }

/* ---------------- Sections ---------------- */
section { padding: 72px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-title h2 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.section-title p { color: var(--text-2); }

/* ---------------- Tools grid ---------------- */
#tools { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tools-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.tool-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 20px; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  border-left: 4px solid var(--accent);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tool-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent); margin-bottom: 14px;
}
.tool-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.tool-card p { font-size: 14px; color: var(--text-2); }
.tool-card.cta { background: var(--accent-bg); border-color: var(--primary-100); }

/* ---------------- Feature rows ---------------- */
.feature-row {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center;
  padding: 40px 0;
}
.feature-row.flip .feature-phone { order: 2; }
.feature-row.flip .feature-copy { order: 1; }
.feature-phone { display: flex; justify-content: center; }

.feature-tag {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--accent); background: var(--accent-bg);
  padding: 5px 14px; border-radius: 9999px; margin-bottom: 12px;
}
.feature-copy h3 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 12px; }
.feature-copy > p { color: var(--text-2); margin-bottom: 16px; }
.feature-copy ul { list-style: none; }
.feature-copy li {
  padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--text);
}
.feature-copy li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--primary); font-weight: 700;
}

/* Compact three-phone gallery */
.phone-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 48px; text-align: center;
}
.phone-gallery .phone-frame { margin: 0 auto 14px; max-width: 240px; }
.phone-gallery figcaption { font-size: 14px; color: var(--text-2); max-width: 240px; margin: 0 auto; }

/* ---------------- Assistant ---------------- */
#assistant { background: #0f172a; color: #f1f5f9; }
.assistant-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.assistant-copy h2 { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 14px; }
.assistant-copy > p { color: #94a3b8; margin-bottom: 20px; }
.assistant-copy ul { list-style: none; }
.assistant-copy li { padding-left: 28px; position: relative; margin-bottom: 14px; color: #cbd5e1; }
.assistant-copy li::before { content: "✦"; position: absolute; left: 0; color: #22d3ee; }
.assistant-copy strong { color: #f1f5f9; }

.chat-mock {
  background: #1e293b; border: 1px solid #334155; border-radius: var(--radius-xl);
  padding: 20px; box-shadow: var(--shadow-lg); max-width: 420px; justify-self: center;
}
.chat-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: #94a3b8;
  padding-bottom: 12px; border-bottom: 1px solid #334155; margin-bottom: 14px;
}
.chat-header .dot { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; }
.bubble {
  padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5;
  margin-bottom: 10px; max-width: 90%;
}
.bubble.user { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.bot { background: #334155; color: #e2e8f0; border-bottom-left-radius: 4px; }

/* ---------------- Docs strip ---------------- */
#docs-strip { padding: 40px 0; }
.docs-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: var(--radius-xl); padding: 32px 40px;
}
.docs-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.docs-card p { color: var(--text-2); }
.btn-primary {
  flex-shrink: 0; background: var(--primary); color: #fff; font-weight: 600;
  padding: 12px 26px; border-radius: 9999px; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

/* ---------------- FAQ ---------------- */
#faq { background: #fff; border-top: 1px solid var(--border); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.faq-list summary {
  font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 28px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 0; top: 0;
  color: var(--primary); font-size: 20px; font-weight: 700; line-height: 1.2;
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin-top: 10px; color: var(--text-2); font-size: 15px; }

/* ---------------- Footer ---------------- */
#footer { background: #0f172a; color: #94a3b8; padding: 56px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 40px; padding-bottom: 32px; }
#footer .logo { font-size: 22px; color: #f1f5f9; }
#footer h4 { color: #f1f5f9; font-size: 15px; margin-bottom: 10px; }
#footer ul { list-style: none; }
#footer li { margin-bottom: 6px; }
#footer a { color: #94a3b8; }
#footer a:hover { color: #22d3ee; }
#footer .social {
  display: inline-flex; width: 38px; height: 38px; border-radius: 50%;
  background: #1e293b; color: #94a3b8; align-items: center; justify-content: center;
  margin-top: 10px;
}
#footer .social:hover { background: var(--primary); color: #fff; }
.copyright { border-top: 1px solid #1e293b; padding-top: 20px; text-align: center; }

/* ---------------- Back to top ---------------- */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  box-shadow: var(--shadow-md);
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: #fff; background: var(--primary-dark); }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
  #hero h1 { font-size: 40px; }
  .hero-grid, .assistant-grid { grid-template-columns: 1fr; gap: 40px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.flip .feature-phone { order: 0; }
  .feature-row.flip .feature-copy { order: 1; }
  .phone-gallery { grid-template-columns: 1fr; }
  .docs-card { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  #navbar {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 20px; gap: 16px;
  }
  #navbar.open { display: flex; }
  #hero { padding-top: 40px; }
  #hero h1 { font-size: 34px; }
  section { padding: 56px 0; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* ---------------- Legal / support pages ---------------- */
.legal {
  padding: 56px 0 72px;
}
.legal .container { max-width: 780px; }
.legal .legal-head { margin-bottom: 32px; }
.legal h1 {
  font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.15;
}
.legal .updated { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.legal .legal-body {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
  padding: 40px;
}
.legal-body h2 {
  font-size: 21px; font-weight: 700; letter-spacing: -.3px;
  margin: 36px 0 12px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.legal-body p { color: var(--text-2); margin-bottom: 14px; }
.legal-body ul,
.legal-body ol { color: var(--text-2); padding-left: 22px; margin-bottom: 14px; }
.legal-body li { margin-bottom: 8px; }
.legal-body ol li { padding-left: 4px; }
.legal-body strong { color: var(--text); }
.legal-body table {
  width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 15px;
}
.legal-body th, .legal-body td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-body th { color: var(--text); font-weight: 600; }
.legal-body td { color: var(--text-2); }
.legal-callout {
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg); padding: 18px 20px; margin: 0 0 24px;
}
.legal-callout p { color: var(--text); margin: 0; }
.back-link { display: inline-block; margin-top: 28px; font-weight: 600; }

@media (max-width: 767px) {
  .legal h1 { font-size: 30px; }
  .legal .legal-body { padding: 24px; }
}
