/* ============================================================
   Cloud Elevate — Enterprise Redesign
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&f[]=jetbrains-mono@400,500&display=swap');

:root {
  /* Type */
  --font-sans: 'General Sans', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* Surfaces — deep cool ink */
  --ink-0: oklch(13% 0.012 270);          /* page bg */
  --ink-1: oklch(15.5% 0.014 268);        /* card bg */
  --ink-2: oklch(18% 0.016 266);          /* raised */
  --ink-3: oklch(22% 0.018 264);          /* hover */

  /* Borders — hairline, low chroma */
  --line-1: oklch(28% 0.014 264 / 0.55);
  --line-2: oklch(35% 0.018 262 / 0.45);
  --line-3: oklch(45% 0.020 260 / 0.35);

  /* Text */
  --fg-1: oklch(97% 0.005 264);
  --fg-2: oklch(75% 0.012 264);
  --fg-3: oklch(58% 0.014 262);
  --fg-4: oklch(44% 0.014 262);

  /* Accents — refined indigo + cyan, all same chroma family */
  --indigo: oklch(64% 0.18 268);
  --indigo-2: oklch(72% 0.16 270);
  --indigo-soft: oklch(64% 0.18 268 / 0.12);
  --cyan: oklch(82% 0.13 215);
  --cyan-soft: oklch(82% 0.13 215 / 0.16);
  --violet: oklch(64% 0.18 295);

  /* Semantic */
  --good: oklch(74% 0.16 155);
  --warn: oklch(80% 0.15 75);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --shell-w: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink-0);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv11';
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle grain to kill banding on dark surfaces */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ===== Layout primitives ===== */

.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 128px);
  z-index: 1;
}

.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--hairline { border-top: 1px solid var(--line-1); }

/* ===== Type ===== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--fg-4);
}
.eyebrow--accent { color: var(--cyan); }
.eyebrow--accent::before { background: var(--cyan); }

.h-display {
  font-family: var(--font-sans);
  font-size: clamp(48px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--fg-1);
  margin: 0;
}
.h-display em {
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--fg-1) 0%, var(--indigo-2) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.h-section {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 500;
  margin: 0;
}
.h-section em {
  font-style: normal;
  font-weight: 500;
  color: var(--fg-3);
}

.h-card {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
}

.lede {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 56ch;
  letter-spacing: -0.005em;
  margin: 0;
}

.body { color: var(--fg-2); margin: 0; }
.muted { color: var(--fg-3); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 180ms var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--fg-1);
  color: var(--ink-0);
  border-color: var(--fg-1);
}
.btn-primary:hover {
  background: oklch(95% 0.005 264);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--fg-1);
  border-color: var(--line-2);
}
.btn-secondary:hover {
  border-color: var(--line-3);
  background: var(--ink-1);
}

.btn-ghost {
  height: auto;
  padding: 0;
  background: transparent;
  color: var(--fg-2);
  border: 0;
  font-size: 14px;
  font-weight: 500;
}
.btn-ghost:hover { color: var(--fg-1); }

.btn .arr { transition: transform 220ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ===== Top bar ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: oklch(13% 0.012 270 / 0.72);
  border-bottom: 1px solid var(--line-1);
}
.topbar__inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.012em;
}
.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: white;
  box-shadow: inset 0 0 0 1px oklch(80% 0.16 270 / 0.5), 0 1px 0 0 oklch(100% 0 0 / 0.06);
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--fg-2);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.nav-link:hover { color: var(--fg-1); background: var(--ink-1); }
.nav-link.is-active { color: var(--fg-1); }
.nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--cyan);
}
.nav-link__caret {
  width: 8px; height: 8px;
  margin-left: 4px;
  opacity: 0.6;
}
.topbar__cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ===== Cards / Surfaces ===== */

.card {
  background: var(--ink-1);
  border: 1px solid var(--line-1);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  background: var(--ink-2);
}
.card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.05em;
}
.card__divider {
  height: 1px;
  background: var(--line-1);
  margin: 18px 0;
}

/* ===== Pill / Chip / Tag ===== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  background: var(--ink-2);
  border: 1px solid var(--line-1);
}
.tag--accent {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: oklch(82% 0.13 215 / 0.28);
}
.tag--good {
  color: var(--good);
  background: oklch(74% 0.16 155 / 0.10);
  border-color: oklch(74% 0.16 155 / 0.28);
}
.tag__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 18%, transparent);
}

/* ===== Utility lines / dividers ===== */

.hairline { height: 1px; background: var(--line-1); width: 100%; }
.vline { width: 1px; background: var(--line-1); }

/* ===== Grid bg utility — restrained ===== */

.grid-bg {
  background-image:
    linear-gradient(to right, var(--line-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-1) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}

/* ===== Reveal-on-scroll ===== */

[data-r] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-r].in {
  opacity: 1;
  transform: none;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-r] { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
}
