/* =============================================================
   APTIVON — Design tokens, components & motion
   Direction: quiet-luxury / editorial. Warm ivory canvas, deep
   ink, restrained accent, serif display + refined sans body.
   ============================================================= */

:root {
  --navy: #101826;
  --ink: #0b1220;
  --slate: #3d4a5c;
  --slate-soft: #7c8697;
  --brand: #0b6aa2;
  --brand-dark: #0a557f;
  --brand-soft: #e6f1f8;
  --canvas: #f7f5f0;      /* warm ivory */
  --paper: #fffdf9;       /* warm white for cards/sections */
  --muted: #efece4;
  --line: #e7e2d8;        /* warm hairline */
  --white: #ffffff;
  --success: #0f766e;
  --danger: #dc2626;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 38, 0.03), 0 14px 34px rgba(16, 24, 38, 0.05);
  --shadow-soft-lg: 0 2px 6px rgba(16, 24, 38, 0.04), 0 34px 70px rgba(16, 24, 38, 0.09);
  --ring: 0 0 0 3px rgba(11, 106, 162, 0.32);

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id], [id].section { scroll-margin-top: 92px; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -0.02em; margin: 0; }
/* Serif display for large statements; sans stays for UI/functional */
.h1, .h2, .hero h1, .section-head .h2, .panel-dark .h2, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.h1 { font-weight: 500; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 116px 0; }
.section-sm { padding: 68px 0; }

/* ---------- Typographic helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--slate-soft);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--brand); border-radius: 2px;
}
.lead { font-family: inherit; }
.lead { color: var(--slate); font-size: 1.125rem; }
.text-muted { color: var(--slate-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.975rem; line-height: 1;
  padding: 14px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(11,106,162,.18); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 10px 24px rgba(11,106,162,.24); transform: translateY(-2px); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #1b2536; transform: translateY(-2px); }
.btn-ghost { background: var(--paper); color: var(--navy); border-color: var(--line); box-shadow: 0 1px 2px rgba(16,24,38,.03); }
.btn-ghost:hover { border-color: #d6cfc2; transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,.12); color:#fff; border-color: rgba(255,255,255,.24); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-lg { padding: 17px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft-lg); border-color: #dbe3ee; }

.chip {
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size:.8rem; font-weight:700;
}

/* Icon badge */
.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(180deg, #0b3f63, var(--navy)); color: #7dd3fc;
}
.icon-badge svg { width: 26px; height: 26px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease, padding .3s ease;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 0; transition: padding .3s ease;
}
.site-header.scrolled { background: rgba(247,245,240,.88); backdrop-filter: blur(14px) saturate(1.1); box-shadow: 0 1px 0 var(--line); }
.site-header.scrolled .bar { padding: 12px 0; }

.brand-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.brand-logo svg { width: 30px; height: 30px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--slate);
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--navy); background: rgba(15,23,42,.05); }
.nav-links a.active { color: var(--brand); font-weight: 600; }

.nav-cta { display: flex; align-items: center; gap: 10px; }

/* Language switch */
.lang-switch { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow-soft); }
.lang-switch a { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .8rem; color: var(--slate-soft); line-height: 1; letter-spacing: .02em; transition: background .15s, color .15s; }
.lang-switch a:hover { color: var(--navy); }
.lang-switch a.active { background: var(--navy); color: #fff; }
.mobile-panel .lang-switch { align-self: flex-start; margin-top: 6px; }

.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 44px; place-items: center; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }

/* Mobile nav panel */
.mobile-panel {
  position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px); background: #fff; z-index: 80;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow: -20px 0 60px rgba(2,6,23,.18); padding: 24px; display: flex; flex-direction: column; gap: 6px;
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel a { padding: 14px 12px; border-radius: 12px; font-weight: 600; font-size: 1.05rem; }
.mobile-panel a:hover { background: var(--muted); }
.mobile-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.45); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.mobile-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 72px 0 32px; }
.site-footer a { color: #cbd5e1; transition: color .15s ease; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .875rem; color: #94a3b8; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.footer-social a:hover { background: rgba(255,255,255,.14); }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- Hero background accents ---------- */
.hero { position: relative; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 70%); opacity: .35;
}
.glow { position: absolute; border-radius: 50%; filter: blur(100px); z-index: 0; opacity: .2; }

/* ---------- Utility layout ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 12px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Feature list */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--slate); }
.check-list li svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }

/* Sample-content banner (honesty) */
.sample-note {
  background: #fffbeb; border: 1px dashed #f59e0b; color: #92400e;
  border-radius: 12px; padding: 12px 16px; font-size: .875rem; font-weight: 500;
}

/* Badge for stats */
.stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }

/* ---------- Reveal animation (fallback if JS/GSAP off) ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); }
.reveal-ready [data-reveal] { will-change: opacity, transform; }
/* When JS disabled, show everything: */
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.maxw-sm { max-width: 540px; }
.maxw-md { max-width: 680px; }
.maxw-lg { max-width: 820px; }
.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; } .mt-10 { margin-top: 40px; }
.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-10 { margin-bottom: 40px; }
.wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-40 { gap: 40px; }
.h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); font-weight: 500; }
.h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.h3 { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: 1.18rem; line-height: 1.65; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head .h2 { margin: 14px 0 12px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.trust-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; opacity: .8; }
.trust-logos span { font-weight: 700; color: var(--slate-soft); font-size: 1.05rem; letter-spacing: -.01em; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.panel-dark { background: var(--navy); color: #e2e8f0; border-radius: var(--radius-lg); }
.price-amount { font-size: 2.6rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.badge-featured { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }

/* =========================================================
   POLISH LAYER — branded micro-details & tasteful motion
   ========================================================= */

/* Scroll progress bar (branded, top of page) */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--brand); z-index: 100; opacity: .8;
  transition: width .12s ease-out;
}

/* Headline accent — elegant italic serif, no motion */
.grad-text { font-style: italic; font-weight: 400; color: var(--brand); }

/* Floating hero card — barely-there, slow */
.float { animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Live status dot — quiet, single soft ring */
.pulse-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.pulse-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(34,197,94,.4); animation: pulse-ring 3s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.2); opacity: 0; } }

/* Logo row — static, refined, muted (no scrolling) */
.logo-marquee { overflow: hidden; }
.logo-track { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 44px; }
.logo-track span[aria-hidden="true"] { display: none; }
.logo-track span { font-weight: 600; color: var(--slate-soft); font-size: .92rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; opacity: .8; }

/* Trust band (guarantees) */
.trust-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trust-band .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.trust-item strong { display: block; font-size: .95rem; color: var(--navy); }
.trust-item span { font-size: .82rem; color: var(--slate-soft); }
@media (max-width: 820px) { .trust-band .container { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (max-width: 480px) { .trust-band .container { grid-template-columns: 1fr; } }

/* Card lift refinement */
.card-hover { will-change: transform; }
.card-hover:hover { transform: translateY(-6px); }

/* Reduced motion: calm everything decorative */
@media (prefers-reduced-motion: reduce) {
  .grad-text, .glow, .float, .pulse-dot::after, .logo-track { animation: none !important; }
  .logo-track { flex-wrap: wrap; justify-content: center; width: auto; }
  .btn-primary::after { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
/* Switch to the mobile menu before the desktop nav can crowd/overflow */
@media (max-width: 1100px) {
  .nav-links, .nav-cta .btn { display: none; }
  .menu-toggle { display: grid; }
}
@media (max-width: 820px) {
  .section { padding: 72px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 18px; }
}

/* =========================================================
   INTERACTIVE AGENT DEMO
   ========================================================= */
.ad-head { text-align: center; margin-bottom: 44px; }
.ad-shell { max-width: 880px; margin: 0 auto; }
.ad-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.ad-tab { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--slate); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .18s ease; font-family: inherit; }
.ad-tab:hover { border-color: #d6cfc2; }
.ad-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.ad-window { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-soft-lg); overflow: hidden; }
.ad-titlebar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--paper)); }
.ad-dots { display: flex; gap: 7px; }
.ad-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.ad-dots i:nth-child(1) { background: #f0b9ac; } .ad-dots i:nth-child(2) { background: #f2d9a6; } .ad-dots i:nth-child(3) { background: #bfe0c0; }
.ad-app { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .92rem; color: var(--navy); }
.ad-app svg { width: 22px; height: 22px; }
.ad-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .72rem; color: var(--slate-soft); text-transform: uppercase; letter-spacing: .08em; margin-left: 2px; }

.ad-chat { height: 448px; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: #fbfaf7; scroll-behavior: smooth; }
.ad-msg { display: flex; flex-direction: column; max-width: 82%; }
.ad-in { align-self: flex-end; align-items: flex-end; }
.ad-out { align-self: flex-start; flex-direction: row; align-items: flex-start; gap: 10px; }
.ad-meta { font-size: .72rem; color: var(--slate-soft); margin-bottom: 5px; font-weight: 600; }
.ad-bubble { padding: 13px 16px; border-radius: 16px; font-size: .95rem; line-height: 1.5; }
.ad-in .ad-bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 5px; }
.ad-agentbubble { background: #fff; border: 1px solid var(--line); color: var(--navy); border-bottom-left-radius: 5px; min-height: 1em; }
.ad-avatar { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; flex: none; box-shadow: var(--shadow-soft); }
.ad-avatar svg { width: 100%; height: 100%; display: block; }

.ad-actions { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; align-self: stretch; }
.ad-step { display: flex; align-items: center; gap: 11px; font-size: .9rem; color: var(--slate-soft); transition: color .2s ease; }
.ad-step.done { color: var(--navy); }
.ad-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: ad-spin .7s linear infinite; flex: none; }
@keyframes ad-spin { to { transform: rotate(360deg); } }
.ad-check { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.ad-check svg { width: 11px; height: 11px; }

.ad-typing { background: #fff; border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 5px; padding: 15px 16px; display: flex; gap: 5px; }
.ad-typing span { width: 7px; height: 7px; border-radius: 50%; background: #c7cdd6; animation: ad-bounce 1.2s infinite; }
.ad-typing span:nth-child(2) { animation-delay: .2s; } .ad-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ad-bounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.ad-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-self: stretch; }
.ad-result .ad-stat { background: linear-gradient(180deg, #0b3f63, #101826); color: #e0f2fe; border-radius: 14px; padding: 16px; text-align: center; }
.ad-result .ad-stat strong { display: block; font-size: 1.5rem; font-family: var(--font-display); font-weight: 600; }
.ad-result .ad-stat span { font-size: .72rem; opacity: .82; }

.ad-cta { align-self: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ad-cta strong { font-family: var(--font-display); font-size: 1.12rem; color: var(--navy); }
.ad-cta p { margin: 5px 0 0; color: var(--slate); font-size: .9rem; max-width: 46ch; }
.ad-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.ad-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--paper); }
.ad-input input { flex: 1; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--navy); background: #fff; }
.ad-input input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }

@media (max-width: 640px) {
  .ad-chat { height: 420px; }
  .ad-result { grid-template-columns: 1fr 1fr; }
  .ad-cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .ad-spin { animation: none; } .ad-typing span { animation: none; } }
