/* ---------- Tokens ---------- */
:root {
  --navy: #1a237e;
  --brand: #1565c0;
  --brand-dark: #0d47a1;
  --accent: #e3f2fd;
  --text: #212121;
  --text-muted: #5a6470;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --border: #e5e9f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --radius-sm: 6px;
  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-dark); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 32px; width: auto; }

.primary-nav { display: flex; align-items: center; }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-list a:hover { color: var(--brand); }
.nav-list .btn { font-weight: 600; color: #fff; }
.nav-list .btn:hover { color: #fff; }

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.05rem; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
}
.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(21, 101, 192, 0.32);
}
.btn-secondary {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-secondary:hover {
  background: var(--brand);
  color: #fff;
}
.btn:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(21, 101, 192, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(26, 35, 126, 0.12), transparent 60%),
    linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(21, 101, 192, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative;
  max-width: 880px;
  text-align: center;
}
.hero-title {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  margin: 0 0 1.25rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--brand) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---------- Sections ---------- */
.services, .about, .contact { padding: 5rem 0; }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  text-align: center;
  margin: 0 0 3rem;
}

/* Services */
.services { background: var(--bg-alt); }
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.service-card {
  background: var(--bg);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(21, 101, 192, 0.3);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.service-icon svg { width: 30px; height: 30px; }
.service-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.55;
  margin: 0;
}

/* About */
.about-inner { max-width: 780px; }
.about-inner p {
  font-size: 1.075rem;
  color: var(--text-muted);
}
.link-arrow {
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}
.link-arrow span { display: inline-block; transition: transform 0.2s ease; margin-left: 0.25rem; }
.link-arrow:hover span { transform: translateX(4px); }

/* Contact */
.contact { background: var(--bg-alt); }
.contact-inner {
  max-width: 640px;
  text-align: center;
}
.contact-lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.75rem;
}
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.contact-label {
  font-weight: 600;
  color: var(--text);
  min-width: 80px;
  text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-inner .copy { margin: 0; }
.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .services, .about, .contact { padding: 6rem 0; }
  .hero { padding: 6rem 0 5rem; }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform 0.25s ease, visibility 0.25s ease;
    visibility: hidden;
  }
  .nav-list.is-open {
    transform: translateY(0);
    visibility: visible;
  }
  .nav-list li { width: 100%; }
  .nav-list a {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-list li:last-child a {
    border-bottom: 0;
    margin-top: 0.5rem;
  }
  .nav-list .btn {
    width: 100%;
    padding: 0.85rem 1rem;
  }
  .contact-label {
    min-width: auto;
    text-align: center;
    display: block;
  }
  .contact-list li {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
