/* ==========================================================================
   Design tokens — change colors/fonts here to rebrand the whole site
   ========================================================================== */
:root {
  --brand: #0277c0;
  --brand-strong: #0369a1;
  --brand-soft: #e0f2fe;
  --accent: #38bdf8;
  --grad-end: #1d8fd8;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);

  --radius: 14px;
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7dd3fc;
    --brand-strong: #bae6fd;
    --brand-soft: #0c2a43;
    --accent: #38bdf8;
    --grad-end: #38bdf8;

    --bg: #0b1220;
    --bg-alt: #111827;
    --surface: #131a2e;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #1f2937;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #0b1220;
  }
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo img {
  width: 38px;
  height: 38px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text small {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

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

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

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

.nav-links .btn {
  color: #fff;
  padding: 9px 18px;
}

@media (prefers-color-scheme: dark) {
  .nav-links .btn {
    color: #0b1220;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

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

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

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

  .nav-links .btn {
    justify-content: center;
    margin-top: 8px;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */
section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

/* Hero */
.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 760px;
}

.hero h1 .gradient {
  background: linear-gradient(90deg, var(--brand), var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 32px;
}

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

/* Cards grid */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card p {
  color: var(--text-muted);
  margin: 0;
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}

.icon svg {
  width: 24px;
  height: 24px;
}

/* Process steps */
.steps {
  counter-reset: step;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.steps .card {
  position: relative;
}

.steps .card::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--brand);
  margin-bottom: 10px;
}

/* Work / portfolio */
.work-card {
  padding: 0;
  overflow: hidden;
}

.work-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0c4a6e, #0284c7);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.work-body {
  padding: 22px 24px 26px;
}

.work-thumb svg {
  width: 72px;
  height: 72px;
  opacity: 0.95;
}

.thumb-pos {
  background: linear-gradient(135deg, #0c4a6e, #0284c7);
}

.thumb-table {
  background: linear-gradient(135deg, #0369a1, #38bdf8);
}

.thumb-next {
  background: repeating-linear-gradient(135deg, var(--bg-alt) 0 12px, var(--surface) 12px 24px);
  color: var(--brand);
}

.work-next {
  border-style: dashed;
  box-shadow: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: #059669;
}

.status-building {
  color: #d97706;
}

.status-next {
  color: var(--text-muted);
}

.highlights {
  margin: 14px 0 16px;
  padding-left: 1.1em;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.highlights li {
  margin-bottom: 4px;
}

.work-body p + p {
  margin-top: 16px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  margin: 0 6px 10px 0;
}

/* About */
.about {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2rem;
  color: var(--brand);
}

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

/* Contact / CTA */
.cta {
  text-align: center;
  background: linear-gradient(135deg, #0c4a6e, #0369a1 55%, #0277c0);
  color: #fff;
  border-radius: 24px;
  padding: 64px 28px;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .cta .btn-primary {
    color: #0c4a6e;
  }
}

.cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.cta .hero-actions {
  justify-content: center;
}

/* ==========================================================================
   Legal / content pages
   ========================================================================== */
.page {
  padding: 72px 0 96px;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 2em;
}

.prose ul {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.notice {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: var(--surface);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 0.95rem;
}

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

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

.footer-grid h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

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

.footer-grid li {
  margin-bottom: 8px;
}

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

.footer-grid a.logo {
  color: var(--text);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
