:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --navy: #0b1324;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
h4 { font-size: 1.05rem; font-weight: 700; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: #93c5fd; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: none; color: var(--ink); padding: 10px 14px; }
.btn-ghost:hover { color: var(--primary); transform: none; }
.btn-sm { padding: 10px 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: wait; transform: none; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.logo-light { font-weight: 500; color: var(--muted); margin-left: -6px; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.nav-links { display: flex; gap: 32px; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Hero */
.hero { padding: 72px 0 88px; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.lead { font-size: 1.15rem; margin: 1.25rem 0 2rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 2rem; font-size: 0.92rem; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: 6px; }
.hero-media { position: relative; }
.hero-media img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.hero-badge {
  position: absolute;
  left: -24px;
  bottom: 32px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.hero-badge strong { font-size: 1.5rem; color: var(--ink); }
.hero-badge span { font-size: 0.85rem; color: var(--muted); }

/* Stats */
.stats { border-block: 1px solid var(--line); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--ink); }
.stats span { color: var(--muted); font-size: 0.95rem; }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p { color: var(--muted); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card p { color: var(--muted); }
.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  margin-bottom: 20px;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Process */
.process-grid, .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.process-media img, .about-media img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.steps { list-style: none; margin-top: 2rem; display: grid; gap: 24px; }
.steps li { display: flex; gap: 20px; }
.steps p { color: var(--muted); }
.step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.work-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.work-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.work-body p { color: var(--muted); margin-bottom: 16px; }
.tag { font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.result { margin-top: auto; color: var(--ink); font-size: 1.05rem; }

/* About */
.checklist { list-style: none; margin: 1.5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.checklist li::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: 8px; }
.tech { display: flex; flex-wrap: wrap; gap: 8px; }
.tech span { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.85rem; font-weight: 500; }

/* Testimonials */
.quotes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 24px; }
.quote blockquote { color: var(--ink); font-size: 1.02rem; }
.quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.quote img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.quote strong { display: block; color: var(--ink); }
.quote span { font-size: 0.88rem; color: var(--muted); }

/* Contact */
.contact { background: var(--navy); color: #cbd5e1; }
.contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact-info ul { list-style: none; margin-top: 2rem; display: grid; gap: 20px; }
.contact-info strong { display: block; color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-info a:hover { color: #fff; }
.contact-form { background: #fff; padding: 36px; border-radius: 18px; display: grid; gap: 16px; color: var(--text); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Forms */
label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
input, select, textarea {
  font: inherit;
  font-weight: 400;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
input.invalid, textarea.invalid { border-color: #dc2626; }
textarea { resize: vertical; }
.form-status { font-size: 0.9rem; min-height: 1.4em; }
.form-status.ok { color: #16a34a; }
.form-status.err { color: #dc2626; }

/* Footer */
.footer { background: var(--navy); border-top: 1px solid #1e293b; color: #94a3b8; padding: 32px 0; font-size: 0.9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: #fff; }
.logo-footer { color: #fff; font-size: 1.05rem; }
.logo-footer .logo-light { color: #94a3b8; }

/* Login modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 40px 36px 28px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3);
  animation: pop 0.2s ease-out;
}
.modal-panel h3 { font-size: 1.5rem; text-align: center; margin-top: 12px; }
.modal-panel > .muted { text-align: center; margin-bottom: 24px; font-size: 0.95rem; }
.modal-panel form { display: grid; gap: 16px; }
.modal-panel .small { margin-top: 20px; }
.logo-modal { justify-content: center; }
.logo-modal .logo-mark { width: 44px; height: 44px; font-size: 1.3rem; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.login-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.link { color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; }
.form-error { color: #dc2626; font-size: 0.9rem; min-height: 1.2em; margin: -4px 0; }
.form-error:empty { display: none; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .process-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid, .work-grid, .quotes-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-badge { left: 16px; }
  .process-media img, .about-media img { aspect-ratio: 16 / 10; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-toggle { display: block; }
  .nav-actions .btn-sm { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .services-grid, .work-grid, .quotes-grid, .row, .checklist { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
