* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
}
img { max-width: 100%; display: block; }
/* Base link style */
a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Buttons override the base link look */
.btn {
  text-decoration: none;
}
ul { margin: 0; padding: 0; }

:root {
  --container: 1100px;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
  --brand: #2563eb;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --text-muted: #475569;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.h5 { font-size: 1rem; margin: 0 0 var(--space-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: #0f172a;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-lg { padding: 14px 18px; font-size: 1.05rem; }
.btn-sm { padding: 8px 10px; font-size: .9rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { font-weight: 800; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: #0f172a; display: block; }

@media (max-width: 768px) {
  .nav { height: 56px; }
  .nav-links { position: fixed; inset: 56px 0 auto 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 12px 16px; display: grid; gap: 8px; transform-origin: top; transform: scaleY(0); opacity: 0; pointer-events: none; }
  .nav-links.open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
}

.hero {
  position: relative;
  padding: var(--space-7) 0 var(--space-6);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: -20% -10% auto -10%; height: 60%; background: radial-gradient(1200px 600px at 50% -10%, rgba(37,99,235,.15), transparent 60%); z-index: -1; }
.hero__inner { display: grid; gap: var(--space-6); align-items: center; }
.hero__title { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.6rem); line-height: 1.15; margin: 0 0 var(--space-3); }
.hero__subtitle { color: var(--text-muted); margin: 0 0 var(--space-5); }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__media { justify-self: center; }
.hero__media img { width: 120px; height: 120px; border-radius: 20px; object-fit: cover; box-shadow: var(--shadow); }

@media (min-width: 900px) {
  .hero { padding: var(--space-8) 0; }
  .hero__inner { grid-template-columns: 1.2fr .8fr; }
  .hero__media img { width: 160px; height: 160px; }
}

.section { padding: var(--space-7) 0; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: clamp(1.2rem, 1.2vw + 1rem, 2rem); margin: 0 0 var(--space-2); }
.section__lead { color: var(--text-muted); margin: 0 0 var(--space-5); }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 680px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .projects-grid { grid-template-columns: 1fr 1fr; } }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.project__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.project__body { padding: var(--space-4); }
.project__title { margin: 0 0 var(--space-3); font-size: 1.125rem; }
.project__bullets { list-style: none; display: grid; gap: 8px; color: var(--text-muted); margin-bottom: var(--space-4); }
.project__links { display: flex; gap: 8px; flex-wrap: wrap; }
.project__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 0; color: var(--text-muted); }
.project__stats span { display: flex; align-items: baseline; gap: 6px; font-size: .92rem; }
.project__stats strong { font-size: 1.05rem; color: #0f172a; }
.project__divider { letter-spacing: 2px; color: var(--text-muted); opacity: .35; font-size: .75rem; padding: 2px 0; }

.stack { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .stack { grid-template-columns: repeat(3, 1fr); } }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { padding: 6px 10px; border-radius: 999px; background: #eef2ff; color: #3730a3; border: 1px solid #e0e7ff; font-size: .95rem; }

.about { display: grid; gap: var(--space-3); color: var(--text-muted); }

.project-group__title { margin-top: var(--space-6); margin-bottom: var(--space-3); font-size: 1.15rem; color: var(--text-muted); font-weight: 600; }
.project-group__title:first-of-type { margin-top: 0; }

.testimonials-track { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.testimonials-track::-webkit-scrollbar { height: 8px; }
.testimonials-track::-webkit-scrollbar-track { background: transparent; }
.testimonials-track::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.testimonial { flex: 0 0 min(85vw, 380px); scroll-snap-align: start; display: grid; gap: var(--space-3); padding: var(--space-4); }
.testimonial img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.testimonial__meta { display: grid; gap: 2px; }
.testimonial__meta strong { color: var(--text); font-size: 1rem; }
.testimonial__meta span { color: var(--text-muted); font-size: .95rem; }
.testimonial__meta small { color: var(--text-muted); font-size: .82rem; line-height: 1.4; }
.testimonials-grid { display: grid; gap: var(--space-5); }
.quote { padding: var(--space-4); }
.quote.placeholder { color: var(--text-muted); }
.quote__meta { margin-top: var(--space-2); font-size: .95rem; color: var(--text-muted); }

.contact-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer__inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.footer__links a {
  color: var(--brand-600);
}

.eyebrow { margin: 0 0 var(--space-2); color: var(--brand-600); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-5); }
.hero__proof span { padding: 6px 10px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: .84rem; font-weight: 700; }
.process-flow { display: grid; gap: var(--space-3); counter-reset: step; }
.process-step { position: relative; min-height: 150px; padding: 20px 20px 20px 92px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; animation: process-enter .55s both; }
.process-step:nth-child(2) { animation-delay: .08s; }
.process-step:nth-child(3) { animation-delay: .16s; }
.process-step:nth-child(4) { animation-delay: .24s; }
.process-step::after { content: ''; position: absolute; left: 35px; top: 72px; width: 2px; height: calc(100% - 40px); background: linear-gradient(#93c5fd, transparent); }
.process-step:last-child::after { display: none; }
.process-icon { position: absolute; left: 18px; top: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; box-shadow: 0 8px 18px rgba(37,99,235,.24); }
.process-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.process-number { display: block; color: #94a3b8; font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.process-step h3 { margin: 2px 0 6px; font-size: 1.05rem; }
.process-step p { margin: 0; color: var(--text-muted); font-size: .94rem; }
.ownership-section { background: linear-gradient(145deg, #0f172a, #172554); color: #fff; }
.ownership-section .eyebrow { color: #93c5fd; }
.ownership-section .section__lead { color: #cbd5e1; }
.ownership-grid { display: grid; gap: var(--space-3); }
.ownership-card { display: grid; gap: 8px; padding: 20px; border: 1px solid rgba(191,219,254,.24); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.ownership-card strong { color: #bfdbfe; font-size: 1.05rem; }
.ownership-card span { color: #e2e8f0; }
@media (min-width: 720px) { .process-flow, .ownership-grid { grid-template-columns: repeat(2, 1fr); } .process-step:nth-child(2)::after { display: none; } }
@keyframes process-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .process-step { animation: none; } }

.case-study-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.case-study-modal.is-open { opacity: 1; pointer-events: auto; }
.case-study-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.7); backdrop-filter: blur(4px); }
.case-study-modal__dialog { position: relative; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(800px, 100%); max-height: calc(100vh - 32px); overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.36); transform: translateY(14px) scale(.98); transition: transform .2s ease; }
.case-study-modal.is-open .case-study-modal__dialog { transform: translateY(0) scale(1); }
.case-study-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #f8fafc, #fff); }
.case-study-modal__header .eyebrow { margin-bottom: 4px; }
.case-study-modal__header h2 { margin: 0; color: #0f172a; font-size: 1.22rem; line-height: 1.3; }
.case-study-modal__close { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: #475569; font-size: 24px; line-height: 1; }
.case-study-modal__body { overflow-y: auto; padding: 20px; }
body.modal-open { overflow: hidden; }
.case-study { color: #475569; }
.case-study h2, .case-study h3 { color: #0f172a; }
.case-study h3 { margin: 28px 0 10px; font-size: 1.05rem; }
.case-study ul { display: grid; gap: 8px; padding-left: 20px; }
.case-study-revenue { display: grid; gap: 4px; margin: 20px 0; padding: 18px; border: 1px solid #86efac; border-radius: 14px; background: linear-gradient(135deg, #f0fdf4, #ecfeff); }
.case-study-revenue span { color: #15803d; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.case-study-revenue strong { color: #166534; font-size: 1.08rem; }
.case-study-revenue p { margin: 0; font-size: .92rem; }
.case-study-links { display: flex; flex-wrap: wrap; gap: 10px; }
.case-study-link { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border-radius: 10px; background: #2563eb; color: #fff; font-size: .9rem; font-weight: 700; text-decoration: none; }
.case-study-link--secondary { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.case-study-grid { display: grid; gap: 10px; }
.case-study-grid > div { display: grid; gap: 4px; padding: 14px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fbff; }
.case-study-grid strong { color: #1e3a8a; }
.case-study-grid span { font-size: .92rem; }
.case-study img { width: 100%; margin-top: 24px; border-radius: 12px; box-shadow: var(--shadow); }
@media (min-width: 680px) { .case-study-grid { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .case-study-modal, .case-study-modal__dialog { transition: none; } }

.btn-glow { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed, #2563eb); background-size: 250% 250%; color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.15); box-shadow: 0 0 0 0 rgba(37,99,235,.5), 0 4px 12px rgba(37,99,235,.25); animation: btn-glow-pulse 2.2s ease-in-out infinite, btn-glow-shimmer 2.5s linear infinite; transition: transform .15s ease, box-shadow .15s ease; }
.btn-glow:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 0 rgba(37,99,235,.55), 0 10px 24px rgba(37,99,235,.4); }
.btn-glow:active { transform: translateY(0) scale(1); }
.case-study-btn__arrow { transition: transform .15s ease; }
.case-study-btn:hover .case-study-btn__arrow { transform: translateX(3px); }
@keyframes btn-glow-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.5), 0 4px 12px rgba(37,99,235,.25); } 50% { box-shadow: 0 0 0 10px rgba(37,99,235,0), 0 8px 18px rgba(37,99,235,.35); } }
@keyframes btn-glow-shimmer { 0% { background-position: 0% 50%; } 25% { background-position: 100% 0%; } 50% { background-position: 100% 100%; } 75% { background-position: 0% 100%; } 100% { background-position: 0% 50%; } }
@media (prefers-reduced-motion: reduce) { .btn-glow { animation: none; } }
