:root {
  --bg:         #010D23;
  --surface:    #08182F;
  --surface-2:  #0C1F3A;
  --border:     #153050;
  --accent:     #22C5DD;
  --text:       #E8EEF6;
  --text-muted: #9DB0C8;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 80px; --s8: 96px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

.page {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 480px) {
  .page { padding-inline: clamp(24px, 5vw, 40px); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
a:hover { text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero {
  text-align: center;
  padding-block: clamp(40px, 8vw, 88px) clamp(48px, 9vw, 96px);
}

.logo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-inline: auto;
}

@media (min-width: 480px) { .logo { max-width: 480px; } }
@media (min-width: 720px) { .logo { max-width: 560px; } }

.pill {
  display: inline-block;
  margin-top: var(--s3);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

h1 {
  margin-top: var(--s3);
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  max-width: min(62ch, 100%);
  margin-inline: auto;
  margin-top: var(--s3);
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.note {
  margin-top: var(--s2);
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
}

.services-section { padding-block: clamp(40px, 7vw, 72px); }

h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.services-section > h2 {
  text-align: center;
  margin-bottom: var(--s5);
}

.services {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 720px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card--span,
  .card--wide { grid-column: 1 / -1; }
}

.card {
  padding: var(--s3) 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.card:hover {
  background: var(--surface-2);
  border-color: #1D4066;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  max-width: min(40ch, 100%);
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.65;
}

.card--span p { max-width: min(78ch, 100%); }

.card--wide { padding: var(--s4); }

.card--wide h3 {
  font-size: clamp(1.1875rem, 2.2vw, 1.375rem);
}

.card--wide p {
  max-width: min(68ch, 100%);
  margin-top: var(--s2);
}

.contact {
  padding-block: clamp(48px, 8vw, 88px);
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact .lede { font-size: 1.0625rem; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  justify-content: center;
  margin-top: var(--s4);
  font-size: 1.0625rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  padding-inline: var(--s1);
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cities {
  margin-top: var(--s3);
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer {
  padding-block: var(--s4) var(--s5);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;

  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.35);

  transition: background-color 160ms ease, border-color 160ms ease,
              transform 160ms ease;
}

.to-top:hover {
  background: var(--surface-2);
  border-color: #1D4066;
  transform: translateY(-2px);
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@supports (animation-timeline: scroll()) {
  @keyframes to-top-in {
    0%, 12%  { opacity: 0; visibility: hidden; }
    22%, 100% { opacity: 1; visibility: visible; }
  }

  .to-top {
    animation: to-top-in linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 600ms cubic-bezier(.16, 1, .3, 1) backwards; }
}

.hero .reveal:nth-child(1) { animation-delay: 0ms; }
.hero .reveal:nth-child(2) { animation-delay: 60ms; }
.hero .reveal:nth-child(3) { animation-delay: 120ms; }
.hero .reveal:nth-child(4) { animation-delay: 180ms; }

.services .reveal:nth-child(1) { animation-delay: 60ms; }
.services .reveal:nth-child(2) { animation-delay: 120ms; }
.services .reveal:nth-child(3) { animation-delay: 180ms; }
.services .reveal:nth-child(4) { animation-delay: 240ms; }
.services .reveal:nth-child(5) { animation-delay: 300ms; }
.services .reveal:nth-child(6) { animation-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
