:root {
  --bg: #05080f;
  --bg-soft: #0a1019;
  --fg: #e8f1f5;
  --muted: #8ba0ad;
  --rule: rgba(46, 230, 197, 0.14);
  --teal: #2ee6c5;
  --blue: #2b7fff;
  --grad: linear-gradient(120deg, var(--teal), var(--blue));
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- ambient background ---------- */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(
      rgba(46, 230, 197, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(43, 127, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    #000 30%,
    transparent 100%
  );
}

.glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  z-index: -1;
  width: 90vw;
  max-width: 900px;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(43, 127, 255, 0.22) 0%,
    rgba(46, 230, 197, 0.12) 40%,
    transparent 70%
  );
  filter: blur(20px);
  pointer-events: none;
}

/* ---------- layout ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 5vw, 2.5rem);
  backdrop-filter: blur(10px);
  background: rgba(5, 8, 15, 0.6);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  color: var(--fg);
  text-decoration: none;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) clamp(1.25rem, 5vw, 2.5rem)
    clamp(3rem, 8vw, 5rem);
}

/* ---------- hero ---------- */

.eyebrow {
  margin: 0 0 1.4rem;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 40rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  text-wrap: pretty;
}

.cta {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: var(--grad);
  color: #04121a;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(46, 230, 197, 0.6);
}

/* ---------- sections ---------- */

section {
  margin-top: clamp(4rem, 10vw, 7rem);
}

h2 {
  margin: 0 0 2rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  margin: 0 0 0.6rem;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- expertise cards ---------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  position: relative;
  padding: 1.75rem 1.5rem 1.6rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.01)
  );
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 230, 197, 0.4);
}

.card-num {
  display: block;
  margin-bottom: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--teal);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  text-wrap: pretty;
}

/* ---------- clients ---------- */

.clients {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.clients a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.4rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.clients a:hover,
.clients a:focus-visible {
  border-color: rgba(43, 127, 255, 0.5);
  background: rgba(43, 127, 255, 0.06);
}

.client-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.client-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--teal);
}

/* ---------- contact + footer ---------- */

.links li + li {
  margin-top: 0.5rem;
}

.links a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
}

footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(4rem, 10vw, 6rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- legal pages ---------- */

.back-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--teal);
}

.page-head h1 {
  margin-top: 0.4rem;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
}

.updated {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.prose {
  max-width: 44rem;
  margin-top: 3rem;
}

.prose h2 {
  margin: 2.8rem 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

.prose p + p {
  margin-top: 1rem;
}

.prose p,
.prose li {
  color: var(--muted);
  text-wrap: pretty;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 0.4rem;
}

.prose li + li {
  margin-top: 0.6rem;
}

.prose li::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.prose a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 230, 197, 0.35);
  transition: border-color 0.15s ease;
}

.prose a:hover,
.prose a:focus-visible {
  border-color: var(--teal);
}

.prose table {
  width: 100%;
  margin-top: 1.2rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}

.prose th {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Tables scroll on their own rather than pushing the page sideways. */
@media (max-width: 34rem) {
  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.footer-links {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--teal);
}

footer {
  flex-wrap: wrap;
}

/* ---------- language toggle ---------- */

.lang-toggle {
  padding: 0.32rem 0.7rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
