/* ==========================================================================
   Sky-Forge — style.css
   Premium, multi-page, dual-theme (dark default / light) design system.
   Fonts: Sora (display) · Hanken Grotesk (body) · JetBrains Mono (accents)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* --------------------------------------------------------------------------
   Tokens shared across themes
   -------------------------------------------------------------------------- */
:root {
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --grad: linear-gradient(135deg, var(--blue), var(--cyan));

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1180px;
  --container-wide: 1320px;
  --radius: 20px;
  --radius-sm: 13px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --section-y: clamp(4.5rem, 8.5vw, 8rem);
  --header-h: 72px;
}

/* --------------------------------------------------------------------------
   Theme: DARK (default)
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --bg: #0b0f14;
  --bg-2: #121821;
  --bg-3: #0e141c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.08);

  --text: #e7edf5;
  --text-strong: #ffffff;
  --muted: #93a1b5;
  --faint: #5d6b7e;

  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);

  --glass-bg: rgba(18, 24, 33, 0.5);
  --glass-border: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(11, 15, 20, 0.55);
  --header-bg-scrolled: rgba(11, 15, 20, 0.82);

  --accent-ink: #67aaff;
  --accent-ink-2: #2fd9ee;

  --shadow-sm: 0 4px 16px -6px rgba(0, 0, 0, 0.5);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.18), 0 30px 70px -32px rgba(6, 182, 212, 0.35);

  --glow-1: rgba(59, 130, 246, 0.2);
  --glow-2: rgba(6, 182, 212, 0.16);
  --grid-line: rgba(255, 255, 255, 0.035);

  --btn-ghost-bg: rgba(255, 255, 255, 0.04);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Theme: LIGHT
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --blue: #2563eb;
  --cyan: #0891b2;

  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --bg-3: #eef2f8;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-hover: #f7f9fc;

  --text: #1f2a3d;
  --text-strong: #0a1322;
  --muted: #56657d;
  --faint: #8b98ac;

  --line: rgba(13, 23, 40, 0.1);
  --line-strong: rgba(13, 23, 40, 0.16);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(13, 23, 40, 0.08);
  --header-bg: rgba(244, 247, 251, 0.6);
  --header-bg-scrolled: rgba(255, 255, 255, 0.85);

  --accent-ink: #1d4ed8;
  --accent-ink-2: #0e7490;

  --shadow-sm: 0 2px 10px -4px rgba(20, 40, 80, 0.14);
  --shadow: 0 24px 54px -26px rgba(20, 45, 95, 0.2);
  --shadow-glow: 0 0 0 1px rgba(37, 99, 235, 0.14), 0 28px 60px -30px rgba(8, 145, 178, 0.28);

  --glow-1: rgba(37, 99, 235, 0.12);
  --glow-2: rgba(8, 145, 178, 0.1);
  --grid-line: rgba(13, 23, 40, 0.04);

  --btn-ghost-bg: rgba(13, 23, 40, 0.03);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

/* Atmospheric background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% -5%, var(--glow-1), transparent 60%),
    radial-gradient(50% 45% at 8% 8%, var(--glow-2), transparent 55%),
    radial-gradient(45% 40% at 50% 110%, var(--glow-1), transparent 60%);
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: rgba(6, 182, 212, 0.3);
  color: var(--text-strong);
}

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

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink-2);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

.section__head.is-center {
  margin-inline: auto;
  text-align: center;
}

.section__head.is-center .eyebrow {
  justify-content: center;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

h2.section__title {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  margin-bottom: 1rem;
}

.section__sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 56ch;
}

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.5);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -12px rgba(6, 182, 212, 0.65);
}

.btn--ghost {
  background: var(--btn-ghost-bg);
  color: var(--text-strong);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  color: var(--text-strong);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 1rem 1.8rem;
  font-size: 1.02rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-ink);
  font-size: 0.98rem;
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}

.link-arrow svg {
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover {
  gap: 0.7rem;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Glass card primitive
   -------------------------------------------------------------------------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* --------------------------------------------------------------------------
   Loader
   -------------------------------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__spin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--line);
}

.header__inner {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand svg {
  height: 30px;
  width: auto;
}

/* logo wordmark adapts to theme; "Forge" keeps the accent */
.logo .lw {
  fill: var(--text-strong);
  transition: fill 0.4s var(--ease);
}
.logo .lf {
  fill: var(--cyan);
  transition: fill 0.4s var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 0.5rem 0.9rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.nav__link:hover {
  color: var(--text-strong);
  background: var(--surface);
}

.nav__link.is-active {
  color: var(--text-strong);
}

.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 0.4rem;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--text-strong);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* Language switcher */
.lang {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.lang__btn {
  padding: 0.3rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.lang__btn.is-active {
  color: #fff;
  background: var(--grad);
}

/* Burger */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
}

.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 1.8px;
  background: var(--text-strong);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger span:nth-child(1) {
  transform: translate(-50%, -6px);
}
.burger span:nth-child(3) {
  transform: translate(-50%, 6px);
}

body.menu-open .burger span:nth-child(1) {
  transform: translate(-50%, 0) rotate(45deg);
}
body.menu-open .burger span:nth-child(2) {
  opacity: 0;
}
body.menu-open .burger span:nth-child(3) {
  transform: translate(-50%, 0) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: calc(var(--header-h) + 1.5rem) clamp(1.1rem, 6vw, 2rem) 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}

body.menu-open .mobile-menu {
  transform: translateX(0);
  visibility: visible;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-strong);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.mobile-menu__link.is-active {
  color: var(--accent-ink);
}

.mobile-menu__tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
  font-weight: 500;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.04;
  margin-bottom: 1.3rem;
}

.hero__desc {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero__stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 2.8rem);
  margin-top: 2.6rem;
  flex-wrap: wrap;
}

.hero__stat .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--text-strong);
  line-height: 1;
}

.hero__stat .l {
  font-size: 0.85rem;
  color: var(--faint);
  margin-top: 0.35rem;
}

/* Hero visual: infrastructure diagram */
.hero__visual {
  position: relative;
}

.diagram {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.35));
}

.diagram .node-box {
  fill: var(--bg-2);
  stroke: var(--line-strong);
  stroke-width: 1;
}

.diagram .node-core {
  fill: url(#dg-grad);
}

.diagram .node-label {
  fill: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.diagram .node-ico {
  stroke: var(--text-strong);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram .flow {
  stroke: var(--cyan);
  stroke-width: 1.6;
  fill: none;
  stroke-dasharray: 5 7;
  opacity: 0.7;
  animation: dash 1.2s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -24;
  }
}

.diagram .ring {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  opacity: 0.4;
  animation: ringpulse 3s var(--ease) infinite;
}

@keyframes ringpulse {
  0%,
  100% {
    opacity: 0.15;
    r: 30;
  }
  50% {
    opacity: 0.45;
    r: 34;
  }
}

/* --------------------------------------------------------------------------
   Page hero (sub-pages)
   -------------------------------------------------------------------------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(3.5rem, 8vw, 6rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.page-hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 1.1rem;
}

.page-hero .lead {
  max-width: 60ch;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Feature / service cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card:hover::before {
  opacity: 1;
}

.card__ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(6, 182, 212, 0.16));
  border: 1px solid var(--line);
  margin-bottom: 1.3rem;
  color: var(--accent-ink-2);
}

.card__ico svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.card__title {
  font-size: 1.22rem;
  margin-bottom: 0.6rem;
}

.card__desc {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.card__list {
  list-style: none;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text);
}

.card__list svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--cyan);
  stroke-width: 2.2;
}

/* number tag for cards */
.card__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 0.8rem;
}

/* --------------------------------------------------------------------------
   Showcase rows (alternating text / visual)
   -------------------------------------------------------------------------- */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.showcase:nth-child(even) .showcase__media {
  order: -1;
}

.showcase__title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-bottom: 1rem;
}

.showcase__text {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.showcase__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.showcase__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 30%, var(--glow-2), transparent 70%);
  pointer-events: none;
}

.showcase__media svg.art {
  width: 62%;
  height: auto;
  color: var(--accent-ink-2);
  opacity: 0.92;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Stats strip
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.stat .n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1;
}

.stat .l {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
  position: relative;
}

.step {
  position: relative;
  padding: 1.6rem 1.3rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.step:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.step__n {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--grad);
  margin-bottom: 1rem;
}

.step__title {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.step__desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq {
  max-width: 800px;
  margin-inline: auto;
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--text-strong);
}

.faq__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--cyan);
  border-radius: 2px;
  transition: transform 0.35s var(--ease);
}

.faq__icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq__icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq__item.is-open .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease);
}

.faq__a-inner {
  padding-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.project {
  position: relative;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project__media {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 50% 40%, var(--glow-1), transparent 70%);
}

.project__media svg {
  width: 30%;
  position: relative;
  z-index: 1;
  color: var(--accent-ink-2);
  opacity: 0.9;
}

.project__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.project__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project__title {
  font-size: 1.25rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius-pill);
}

.tag--wip {
  color: #f5a524;
  background: rgba(245, 165, 36, 0.12);
  border: 1px solid rgba(245, 165, 36, 0.3);
}

.tag--live {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.project__desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.project__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.4rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0.28rem 0.6rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact__rows {
  display: grid;
  gap: 0.9rem;
}

.contact__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.contact__row:hover {
  border-color: var(--cyan);
  transform: translateX(3px);
}

.contact__row .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(6, 182, 212, 0.16));
  color: var(--accent-ink-2);
}

.contact__row .ico svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.contact__row .label {
  font-size: 0.78rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.contact__row .value {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 1rem;
}

/* form */
.form {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 0.96rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

[data-theme="light"] .field input,
[data-theme="light"] .field textarea {
  background: #fff;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

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

.form__status {
  font-size: 0.92rem;
  min-height: 1.2rem;
  margin: -0.3rem 0 0;
  font-weight: 500;
}

.form__status.is-success {
  color: #22c55e;
}
.form__status.is-error {
  color: #ef4444;
}
.form__status.is-pending {
  color: var(--accent-ink-2);
}

/* hidden honeypot */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(2.4rem, 5vw, 4rem);
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, var(--glow-1), transparent 70%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline: auto;
}

.cta-band h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

.cta-band p {
  color: var(--muted);
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

.cta-band .btn-row {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  margin-top: var(--section-y);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.6rem;
}

.footer__brand svg {
  height: 30px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__tag {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 32ch;
  line-height: 1.65;
}

.footer__made {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--faint);
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1.1rem;
  font-weight: 600;
}

.footer__col ul {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.footer__col a,
.footer__col span.muted {
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 0.25s var(--ease);
}

.footer__col a:hover {
  color: var(--accent-ink);
}

.footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--faint);
}

.footer__bottom .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  margin-inline: 0.6rem;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] {
  transition-delay: 0.08s;
}
[data-reveal-delay="2"] {
  transition-delay: 0.16s;
}
[data-reveal-delay="3"] {
  transition-delay: 0.24s;
}
[data-reveal-delay="4"] {
  transition-delay: 0.32s;
}

/* Hero entrance */
[data-anim] {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 0.9s var(--ease-out) forwards;
}
[data-anim="1"] {
  animation-delay: 0.1s;
}
[data-anim="2"] {
  animation-delay: 0.22s;
}
[data-anim="3"] {
  animation-delay: 0.34s;
}
[data-anim="4"] {
  animation-delay: 0.46s;
}
[data-anim="5"] {
  animation-delay: 0.58s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    max-width: 520px;
    margin-inline: auto;
    order: -1;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .nav,
  .nav__tools {
    display: none;
  }
  .burger {
    display: block;
    margin-left: auto;
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .showcase {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .showcase:nth-child(even) .showcase__media {
    order: 0;
  }
  .showcase__media {
    max-width: 480px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
}

@media (max-width: 560px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    gap: 1.5rem;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .footer__bottom {
    justify-content: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal],
  [data-anim] {
    opacity: 1 !important;
    transform: none !important;
  }
  .diagram .flow,
  .diagram .ring,
  .badge__dot {
    animation: none !important;
  }
}
