/* CloudStack — design tokens and page styles (direction B: dark tech) */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b1220;
  --bg-elev: #111a2e;
  --border: #1e293b;
  --text: #e5e7eb;
  --text-muted: #94a3b8;
  --text-strong: #ffffff;
  --accent: #3b82f6;
  --accent-strong: #1565d8;
  --accent-deep: #0d47a1;
  --glow: rgba(30, 58, 138, 0.35);

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1120px;
  --gutter: 24px;
  --section-y: 96px;
  --radius: 12px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--text-strong);
}

main p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  margin: 0 0 16px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 56px;
  font-weight: 700;
  max-width: 18ch;
}

h2 {
  font-size: 36px;
  font-weight: 700;
  max-width: 24ch;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 16px;
  max-width: 62ch;
}

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

.skip-link:focus {
  position: fixed;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  clip: auto;
  background: var(--accent-strong);
  color: var(--text-strong);
  border-radius: 8px;
  z-index: 100;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 20px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--accent-strong);
  color: var(--text-strong);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--text-strong);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-strong);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}

.brand img {
  width: 36px;
  height: auto;
}

.wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.wordmark b {
  font-weight: 700;
  color: var(--accent-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-strong);
}

main p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-links .btn {
  min-height: 42px;
  padding: 10px 18px;
}

.nav-links .btn-primary {
  color: var(--text-strong);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
  margin: 0 auto;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-open .nav-toggle .icon-open {
  display: none;
}

.nav-open .nav-toggle .icon-close {
  display: block;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 120px;
  background: radial-gradient(ellipse at 50% 0%, var(--glow), transparent 60%);
}

.hero-stripes {
  position: absolute;
  right: -8%;
  top: 50%;
  width: 52vw;
  max-width: 720px;
  height: auto;
  transform: translateY(-50%);
  opacity: 0.1;
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Cards and grids */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 150ms ease, border-color 150ms ease;
  }

  .card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
  }
}

.section-lead {
  color: var(--text-muted);
  font-size: 19px;
  margin-bottom: 40px;
}

/* Services */

.service-icon {
  color: var(--accent);
  margin-bottom: 18px;
}

.service h3 {
  margin-bottom: 10px;
}

.service p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

.services-more {
  margin: 32px 0 0;
  color: var(--text-muted);
  max-width: 70ch;
}

/* Process */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.steps li {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.steps li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* About */

.about-grid {
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.stat {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.stat strong {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stat span {
  color: var(--text-muted);
  font-size: 16px;
}

/* Contact */

.contact-grid {
  align-items: start;
}

.contact-aside {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-aside p {
  margin-bottom: 8px;
}

.contact-note {
  color: var(--text-muted);
  font-size: 15px;
}

.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field .optional {
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.cf-turnstile {
  margin-bottom: 20px;
  min-height: 65px;
}

#form-status {
  margin: 16px 0 0;
  font-size: 15px;
  min-height: 1.4em;
}

#form-status:empty {
  display: none;
}

.form-error {
  color: #f87171;
}

.form-success {
  color: #4ade80;
  font-size: 18px;
  font-weight: 500;
}

.privacy-line {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Privacy page */

.prose h1 {
  font-size: 40px;
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 24px;
  margin-top: 40px;
}

.prose p,
.prose li {
  color: var(--text);
  max-width: 68ch;
}

.prose .updated {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text-strong);
}

main p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */

@media (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-y: 64px;
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .hero {
    padding: 64px 0 72px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-stripes {
    width: 90vw;
    right: -30%;
    opacity: 0.07;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav-open .nav-links {
    display: flex;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
  }

  .nav-links .btn {
    margin-top: 12px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-lead {
    font-size: 17px;
    margin-bottom: 32px;
  }

  .stat {
    grid-template-columns: 88px 1fr;
  }

  .stat strong {
    font-size: 32px;
  }

  .contact-form {
    padding: 24px 20px;
  }

  .contact-form .btn {
    width: 100%;
  }

  .prose h1 {
    font-size: 32px;
  }
}

@media (max-width: 639px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
