/* =========================================================
   InstanHosting — base.css
   Tokens, typography, buttons, header, hero, trust band
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --brand: #2a5bff;
  --brand-600: #1c46e0;
  --brand-700: #1636b4;
  --cyan: #12c2e9;
  --cyan-soft: #e2f7fd;

  --ink: #0a1b33;
  --ink-2: #1c2f4a;
  --body: #4a5c74;
  --muted: #6b7f97;

  --navy: #071120;
  --navy-2: #0b1a2e;
  --on-dark: #cfdcf0;
  --on-dark-dim: #8ea6c4;

  --surface: #ffffff;
  --surface-soft: #f5f8fd;
  --surface-soft-2: #eef3fc;
  --line: rgba(10, 27, 51, 0.09);
  --line-2: rgba(10, 27, 51, 0.16);

  --grad-brand: linear-gradient(135deg, #2a5bff 0%, #12c2e9 100%);
  --grad-brand-soft: linear-gradient(135deg, #edf2ff 0%, #e6fafd 100%);
  --grad-text: linear-gradient(96deg, #1c46e0 0%, #2a5bff 45%, #12a8d4 100%);
  --grad-dark: linear-gradient(165deg, #0b1a2e 0%, #071120 55%, #040c17 100%);

  --sh-xs: 0 1px 2px rgba(10, 27, 51, 0.06);
  --sh-sm: 0 6px 18px -10px rgba(10, 27, 51, 0.22);
  --sh-md: 0 22px 44px -28px rgba(10, 27, 51, 0.32);
  --sh-lg: 0 44px 80px -50px rgba(10, 27, 51, 0.45);
  --sh-brand: 0 16px 32px -14px rgba(42, 91, 255, 0.5);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --shell: 1200px;
  --nav-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

::selection { background: rgba(42, 91, 255, 0.16); color: var(--ink); }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.02em; }

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 400;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Shared layout ---------- */
.section {
  position: relative;
  padding-block: clamp(64px, 7vw, 104px);
}

.section--soft {
  background:
    radial-gradient(760px 380px at 88% 0%, rgba(18, 194, 233, 0.08), transparent 62%),
    linear-gradient(180deg, #fbfcff 0%, var(--surface-soft) 100%);
  border-block: 1px solid var(--line);
}

.section--dark {
  color: var(--on-dark);
  background:
    radial-gradient(820px 440px at 8% 0%, rgba(42, 91, 255, 0.32), transparent 62%),
    radial-gradient(680px 460px at 92% 90%, rgba(18, 194, 233, 0.16), transparent 64%),
    var(--grad-dark);
  overflow: hidden;
}
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark p { color: var(--on-dark-dim); }

.section-head { max-width: 720px; margin-bottom: clamp(34px, 4vw, 54px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.section--dark .eyebrow {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #a9c6ff;
}

.section-title { text-wrap: balance; }

.lede {
  margin-top: 14px;
  max-width: 62ch;
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.75;
  color: var(--body);
}
.section--dark .lede { color: var(--on-dark-dim); }
.section-head--center .lede { margin-inline: auto; }

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

/* ---------- 4. Buttons ---------- */
.btn-ih {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-ih i { font-size: 1.05em; transition: transform 0.25s var(--ease); }
.btn-ih:hover i { transform: translateX(3px); }
.btn-ih:active { transform: translateY(1px); }

.btn-ih--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn-ih--primary:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 22px 40px -16px rgba(42, 91, 255, 0.62);
}

.btn-ih--ghost {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: var(--sh-xs);
}
.btn-ih--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 91, 255, 0.5);
  color: var(--brand-700);
  box-shadow: var(--sh-sm);
}

.btn-ih--glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.btn-ih--glass:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-ih--light {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 18px 34px -20px rgba(4, 12, 23, 0.8);
}
.btn-ih--light:hover { transform: translateY(-2px); color: var(--brand-700); }

.btn-ih--sm { padding: 11px 18px; font-size: 0.84rem; border-radius: 10px; }
.btn-ih--lg { padding: 17px 30px; font-size: 0.98rem; border-radius: 14px; }
.btn-ih--block { width: 100%; }

/* ---------- 5. Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- 6. Header / navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--line);
  box-shadow: 0 16px 40px -34px rgba(10, 27, 51, 0.5);
  backdrop-filter: blur(18px) saturate(160%);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--nav-h);
  transition: height 0.3s var(--ease);
}
.site-header.is-stuck .nav-shell { height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
img.brand-mark { object-fit: contain; background: transparent; }
.brand-text {
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
}
.brand-text span { color: var(--brand); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
.nav-list { display: flex; align-items: center; gap: 2px; margin-right: 12px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: var(--brand-700); background: rgba(42, 91, 255, 0.07); }

.nav-cta { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-login:hover { color: var(--brand-700); }
.nav-login i { font-size: 1rem; color: var(--brand); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--nav-h) + clamp(36px, 4.6vw, 64px)) 0 clamp(48px, 6vw, 78px);
  background:
    radial-gradient(760px 520px at 96% -12%, rgba(42, 91, 255, 0.16), transparent 64%),
    radial-gradient(600px 460px at -6% 22%, rgba(18, 194, 233, 0.14), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 52%, #f2f7fe 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(10, 27, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 27, 51, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(82% 78% at 55% 24%, #000 0%, rgba(0, 0, 0, 0.45) 58%, transparent 84%);
}
.orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.orb--a { width: 420px; height: 420px; top: 60px; right: -110px; background: rgba(42, 91, 255, 0.24); }
.orb--b { width: 320px; height: 320px; bottom: -120px; left: -90px; background: rgba(18, 194, 233, 0.2); }

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(42, 91, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px -20px rgba(10, 27, 51, 0.6);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand-700);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(42, 91, 255, 0.5);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(42, 91, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(42, 91, 255, 0); }
}

.hero-title { max-width: 15ch; }
.hero-sub {
  margin-top: 20px;
  max-width: 54ch;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.78;
  color: var(--body);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.hero-note i { color: #0e9f6e; }

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  max-width: 520px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px dashed var(--line-2);
}
.highlight-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
}
.highlight-chip i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: var(--grad-brand-soft);
  color: var(--brand-700);
  font-size: 0.85rem;
}

/* Hero visual — server rack */
.hero-stage {
  position: relative;
  padding: 18px 6px 30px;
  isolation: isolate;
}
.stage-glow {
  position: absolute;
  z-index: -1;
  inset: 2% -6%;
  background: radial-gradient(closest-side, rgba(42, 91, 255, 0.28), rgba(18, 194, 233, 0.1) 58%, transparent 76%);
  filter: blur(26px);
}
.stage-ring {
  position: absolute;
  z-index: -1;
  inset: 6% -2% 10%;
  border: 1px solid rgba(42, 91, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-10deg);
}
.stage-ring--2 {
  inset: 0 6% 4%;
  border-color: rgba(18, 194, 233, 0.22);
  transform: rotate(9deg);
}

.rack-card {
  position: relative;
  z-index: 2;
  padding: 16px;
  border: 1px solid rgba(132, 170, 255, 0.2);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, #0e1c33 0%, #081427 55%, #050e1b 100%);
  box-shadow: 0 50px 90px -50px rgba(5, 14, 27, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.rack-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 4px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  color: #8ea6c4;
}
.dots { display: flex; gap: 4px; }
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.rack-head .dots i:first-child { background: #ff8f7a; }
.rack-head .dots i:nth-child(2) { background: #ffd27a; }
.rack-head .dots i:last-child { background: #6fe0a0; }
.rack-head strong { color: #dce9ff; font-weight: 600; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7ff0b4;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.rack-body { display: grid; gap: 8px; padding-top: 13px; }
.rack-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(28, 46, 76, 0.92), rgba(13, 24, 43, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.rack-unit.is-active {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12), 0 12px 26px -20px rgba(56, 189, 248, 0.9);
}
.led {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 7px rgba(52, 211, 153, 0.9);
}
.led--blue { background: #38bdf8; box-shadow: 0 0 7px rgba(56, 189, 248, 0.9); animation: blink 2.4s ease-in-out infinite; }
.unit-label {
  flex: 1;
  min-width: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93aac6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slots { display: flex; gap: 3px; }
.slots i {
  width: 5px;
  height: 15px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
}
.rack-unit.is-active .slots i:nth-child(-n + 4) { background: linear-gradient(180deg, #7dd3fc, #38bdf8); }
.mini-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.mini-bars i {
  width: 3px;
  height: var(--h, 40%);
  border-radius: 1px;
  background: rgba(56, 189, 248, 0.6);
}
.rack-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.62rem;
  color: #8ea6c4;
}
.rack-foot b { color: #dbe9ff; font-weight: 600; }

.float-card {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 40px -26px rgba(10, 27, 51, 0.6);
  backdrop-filter: blur(14px);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  50% { transform: translateY(-8px); }
}
.float-card .fc-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.82rem;
}
.float-card b {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.float-card small { display: block; font-size: 0.62rem; color: var(--muted); }
.float--uptime { top: 2%; left: -18px; }
.float--secure { top: 44%; right: -22px; animation-delay: 1.4s; }
.float--latency { bottom: 4%; left: 8%; animation-delay: 2.2s; }

/* ---------- 8. Trust band ---------- */
.trust {
  position: relative;
  z-index: 3;
  padding-block: clamp(28px, 3.4vw, 40px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.trust-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}
.trust-card:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 91, 255, 0.28);
  box-shadow: var(--sh-sm);
}
.trust-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--grad-brand-soft);
  color: var(--brand-700);
  font-size: 1rem;
}
.trust-card b {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.trust-card small {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}
