/* ============================================================
   Aptivar AI — Landing styles
   Vanilla CSS design system
   ============================================================ */

:root {
  --navy: #0b1f3a;
  --navy-2: #12294c;
  --blue: #1f6feb;
  --blue-dark: #175bc4;
  --teal: #0fb5b0;
  --ink: #16233a;
  --slate: #475569;
  --slate-light: #64748b;
  --line: #e4ebf3;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --bg-soft-2: #eef4fb;
  --white: #ffffff;
  --warn: #e8b23a;
  --ok: #12b76a;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 4px 12px rgba(11, 31, 58, 0.05);
  --shadow-md: 0 12px 34px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, 0.16);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Sora", "Inter", -apple-system, "Segoe UI", Arial, sans-serif;

  --maxw: 1160px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--slate); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.section { padding: clamp(64px, 9vw, 108px) 0; }
.section-alt { background: var(--bg-soft); }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-sub { font-size: 1.08rem; color: var(--slate); }

.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); background: var(--bg-soft-2); padding: 6px 14px;
  border-radius: 999px; margin-bottom: 18px;
}
.eyebrow-invert { color: #bfe3ff; background: rgba(255,255,255,0.10); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn-sm { padding: 9px 16px; font-size: .92rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(31,111,235,0.28); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(31,111,235,0.34); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: #c6d5ea; transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid rgba(31,111,235,0.4); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.86); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand img { height: 34px; width: auto; }
.nav-desktop { display: flex; gap: 30px; }
.nav-desktop a { font-weight: 500; color: var(--slate); font-size: .98rem; position: relative; }
.nav-desktop a:hover { color: var(--navy); }
.nav-desktop a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--blue); transition: width .2s ease;
}
.nav-desktop a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none; flex-direction: column; gap: 4px; padding: 8px 24px 20px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.nav-mobile a { padding: 12px 4px; font-weight: 500; color: var(--slate); border-bottom: 1px solid var(--bg-soft); }
.nav-mobile a.btn { margin-top: 10px; color: #fff; border: 0; justify-content: center; }
.nav-mobile.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 104px);
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(15,181,176,0.10), transparent 60%),
    radial-gradient(900px 460px at 0% 0%, rgba(31,111,235,0.10), transparent 55%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-copy .lead { font-size: 1.18rem; color: var(--slate); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 30px; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 30px; padding: 0; margin: 0; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--navy); }
.hero-stats span { font-size: .9rem; color: var(--slate-light); }
.hero-media img { filter: drop-shadow(0 30px 50px rgba(11,31,58,0.14)); }

/* ---------- Problem & Solution ---------- */
.ps-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.ps-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.ps-problem { background: #fffaf3; border-color: #f3e4c8; }
.ps-solution { background: #f1fbf6; border-color: #cdeee0; }
.ps-col h3 { margin-bottom: 18px; }
.ps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ps-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate); font-size: 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; flex: 0 0 auto; }
.dot-warn { background: var(--warn); }
.dot-ok { background: var(--ok); }
.ps-arrow { display: flex; align-items: center; justify-content: center; }

/* ---------- Cards grid ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  color: var(--blue); background: linear-gradient(135deg, rgba(31,111,235,0.12), rgba(15,181,176,0.14));
  margin-bottom: 18px;
}
.icon-badge.sm { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px; }

.service-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #cfe0f6; }
.service-card p { margin-bottom: 0; font-size: .98rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; position: relative; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); position: relative; }
.step-num {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.15rem;
  background: linear-gradient(135deg, var(--blue), var(--teal)); margin-bottom: 16px;
}
.step p { margin-bottom: 0; font-size: .96rem; }

/* ---------- Results (navy) ---------- */
.section-navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #dbe6f5; }
.section-head-invert h2 { color: #fff; }
.section-head-invert .section-sub { color: #a9bbd6; }
.results-grid { grid-template-columns: repeat(3, 1fr); }
.result-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #d7e3f4; }
.result-card h3 { color: #fff; }
.result-card p { color: #a9bbd6; font-size: .96rem; }
.metric { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; line-height: 1; background: linear-gradient(120deg, #6fb6ff, #45d8d1); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px; }
.tag { display: inline-block; margin-top: 14px; font-size: .78rem; letter-spacing: .04em; color: #9fb3d4; background: rgba(255,255,255,0.07); padding: 5px 12px; border-radius: 999px; }

/* ---------- Testimonials ---------- */
.testimonial-grid { grid-template-columns: repeat(3, 1fr); }
.testimonial { display: flex; flex-direction: column; }
.stars { display: flex; gap: 3px; margin-bottom: 14px; }
.testimonial blockquote { margin: 0 0 22px; font-size: 1.04rem; color: var(--ink); line-height: 1.6; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--blue), var(--teal)); font-size: .95rem; }
.who { display: flex; flex-direction: column; }
.who strong { color: var(--navy); font-size: .98rem; }
.who small { color: var(--slate-light); font-size: .85rem; }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.why-item p { margin-bottom: 0; font-size: .96rem; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-head);
  font-weight: 600; color: var(--navy); font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 12px; height: 12px; flex: 0 0 auto;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform .25s ease; margin-top: -4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.faq-body { padding: 0 24px 22px; }
.faq-body p { margin: 0; font-size: 1rem; }

/* ---------- CTA / Contact ---------- */
.cta-section { background: linear-gradient(160deg, var(--navy) 0%, #103a6e 100%); color: #dce7f6; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cta-copy h2 { color: #fff; }
.cta-copy p { color: #b7c7e0; font-size: 1.08rem; }
.cta-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.cta-points li { display: flex; align-items: center; gap: 10px; color: #dce7f6; font-weight: 500; }
.cta-points svg { color: var(--teal); flex: 0 0 auto; }

.cta-form { padding: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; color: var(--navy); font-size: .92rem; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,235,0.15); }
.field input.invalid, .field textarea.invalid { border-color: #e2506a; box-shadow: 0 0 0 3px rgba(226,80,106,0.14); }
.error { display: block; color: #d63c58; font-size: .82rem; margin-top: 5px; min-height: 1em; }
.form-note { margin: 10px 0 0; font-size: .92rem; text-align: center; min-height: 1.2em; }
.form-note.success { color: var(--ok); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #081627; color: #97a9c4; padding: 64px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; }
.footer-brand img { height: 34px; margin-bottom: 16px; filter: brightness(0) invert(1) opacity(0.92); }
.footer-brand p { color: #8496b2; font-size: .96rem; max-width: 360px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer-nav h4 { color: #cdd8ea; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; font-family: var(--font-body); }
.footer-nav a { display: block; color: #8496b2; padding: 6px 0; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom p { margin: 0; font-size: .86rem; color: #7385a1; }
.footer-bottom .muted { color: #5f7193; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards-grid, .steps, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { order: -1; max-width: 440px; margin: 0 auto; }
  .cta-grid { grid-template-columns: 1fr; gap: 36px; }
  .ps-grid { grid-template-columns: 1fr; }
  .ps-arrow { transform: rotate(90deg); }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .header-actions .btn-sm { display: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .cards-grid, .steps, .why-grid, .testimonial-grid, .results-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-stats { gap: 22px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
