/* ===== Tokens ===== */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-soft: #eff4ff;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .8em;
}
.accent { color: var(--primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 10px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s ease; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-sm { padding: .55em 1.1em; font-size: .92rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(15, 23, 42, .04); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: .6em; font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); display: grid; place-items: center; }
.logo-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--text); font-weight: 500; font-size: .96rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  padding: 80px 0 100px;
  background:
    radial-gradient(900px 400px at 85% 0%, #dbe6ff 0%, transparent 60%),
    radial-gradient(600px 300px at 0% 100%, #eef4ff 0%, transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 24px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: .45em; }

.hero-visual { position: relative; }
.window { background: #0f172a; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #1e293b; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.window-bar i:nth-child(1) { background: #f87171; }
.window-bar i:nth-child(2) { background: #fbbf24; }
.window-bar i:nth-child(3) { background: #34d399; }
.window-bar span { margin-left: 10px; color: #94a3b8; font-size: .8rem; }
.code { margin: 0; padding: 24px 22px 30px; color: #e2e8f0; font: 500 .92rem/1.8 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-x: auto; }
.code .c { color: #64748b; } .code .k { color: #93c5fd; } .code .s { color: #86efac; } .code .f { color: #fcd34d; }
.float-card {
  position: absolute; background: #fff; border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; line-height: 1.3; animation: float 6s ease-in-out infinite;
}
.float-card strong { color: var(--ink); font-size: 1.15rem; }
.float-card span { color: var(--muted); font-size: .82rem; }
.fc-1 { left: -28px; bottom: -24px; }
.fc-2 { right: -18px; top: -22px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  transition: .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d6fb; }
.card p { color: var(--muted); }
.card ul { margin: 0; padding: 0; list-style: none; font-size: .93rem; }
.card li { padding: 4px 0 4px 20px; position: relative; }
.card li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); opacity: .6; }
.icon { width: 50px; height: 50px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; margin-bottom: 20px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Who we serve */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.panel p { color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 6px 0 6px 30px; position: relative; color: var(--ink); font-weight: 500; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding: 28px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.steps li p { color: var(--muted); font-size: .94rem; margin: 0; }
.step-n { display: inline-block; font-weight: 800; font-size: 1.6rem; color: var(--primary); opacity: .9; margin-bottom: 10px; letter-spacing: -.02em; }

/* Tech */
.tech-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.tech-groups h4 { margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 500; color: var(--ink); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-grid > div:first-child p { color: var(--muted); font-size: 1.05rem; }
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.why-item { padding: 26px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.why-item h4 { color: var(--primary); }
.why-item p { margin: 0; font-size: .94rem; color: var(--muted); }

/* Page hero (inner pages) */
.page-hero {
  padding: 72px 0 64px; text-align: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 300px at 50% 0%, #dbe6ff 0%, transparent 70%);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 760px; margin-left: auto; margin-right: auto; }
.page-hero .lead { margin: 0 auto; }

.nav-links a[aria-current="page"]:not(.btn) { color: var(--primary); font-weight: 600; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card-link { color: inherit; display: block; }
.card-link h3 { color: var(--ink); }
.center-link { text-align: center; margin: 40px 0 0; }

/* Portfolio */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s ease; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.thumb {
  aspect-ratio: 16 / 10; width: 100%; object-fit: cover; display: grid; place-items: center;
  color: rgba(255, 255, 255, .85); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.thumb-1 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.thumb-2 { background: linear-gradient(135deg, #0f766e, #5eead4); }
.thumb-3 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.thumb-4 { background: linear-gradient(135deg, #c2410c, #fdba74); }
.thumb-5 { background: linear-gradient(135deg, #334155, #94a3b8); }
.thumb-6 { background: linear-gradient(135deg, #0369a1, #7dd3fc); }
.project-body { padding: 24px; }
.project-body p { color: var(--muted); font-size: .95rem; }
.project-tag { color: var(--primary) !important; font-size: .8rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5em; }
.project .tags span { font-size: .8rem; padding: 4px 12px; background: var(--bg-alt); }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.testimonial blockquote { margin: 12px 0 24px; color: var(--ink); flex: 1; }
.stars { color: #f59e0b; letter-spacing: 2px; }
figcaption { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--muted); line-height: 1.4; }
figcaption strong { color: var(--ink); }
.q-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.quote-feature { margin: 0 auto; max-width: 780px; text-align: center; }
.quote-feature blockquote { margin: 0 0 28px; font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 500; color: var(--ink); line-height: 1.5; }
.quote-feature figcaption { justify-content: center; text-align: left; }

/* Team */
.team { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.member {
  width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 30px; text-align: center; box-shadow: var(--shadow);
}
.avatar {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 20px; object-fit: cover;
  background: linear-gradient(135deg, var(--primary), #3b82f6); color: #fff;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 0 0 6px var(--primary-soft);
}
.member h3 { margin-bottom: .2em; }
.role { color: var(--primary); font-weight: 600; font-size: .95rem; }
.member p:not(.role) { color: var(--muted); font-size: .95rem; }
.member-links { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.member-links a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; font-weight: 600; }
.member-links a:hover { border-color: var(--primary); }

/* CTA */
.cta { background: linear-gradient(120deg, var(--primary) 0%, #2563eb 60%, #3b82f6 100%); color: #dbeafe; padding: 64px 0; }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; font-size: 1.08rem; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-grid > div > p { color: var(--muted); font-size: 1.05rem; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; color: var(--ink); font-weight: 500; }
.contact-list span { width: 90px; color: var(--muted); font-weight: 400; flex-shrink: 0; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.form small { color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--ink); padding: .75em .9em; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-alt); transition: .2s; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }
.form .invalid { border-color: #dc2626; }
.form-note { margin: 0; font-size: .92rem; min-height: 1.4em; color: var(--muted); }
.form-note.error { color: #dc2626; }
.form-note.ok { color: #15803d; }

/* Footer */
.footer { background: var(--ink); color: #94a3b8; padding: 64px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; margin-bottom: 16px; }
.footer-grid a:not(.logo) { display: block; color: #94a3b8; padding: 4px 0; }
.footer a:hover { color: #fff; }
.logo-light { color: #fff; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #1e293b; }
.footer-bottom a { color: #94a3b8; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .cards, .cards-4, .projects, .testimonials { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 20px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; }
  .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 { padding: 48px 0 80px; }
  .hero-grid, .split, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { margin: 0 12px; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .cards, .cards-4, .projects, .testimonials, .steps, .why, .form .row { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 44px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form, .panel { padding: 24px; }
  .fc-1 { left: -6px; } .fc-2 { right: -6px; }
  .code { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
