/* ===================================================================
   ClearTunnel — Design System
   Typography: Sora (headings), DM Sans (body)
   Themes: teal (default), navy, graphite
   =================================================================== */

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

:root,
[data-ct-theme="teal"] {
  --ct-surface: #f7f5f0;
  --ct-ink: #1e293b;
  --ct-hero: #0c0e1a;
  --ct-accent: #14b8a6;
  --ct-accent-deep: #0d9488;
  --ct-accent-glow: rgba(13, 148, 136, 0.35);
  --ct-cta: #e11d48;
  --ct-muted: #94a3b8;
  --ct-border: #334155;
  --ct-nav-scrolled: rgba(12, 14, 26, 0.92);
}

[data-ct-theme="navy"] {
  --ct-surface: #f4f6fa;
  --ct-ink: #0f172a;
  --ct-hero: #0b1220;
  --ct-accent: #3b82f6;
  --ct-accent-deep: #1d4ed8;
  --ct-accent-glow: rgba(37, 99, 235, 0.38);
  --ct-cta: #2563eb;
  --ct-muted: #94a3b8;
  --ct-border: #1e3a5f;
  --ct-nav-scrolled: rgba(11, 18, 32, 0.94);
}

[data-ct-theme="graphite"] {
  --ct-surface: #f3f4f6;
  --ct-ink: #111827;
  --ct-hero: #111827;
  --ct-accent: #a78bfa;
  --ct-accent-deep: #7c3aed;
  --ct-accent-glow: rgba(124, 58, 237, 0.35);
  --ct-cta: #8b5cf6;
  --ct-muted: #9ca3af;
  --ct-border: #374151;
  --ct-nav-scrolled: rgba(17, 24, 39, 0.94);
}

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ct-ink);
  background: var(--ct-surface);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ============================================================
   Navigation
   ============================================================ */
.ct-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.ct-nav--dashboard { background: rgba(12,14,26,0.95); backdrop-filter: blur(12px); }

.ct-nav.scrolled {
  background: var(--ct-nav-scrolled);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.ct-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ct-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.ct-logo-icon { color: var(--ct-accent); flex-shrink: 0; }
.ct-logo-text { letter-spacing: -0.02em; }
.ct-logo-highlight { color: var(--ct-accent); }

.ct-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
}

.ct-nav-links a { transition: color 0.2s ease; }
.ct-nav-links a:hover { color: #fff; }

.ct-nav-link-accent {
  color: #94a3b8 !important;
  border: 1px solid #334155;
  padding: 6px 16px;
  border-radius: 100px;
  transition: all 0.2s ease !important;
}
.ct-nav-link-accent:hover {
  border-color: var(--ct-accent) !important;
  color: #fff !important;
}

.ct-nav-link-accent-slim {
  color: #94a3b8 !important;
}
.ct-nav-link-accent-slim:hover { color: #fff !important; }

.ct-nav-cta {
  background: linear-gradient(135deg, var(--ct-accent-deep), var(--ct-accent)) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.ct-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--ct-accent-glow);
}

.ct-nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ct-lang-switch,
.ct-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  padding: 3px;
}

.ct-lang-switch button,
.ct-theme-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ct-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.ct-lang-switch button.is-active,
.ct-theme-switch button.is-active {
  background: color-mix(in srgb, var(--ct-accent) 22%, transparent);
  color: #fff;
}

.ct-theme-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: -1px;
}
.ct-theme-switch--dots button {
  padding: 6px;
}
.ct-theme-switch--dots .ct-theme-swatch {
  margin: 0;
  width: 12px;
  height: 12px;
}
.ct-theme-switch--dots button.is-active {
  outline: 2px solid color-mix(in srgb, var(--ct-accent) 70%, #fff);
  outline-offset: 1px;
}

.ct-nav-user {
  color: #64748b;
  font-size: 13px;
}

.ct-btn-ghost-sm {
  background: none;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ct-btn-ghost-sm:hover { border-color: #e11d48; color: #f43f5e; }

/* Hamburger */
.ct-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.ct-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ============================================================
   Buttons
   ============================================================ */
.ct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.ct-btn:active { transform: scale(0.97); }

.ct-btn-primary {
  background: linear-gradient(135deg, var(--ct-accent-deep), var(--ct-accent));
  color: #fff;
  box-shadow: 0 2px 12px rgba(13,148,136,0.25);
}
.ct-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(13,148,136,0.4);
}

.ct-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border: 1px solid #334155;
}
.ct-btn-secondary:hover { background: rgba(255,255,255,0.14); border-color: #475569; }

.ct-btn-danger {
  background: rgba(225,29,72,0.12);
  color: #f43f5e;
  border: 1px solid rgba(225,29,72,0.25);
}
.ct-btn-danger:hover { background: rgba(225,29,72,0.22); }

.ct-btn-ghost {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #334155;
}
.ct-btn-ghost:hover { border-color: #475569; background: rgba(255,255,255,0.04); }

.ct-btn-lg { padding: 16px 36px; font-size: 16px; gap: 10px; }
.ct-btn-sm { padding: 8px 18px; font-size: 12px; gap: 6px; }
.ct-btn-full { width: 100%; justify-content: center; }

/* ============================================================
   Hero Section — Nord / Proton inspired
   ============================================================ */
.ct-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ct-hero);
  overflow: hidden;
  padding: 110px 24px 72px;
}

.ct-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ct-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.ct-hero-orb--a {
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ct-accent) 45%, transparent), transparent 70%);
  animation: ctOrbDrift 18s ease-in-out infinite alternate;
}

.ct-hero-orb--b {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  right: -6%;
  bottom: 5%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ct-accent-deep) 40%, transparent), transparent 68%);
  animation: ctOrbDrift 22s ease-in-out infinite alternate-reverse;
}

.ct-hero-orb--c {
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  left: 42%;
  top: 35%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
  opacity: 0.35;
}

.ct-hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.7;
}

.ct-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.ct-hero-text { max-width: 560px; }

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--ct-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ct-accent) 28%, transparent);
  color: #5eead4;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  text-transform: uppercase;
  animation: fadeUp 0.7s ease both;
}

[data-ct-theme="navy"] .ct-badge { color: #93c5fd; }
[data-ct-theme="graphite"] .ct-badge { color: #c4b5fd; }

.ct-hero-brand {
  margin: 0 0 14px;
  font-family: "Sora", sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  animation: fadeUp 0.75s ease both;
}

.ct-hero-title {
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 22px;
  animation: fadeUp 0.8s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ct-gradient-text {
  background: linear-gradient(120deg, #fff 0%, var(--ct-accent) 45%, var(--ct-accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ct-hero-sub {
  color: #94a3b8;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  margin: 0 0 32px;
  max-width: 480px;
  animation: fadeUp 0.8s ease 0.08s both;
}

.ct-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.14s both;
}

.ct-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  animation: fadeUp 0.8s ease 0.2s both;
}

.ct-hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
}

.ct-hero-trust svg {
  color: var(--ct-accent);
  flex-shrink: 0;
}

.ct-hero-note {
  color: #64748b;
  font-size: 12px;
  margin-top: 16px;
  max-width: 420px;
  line-height: 1.5;
  animation: fadeUp 0.8s ease 0.26s both;
}

.ct-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  z-index: 2;
}

/* Hero visual — shield / connection stage */
.ct-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInScale 0.95s ease 0.12s both;
  min-height: 420px;
}

.ct-hero-stage {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.ct-hero-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.ct-hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ct-accent) 22%, transparent);
  box-shadow: inset 0 0 40px color-mix(in srgb, var(--ct-accent) 6%, transparent);
}

.ct-hero-ring--1 {
  width: 72%;
  height: 72%;
  animation: ctRingPulse 4.5s ease-in-out infinite;
}

.ct-hero-ring--2 {
  width: 88%;
  height: 88%;
  opacity: 0.55;
  animation: ctRingPulse 4.5s ease-in-out 0.6s infinite;
}

.ct-hero-ring--3 {
  width: 100%;
  height: 100%;
  opacity: 0.28;
  border-style: dashed;
  animation: ctRingSpin 48s linear infinite;
}

.ct-hero-shield {
  position: relative;
  z-index: 2;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ct-accent) 35%, #0f172a), #0b1220 70%);
  border: 1px solid color-mix(in srgb, var(--ct-accent) 40%, transparent);
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--ct-accent) 8%, transparent),
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px var(--ct-accent-glow);
  display: grid;
  place-items: center;
  animation: ctShieldFloat 5.5s ease-in-out infinite;
}

.ct-hero-shield-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.ct-hero-shield-icon {
  color: var(--ct-accent);
  filter: drop-shadow(0 0 12px var(--ct-accent-glow));
}

.ct-hero-shield-label {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.ct-hero-float {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.ct-hero-float--status {
  top: 12%;
  right: -2%;
  animation: fadeUp 0.9s ease 0.35s both;
}

.ct-hero-float--ip {
  bottom: 18%;
  left: -4%;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  animation: fadeUp 0.9s ease 0.45s both;
}

.ct-hero-float--proto {
  bottom: 8%;
  right: 4%;
  color: var(--ct-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: fadeUp 0.9s ease 0.55s both;
}

.ct-hc-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease infinite;
}
.ct-hc-led--green {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.ct-hc-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ct-hc-value {
  color: #f1f5f9;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
}

@keyframes ctOrbDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, 18px) scale(1.06); }
}

@keyframes ctRingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.65; }
}

@keyframes ctRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ctShieldFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .ct-hero-orb,
  .ct-hero-ring,
  .ct-hero-shield,
  .ct-hero-scroll,
  .ct-hc-led {
    animation: none !important;
  }
}

/* ============================================================
   Sections
   ============================================================ */
.ct-section {
  padding: 100px 24px;
  position: relative;
}
.ct-section--dark {
  background: var(--ct-hero);
  color: #e2e8f0;
}
.ct-section--dark .ct-section-sub { color: #94a3b8; }

.ct-section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.ct-section-label {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-accent-deep);
  margin-bottom: 12px;
}

.ct-section-title {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.ct-section-sub {
  color: #64748b;
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 48px;
}

/* Steps */
.ct-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  margin-top: 48px;
}

.ct-step {
  text-align: center;
  padding: 32px 20px;
}

.ct-step-number {
  font-family: "Sora", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ct-accent);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.ct-step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,148,136,0.08);
  border-radius: 16px;
  color: var(--ct-accent);
}

.ct-step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ct-step-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

.ct-step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
  color: #334155;
}

/* Features */
.ct-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.ct-feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s ease;
}
.ct-feature-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(13,148,136,0.2);
  transform: translateY(-4px);
}

.ct-feature-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,148,136,0.1);
  border-radius: 14px;
  color: var(--ct-accent);
  margin-bottom: 20px;
}

.ct-feature-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ct-feature-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
}

/* Server grid (shared between landing and dashboard) */
.ct-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.ct-server-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.ct-server-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.ct-section--dark .ct-server-card {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}
.ct-server-card:hover {
  border-color: var(--ct-accent-deep);
  box-shadow: 0 4px 20px rgba(13,148,136,0.08);
}
.ct-server-card--available {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08);
}
.ct-server-card--available:hover {
  border-color: #22c55e;
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.12);
}
.ct-server-card--selectable { cursor: default; }

.ct-server-flag { font-size: 32px; line-height: 1; flex-shrink: 0; }

.ct-server-info { flex: 1; min-width: 0; }

.ct-server-name {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.ct-section--dark .ct-server-name { color: #fff; }

.ct-server-location {
  font-size: 12px;
  color: #64748b;
}

.ct-server-load {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-server-load-text { font-size: 11px; color: #94a3b8; }
.ct-load-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  max-width: 100px;
}
.ct-section--dark .ct-load-bar { background: #1e293b; }
.ct-load-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ct-accent-deep), var(--ct-accent));
  border-radius: 2px;
  transition: width 0.8s ease;
}

.ct-server-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.ct-server-status--online { background: rgba(34,197,94,0.1); color: #16a34a; }
.ct-server-status--offline {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
}
.ct-server-card--offline {
  opacity: 0.72;
}
.ct-server-card--offline:hover {
  transform: none;
  border-color: #e2e8f0;
  box-shadow: none;
}
.ct-server-status--full { background: rgba(100,116,139,0.1); color: #64748b; }

/* FAQ */
.ct-faq-list {
  max-width: 700px;
  margin: 32px auto 0;
}

.ct-faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0;
}
.ct-section:not(.ct-section--dark) .ct-faq-item {
  border-color: #e2e8f0;
}

.ct-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s;
}
.ct-faq-q::-webkit-details-marker { display: none; }
.ct-faq-q:hover { color: var(--ct-accent); }
.ct-faq-q svg { flex-shrink: 0; transition: transform 0.3s ease; }
details[open] .ct-faq-q svg { transform: rotate(180deg); }

.ct-faq-a {
  padding: 0 0 20px;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
}
.ct-section:not(.ct-section--dark) .ct-faq-a { color: #475569; }
.ct-faq-a a { color: var(--ct-accent); font-weight: 500; }
.ct-faq-a a:hover { text-decoration: underline; }

/* CTA final */
.ct-cta-final { padding: 80px 24px; background: var(--ct-hero); }

.ct-cta-box {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(145deg, rgba(13,148,136,0.06), rgba(13,148,136,0.02));
  border: 1px solid rgba(13,148,136,0.12);
  border-radius: 32px;
  overflow: hidden;
}

.ct-cta-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 50%, rgba(13,148,136,0.04), transparent 60%);
  pointer-events: none;
}

.ct-cta-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}

.ct-cta-sub {
  color: #94a3b8;
  font-size: 16px;
  margin-bottom: 32px;
  position: relative;
}

.ct-cta-box .ct-btn {
  position: relative;
  margin: 0 6px 10px;
}

/* ============================================================
   Footer
   ============================================================ */
.ct-footer {
  background: var(--ct-hero);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 56px 24px 0;
  color: #94a3b8;
}

.ct-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
}

.ct-footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin-bottom: 12px;
}
.ct-footer-logo svg { color: var(--ct-accent); }

.ct-footer-desc {
  font-size: 13px;
  line-height: 1.6;
  max-width: 300px;
}

.ct-footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.ct-footer-col h4 {
  font-family: "Sora", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.ct-footer-col a {
  display: block;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s;
}
.ct-footer-col a:hover { color: var(--ct-accent); }

.ct-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
}

/* ============================================================
   Auth Pages
   ============================================================ */
.auth-page, .dashboard-page, .subpage { padding-top: 0 !important; }

.ct-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--ct-hero);
  position: relative;
}
.ct-auth-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(13,148,136,0.06), transparent);
}

.ct-auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 40px 36px;
  backdrop-filter: blur(10px);
}

.ct-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
}
.ct-auth-logo svg { color: var(--ct-accent); }

.ct-auth-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}

.ct-auth-sub {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 32px;
}

.ct-auth-form { display: flex; flex-direction: column; gap: 20px; }

/* Honeypot: invisible to humans, tempting for naive bots */
.ct-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

.ct-turnstile-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ct-turnstile-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.ct-field { display: flex; flex-direction: column; gap: 6px; }

.ct-field label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ct-field input,
.ct-field select,
.ct-field textarea {
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid #334155;
  border-radius: 12px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: #e2e8f0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.ct-field input:focus {
  border-color: var(--ct-accent-deep);
  box-shadow: 0 0 0 4px rgba(13,148,136,0.1);
}
.ct-field input::placeholder { color: #475569; }

.ct-field-errors p {
  color: #f43f5e;
  font-size: 12px;
  margin-top: 2px;
}

.ct-field-help {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
}

.ct-form-error {
  background: rgba(225,29,72,0.1);
  border: 1px solid rgba(225,29,72,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f43f5e;
  font-size: 13px;
}

.ct-auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #64748b;
}
.ct-auth-switch a { color: var(--ct-accent); font-weight: 600; transition: color 0.2s; }
.ct-auth-switch a:hover { text-decoration: underline; }

/* ============================================================
   Dashboard
   ============================================================ */
.ct-dashboard {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.ct-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.ct-dash-title {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 800;
  color: #fff;
}

.ct-dash-sub {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.ct-dash-badge {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ct-dash-badge--free {
  background: rgba(13,148,136,0.1);
  color: var(--ct-accent);
  border: 1px solid rgba(13,148,136,0.15);
}

/* Messages */
.ct-messages { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.ct-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.ct-message--success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.15); color: #4ade80; }
.ct-message--error { background: rgba(225,29,72,0.08); border: 1px solid rgba(225,29,72,0.15); color: #f43f5e; }
.ct-message--info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15); color: #60a5fa; }

/* Connected card */
.ct-dash-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 40px;
}

.ct-dash-card--connected {
  border-color: rgba(34,197,94,0.15);
  border-width: 1.5px;
}

.ct-dash-connected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ct-dash-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.ct-dash-led {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.ct-dash-led--green { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); animation: pulse 2s infinite; }

.ct-dash-server-badge {
  background: rgba(13,148,136,0.1);
  border: 1px solid rgba(13,148,136,0.15);
  color: #5eead4;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.ct-dash-connected-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.ct-dash-detail { display: flex; flex-direction: column; gap: 2px; }
.ct-dash-detail-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.ct-dash-detail-value { font-size: 14px; color: #e2e8f0; font-weight: 500; }

.ct-dash-connected-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Dashboard sections */
.ct-dash-section {
  margin-bottom: 40px;
}

.ct-dash-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.ct-dash-section-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.ct-dash-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.ct-dash-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}

.ct-dash-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,148,136,0.1);
  border-radius: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ct-accent);
}

.ct-dash-step strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.ct-dash-step p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.ct-dash-step a { color: var(--ct-accent); font-weight: 500; }
.ct-dash-step code {
  background: rgba(0,0,0,0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #e2e8f0;
}

.ct-empty-servers {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #64748b;
}

/* ============================================================
   Legal Pages
   ============================================================ */
.ct-legal h1 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.ct-legal h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-top: 32px;
  margin-bottom: 12px;
}
.ct-legal p, .ct-legal li {
  font-size: 14px;
  line-height: 1.7;
  color: #94a3b8;
  margin-bottom: 8px;
}
.ct-legal ul { padding-left: 20px; margin-bottom: 12px; }
.ct-legal li { list-style: disc; }
.ct-legal strong { color: #e2e8f0; }
.ct-legal .ct-legal-disclaimer {
  margin-top: 40px;
  padding: 16px 20px;
  background: rgba(225,29,72,0.06);
  border: 1px solid rgba(225,29,72,0.12);
  border-radius: 12px;
  font-size: 13px;
  color: #f43f5e;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   Campus stack + powered by
   ============================================================ */
.ct-powered {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ct-muted);
}

.ct-powered a {
  color: var(--ct-accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ct-accent) 35%, transparent);
}

.ct-powered--hero {
  margin-top: 1.1rem;
  color: #94a3b8;
}

.ct-campus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.ct-campus-card {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ct-ink) 8%, transparent);
  border-radius: 16px;
  padding: 1.4rem 1.35rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.ct-campus-card h3 {
  font-size: 1.1rem;
  margin: 0.55rem 0 0.45rem;
}

.ct-campus-card p {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.ct-campus-card a {
  color: var(--ct-accent-deep);
  font-weight: 600;
  font-size: 0.9rem;
}

.ct-campus-step {
  display: inline-flex;
  font-family: "Sora", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ct-accent-deep);
  background: color-mix(in srgb, var(--ct-accent) 12%, transparent);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.ct-campus-card--apertus {
  border-color: color-mix(in srgb, var(--ct-accent) 35%, transparent);
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--ct-accent) 6%, #fff));
}

.ct-campus-footnote {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: #64748b;
  max-width: 820px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .ct-campus-grid { grid-template-columns: 1fr; }
  .ct-nav-tools { flex-wrap: wrap; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .ct-hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .ct-hero-text { max-width: 100%; margin: 0 auto; }
  .ct-hero-sub { max-width: 36rem; margin-left: auto; margin-right: auto; }
  .ct-hero-actions { justify-content: center; }
  .ct-hero-trust { justify-content: center; }
  .ct-hero-note { margin-left: auto; margin-right: auto; }
  .ct-hero-visual {
    min-height: 320px;
    max-width: 360px;
    margin: 0 auto;
  }
  .ct-hero-float--status { right: 0; }
  .ct-hero-float--ip { left: 0; }

  .ct-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ct-step-arrow { display: none; padding: 0; }
  .ct-step { padding: 24px 16px; }

  .ct-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .ct-footer-links { grid-template-columns: repeat(3, 1fr); }

  .ct-dash-header { flex-direction: column; }
  .ct-dash-connected-details { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .ct-nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(12,14,26,0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 16px;
    align-items: flex-start;
  }
  .ct-nav-links.open { display: flex; }
  .ct-nav-toggle { display: flex; }

  .ct-hero { padding: 100px 20px 72px; }
  .ct-hero-visual { display: none; }
  .ct-section { padding: 60px 20px; }

  .ct-server-grid { grid-template-columns: 1fr; }
  .ct-features { grid-template-columns: 1fr; }

  .ct-footer-links { grid-template-columns: 1fr 1fr; }
  .ct-dash-connected-details { grid-template-columns: 1fr; }
  .ct-auth-card { padding: 28px 20px; }
}
