/* =========================================================================
   Dana Pocket — marketing site
   Design tokens, light/dark themes, responsive layout, glass surfaces.
   ========================================================================= */

:root {
  --brand: #7C5CFF;
  --brand-2: #A68EFF;
  --brand-ink: #2E1B86;
  --pos: #4ADE80;
  --neg: #F87171;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 48px);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 4px 14px rgba(15, 17, 21, 0.10);
  --shadow: 0 18px 50px rgba(15, 17, 21, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Dark (default) ---- */
[data-theme="dark"] {
  --bg: #07070B;
  --bg-2: #0E0E14;
  --surface: rgba(30, 30, 38, 0.55);
  --surface-solid: #141418;
  --card: #14141A;
  --text: #F5F5F7;
  --muted: #A1A1AA;
  --border: rgba(255, 255, 255, 0.10);
  --glass-fill: rgba(38, 38, 46, 0.45);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --hero-glow: radial-gradient(60% 60% at 70% 20%, rgba(124, 92, 255, 0.35), transparent 70%);
}

/* ---- Light ---- */
[data-theme="light"] {
  --bg: #F6F6F9;
  --bg-2: #FFFFFF;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-solid: #FFFFFF;
  --card: #FFFFFF;
  --text: #14141A;
  --muted: #5A5A62;
  --border: rgba(15, 17, 21, 0.10);
  --glass-fill: rgba(255, 255, 255, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.8);
  --hero-glow: radial-gradient(60% 60% at 70% 15%, rgba(124, 92, 255, 0.22), transparent 70%);
}

/* ========================= Base ========================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--muted); }
a  { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 10px; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ========================= Buttons ========================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.98rem; cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124, 92, 255, 0.45); }

.btn-ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border); backdrop-filter: blur(12px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ========================= Glass ========================= */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

/* ========================= Header ========================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 8px; }
.brand-word { font-weight: 800; font-size: 1.15rem; color: var(--brand); letter-spacing: -0.02em; }
.brand-word span { color: var(--brand-2); }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu > li > a:not(.btn) {
  padding: 8px 14px; border-radius: 10px; color: var(--muted);
  font-weight: 500; transition: color 0.15s, background 0.15s;
}
.nav-menu > li > a:not(.btn):hover { color: var(--text); background: var(--surface); }

.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.theme-toggle:hover { border-color: var(--brand); transform: translateY(-1px); }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================= Hero ========================= */
.hero { position: relative; padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto -10%; height: 700px; background: var(--hero-glow); pointer-events: none; z-index: 0; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text); margin-bottom: 20px; font-weight: 500;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.92rem; }

/* Phone mock */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(320px, 82vw); aspect-ratio: 320 / 640;
  border-radius: 42px; padding: 14px; box-shadow: var(--shadow);
}
.phone-notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: rgba(0,0,0,0.55); border-radius: 999px; z-index: 2; }
.phone-screen {
  height: 100%; border-radius: 30px; padding: 44px 14px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--bg-2)), var(--bg-2));
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.chat-line { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.86rem; line-height: 1.4; }
.chat-line.assistant { align-self: flex-start; background: var(--surface-solid); border: 1px solid var(--border); color: var(--text); }
.chat-line.user { align-self: flex-end; background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; }

.chat-card { align-self: flex-start; width: 90%; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.chat-card-title { font-weight: 700; font-size: 0.8rem; color: var(--brand); }
.chat-card-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text); }
.chat-card-row.muted { color: var(--muted); font-size: 0.78rem; }
.amt { font-weight: 700; color: var(--neg); }
.amt.pos { color: var(--pos); }
.chat-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.mini-btn { flex: 1; text-align: center; padding: 7px; border-radius: 10px; font-size: 0.78rem; font-weight: 600; background: var(--surface-solid); border: 1px solid var(--border); }
.mini-btn.primary { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border: none; }

/* ========================= Stats ========================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 20px var(--gutter) 10px; }
.stat { text-align: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--brand); }
.stat span { font-size: 0.86rem; color: var(--muted); }

/* ========================= Sections ========================= */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.eyebrow { display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }

.grid { display: grid; gap: 20px; }
.features { grid-template-columns: repeat(3, 1fr); }
.card {
  padding: 28px; border-radius: var(--radius-lg); background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.ficon { font-size: 1.7rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--brand) 14%, transparent); margin-bottom: 16px; }
.card p { margin: 0; }

/* ========================= AI section ========================= */
.ai-section { background: var(--bg-2); border-block: 1px solid var(--border); }
.ai-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.check-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; color: var(--text); font-weight: 500; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: color-mix(in srgb, var(--brand) 18%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C5CFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.ai-visual { border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.ai-chat { display: flex; flex-direction: column; gap: 12px; }

/* ========================= Steps ========================= */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 28px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-2)); margin-bottom: 16px; }
.step p { margin: 0; }

/* ========================= Security ========================= */
.security-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.sec-grid { grid-template-columns: repeat(2, 1fr); margin-top: 32px; text-align: left; }
.sec-item { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.sec-item b { display: block; margin-bottom: 4px; }
.sec-item span { color: var(--muted); font-size: 0.92rem; }

/* Trust / compliance badges */
.trust-strip { margin-top: 40px; text-align: center; }
.trust-head {
  display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.trust-badge {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 18px 10px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.trust-badge:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.trust-badge .seal {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.35);
}
.trust-badge .seal svg { width: 22px; height: 22px; }
.trust-badge b { display: block; font-size: 0.9rem; line-height: 1.2; }
.trust-badge span { font-size: 0.76rem; color: var(--muted); }
.trust-note { max-width: 620px; margin: 22px auto 0; font-size: 0.82rem; color: var(--muted); }
.trust-note strong { color: var(--text); font-weight: 600; }

/* ========================= FAQ ========================= */
.faq-wrap { max-width: 780px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; cursor: pointer; font-weight: 600; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0; padding: 0 22px 20px; }
.chev { width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.25s var(--ease); flex: none; }
.faq details[open] .chev { transform: rotate(-135deg); }

/* ========================= CTA ========================= */
.cta-section { padding-bottom: clamp(60px, 9vw, 110px); }
.cta { max-width: 680px; margin: 0 auto; text-align: center; padding: clamp(36px, 6vw, 64px); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.cta h2 { margin-bottom: 10px; }
.cta-form { display: flex; gap: 12px; max-width: 460px; margin: 24px auto 12px; }
.cta-form input {
  flex: 1; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); font-size: 1rem; font-family: inherit;
}
.cta-form input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.cta-note { font-size: 0.86rem; margin: 0; }
.cta-note.error { color: var(--neg); }
.cta-note.success { color: var(--pos); }

/* ========================= Footer ========================= */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 48px 0 28px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-brand p { margin: 8px 0 0; font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); font-size: 0.92rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.footer-legal a:hover { color: var(--text); }

/* ========================= Reveal animation ========================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ========================= Responsive ========================= */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; }
  .lead, .hero-copy { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .ai-inner { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 14px var(--gutter) 22px;
    transform: translateY(-120%); transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu > li { width: 100%; }
  .nav-menu > li > a:not(.btn) { display: block; }
  .nav-menu .btn { width: 100%; justify-content: center; }
  .theme-toggle { width: 100%; height: 44px; }
}

@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; }
  .cta-form .btn { justify-content: center; }
}
