/* ===== Design tokens ===== */
:root {
  --navy: #0b1f3a;
  --navy-700: #102a4c;
  --ink: #0f172a;
  --slate: #475569;
  --slate-300: #cbd5e1;
  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --bg-alt2: #eef3fa;
  --accent: #0ea5e9;
  --accent-600: #0284c7;
  --accent-soft: #e0f2fe;
  --violet: #7c5cff;
  --violet-soft: #ede9ff;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 20px 50px rgba(11, 31, 58, 0.14);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1160px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1rem; color: var(--slate); }

a { color: var(--accent-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-600);
  margin: 0 0 .8rem;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(14,165,233,.35); }
.btn-primary:hover { background: var(--accent-600); box-shadow: 0 14px 30px rgba(14,165,233,.45); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--slate-300); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-sm { padding: .6rem 1.1rem; font-size: .88rem; }

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--navy); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--navy));
  color: #fff; font-weight: 800;
}
.brand-name { font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-accent { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--accent-600); text-decoration: none; }
.nav-cta { color: #fff !important; }

/* Theme toggle */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--navy);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-600); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .2s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 85% -12%, rgba(14,165,233,.16), transparent 60%),
    radial-gradient(900px 460px at -10% 10%, rgba(124,92,255,.10), transparent 55%),
    linear-gradient(180deg, #f7fbff, #ffffff 75%);
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 6rem);
}
.hero-inner { max-width: 780px; }
.hero .lead { font-size: 1.2rem; color: var(--slate); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.7rem 0 1.9rem; }
.hero-badges {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
}
.hero-badges li { position: relative; padding-left: 1.4rem; color: var(--slate); font-size: .95rem; font-weight: 500; }
.hero-badges li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent-600); font-weight: 800;
}

/* Service-area strip */
.area-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: .9rem 0;
}
.area-strip .container {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  font-size: .88rem; color: var(--slate); font-weight: 500;
}
.area-strip strong { color: var(--navy); }
.area-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--bg); border: 1px solid var(--border);
  padding: .3rem .8rem; border-radius: 999px; font-weight: 600; color: var(--navy);
}

/* ===== Sections ===== */
.section { padding: clamp(4rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 700px; margin: 0 0 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { font-size: 1.05rem; }

/* ===== Grid / cards ===== */
.grid { display: grid; gap: 1.25rem; }
.services { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-soft); }
.card-num {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em;
  color: var(--accent-600); background: var(--accent-soft);
  border-radius: 999px; padding: .25rem .65rem; margin-bottom: 1rem;
}
.card-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 1.7rem; margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { margin: 0 0 .8rem; font-size: .97rem; }
.card-tools {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.card-tools li {
  font-size: .78rem; font-weight: 600; color: var(--navy);
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: .25rem .6rem; border-radius: 999px;
}

/* Who we help */
.verticals { grid-template-columns: repeat(3, 1fr); }
.vertical-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.vertical-card .card-icon { background: var(--violet-soft); }
.vertical-card h3 { font-size: 1.3rem; }
.vertical-card ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.vertical-card ul li { position: relative; padding-left: 1.3rem; font-size: .93rem; color: var(--slate); }
.vertical-card ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent-600); font-weight: 700; }

/* Why-us */
.why { grid-template-columns: repeat(4, 1fr); }
.value h3 { color: var(--navy); }
.value p { font-size: .96rem; }

/* ===== Steps ===== */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  counter-reset: step;
}
.steps li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
}
.step-num {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700;
  margin-bottom: 1rem;
}
.steps h3 { margin-bottom: .35rem; }
.steps p { margin: 0; font-size: .94rem; }

/* ===== About ===== */
.about-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: center; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.stats li {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  display: flex; align-items: baseline; gap: .9rem;
  box-shadow: var(--shadow);
}
.stats strong { font-size: 1.6rem; color: var(--accent-600); font-weight: 800; }
.stats span { color: var(--slate); font-weight: 500; }

/* ===== FAQ ===== */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: .8rem; }
.faq-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.4rem; font-weight: 700; color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--accent-600);
  flex-shrink: 0; transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.4rem 1.3rem; margin: 0; font-size: .96rem; }

/* ===== Contact ===== */
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-email { font-size: 1.15rem; font-weight: 600; }
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--navy); }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  font: inherit; color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; }
.hidden { display: none; }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: #cdd9ea; padding: 3rem 0 1.5rem; margin-top: 1rem; }
.site-footer .brand-name, .site-footer h3 { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-tag { color: #9fb3cc; margin-top: .8rem; max-width: 32ch; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a, .footer-contact a { color: #cdd9ea; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-bottom { padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-bottom p { color: #8aa1bd; font-size: .88rem; margin: 0; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .services, .verticals { grid-template-columns: repeat(2, 1fr); }
  .why, .steps { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: .6rem; text-align: center; }
  .services, .verticals, .why, .steps, .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ===== Dark mode ===== */
:root[data-theme="dark"] {
  --navy: #eaf1fb;
  --navy-700: #c7d6ea;
  --ink: #e6edf6;
  --slate: #a7b6c9;
  --slate-300: #3a4a63;
  --bg: #0e1726;
  --bg-alt: #0b1320;
  --bg-alt2: #0a111c;
  --accent: #38bdf8;
  --accent-600: #7dd3fc;
  --accent-soft: #102a40;
  --violet: #a78bfa;
  --violet-soft: #241c40;
  --border: #22304a;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
}

[data-theme="dark"] .site-header { background: rgba(14,23,38,.82); }
[data-theme="dark"] .hero {
  background:
    radial-gradient(1100px 520px at 85% -12%, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(900px 460px at -10% 10%, rgba(167,139,250,.12), transparent 55%),
    linear-gradient(180deg, #0b1320, #0e1726 75%);
}
[data-theme="dark"] .brand-mark { background: linear-gradient(135deg, var(--accent), #0b1f3a); }
[data-theme="dark"] .area-strip { background: var(--bg-alt); }
[data-theme="dark"] .area-pill { background: var(--bg); }
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea { background: #0b1320; color: var(--ink); }
[data-theme="dark"] .step-num { background: var(--accent); color: #04121f; }
[data-theme="dark"] .modal-dialog,
[data-theme="dark"] .demo-tile { background: var(--bg); }
[data-theme="dark"] .site-footer { background: #080e18; }
[data-theme="dark"] .btn-primary { color: #04121f; }
[data-theme="dark"] .nav-cta { color: #04121f !important; }
[data-theme="dark"] .card-tools li { background: var(--bg-alt2); }

/* smooth transition when switching theme */
body, .site-header, .card, .vertical-card, .steps li, .stats li, .contact-form,
.field input, .field select, .field textarea, .site-footer, .faq-item, .area-strip, .area-pill,
.modal-dialog, .demo-tile, .theme-toggle, .nav-links, .card-icon, .demo-badge {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* ===== Clickable demo card ===== */
.card-clickable {
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.card-clickable .card-link {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--accent-600);
  font-weight: 700;
  font-size: .92rem;
}
.card-clickable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ===== Demo modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(11, 31, 58, .55);
  backdrop-filter: blur(3px);
}
.modal-dialog {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: min(1040px, 100%);
  height: min(88vh, 860px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 1.1rem; }
.modal-close {
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--slate);
  width: 38px; height: 38px; border-radius: 9px;
}
.modal-close:hover { background: var(--bg-alt); color: var(--ink); }
.modal-back {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 999px; padding: .45rem .95rem;
  cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; color: var(--navy);
}
.modal-back:hover { border-color: var(--navy); }
.modal-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }

.demo-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem; padding: 1.25rem;
}
.demo-tile {
  display: flex; flex-direction: column; text-align: left;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  font: inherit; padding: 0;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.demo-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-soft); }
.demo-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.demo-thumb {
  height: 120px; display: grid; place-items: center;
  font-size: 2.6rem;
}
.demo-tile-body { padding: 1rem 1.1rem 1.2rem; display: block; }
.demo-tile-body h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.demo-tile-body p { margin: 0; font-size: .88rem; }
.demo-badge {
  display: inline-block; margin-top: .7rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-600);
  background: var(--accent-soft); padding: .2rem .55rem; border-radius: 999px;
}

.demo-viewer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.demo-viewer-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.demo-viewer-title { font-weight: 600; font-size: .9rem; color: var(--navy); }
.demo-open-new { margin-left: auto; font-size: .86rem; font-weight: 600; white-space: nowrap; }
#demo-frame { flex: 1; width: 100%; border: 0; background: #fff; }

@media (max-width: 720px) {
  .demo-gallery { grid-template-columns: 1fr; }
  .modal-dialog { height: 92vh; }
}
