/* ============ CD&LC — Cloudspace Learning & Development ============ */

:root {
  --bg: #0B1020;
  --bg-alt: #0E1528;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #E7EAF3;
  --text-dim: #9AA4BF;
  --brand-1: #6366F1;
  --brand-2: #8B5CF6;
  --brand-3: #06B6D4;
  --amber: #F59E0B;
  --radius: 18px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: min(1140px, 92%); margin: 0 auto; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.3rem; }

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

.grad-text {
  background: linear-gradient(92deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-3);
  margin-bottom: 0.9rem;
}

.section-sub { color: var(--text-dim); max-width: 640px; margin-bottom: 3rem; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(92deg, var(--brand-1), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(139, 92, 246, 0.45); }
.btn-ghost { border-color: var(--surface-border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.85rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--surface-border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand-logo { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 480px; height: 480px; background: var(--brand-1); top: -140px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.orb-2 { width: 420px; height: 420px; background: var(--brand-2); bottom: -120px; right: -80px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 300px; height: 300px; background: var(--brand-3); top: 40%; left: 55%; opacity: 0.3; animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
.grid-overlay {
  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: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 800; letter-spacing: -0.02em; margin: 0.4rem 0 1.4rem; }
.hero-sub { color: var(--text-dim); font-size: 1.15rem; max-width: 620px; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.4rem; }
.hero-facts { display: flex; gap: 2.6rem; flex-wrap: wrap; }
.hero-facts div { border-left: 2px solid var(--brand-2); padding-left: 0.9rem; }
.hero-facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim); }
.hero-facts dd { font-weight: 700; font-size: 0.98rem; }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--text-dim); font-size: 1.4rem; animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-alt); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.9rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(139, 92, 246, 0.5); background: rgba(255,255,255,0.06); }
.card h3 { margin: 0.9rem 0 0.6rem; }
.card p { color: var(--text-dim); font-size: 0.96rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
}
.tag {
  display: inline-block; margin-top: 1rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--surface-border); color: var(--brand-3);
}

/* ---------- Products ---------- */
.product {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid var(--surface-border);
}
.product:first-of-type { border-top: 0; padding-top: 0; }
.product-flip .product-body { order: 2; }
.product-flip .product-art { order: 1; }
.product-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.product-head h3 { font-size: 1.9rem; }
.product-badge {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.32rem 0.7rem; border-radius: 999px;
  background: linear-gradient(92deg, var(--brand-1), var(--brand-2)); color: #fff;
}
.badge-cyan { background: linear-gradient(92deg, var(--brand-3), #2563EB); }
.badge-amber { background: linear-gradient(92deg, var(--amber), #EF4444); }
.product-link { color: var(--brand-3); font-weight: 600; font-size: 0.95rem; }
.product-link:hover { text-decoration: underline; }
.product-tagline { font-weight: 600; font-size: 1.08rem; margin-bottom: 0.7rem; }
.product-body > p { color: var(--text-dim); margin-bottom: 1.2rem; }
.feature-list { list-style: none; }
.feature-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.7rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "▸";
  position: absolute; left: 0.2rem;
  color: var(--brand-3);
}
.feature-list strong { color: var(--text); }

/* product art */
.product-art {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background:
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.16), transparent 65%),
    var(--surface);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.art-cyan { background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15), transparent 65%), var(--surface); }
.art-amber { background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.14), transparent 65%), var(--surface); }
.art-core {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem;
  padding: 1.1rem 1.9rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  box-shadow: 0 14px 44px rgba(99, 102, 241, 0.4);
  z-index: 2;
}
.art-cyan .art-core { background: linear-gradient(135deg, #0891B2, #2563EB); box-shadow: 0 14px 44px rgba(6, 182, 212, 0.35); }
.art-amber .art-core { background: linear-gradient(135deg, #D97706, #DC2626); box-shadow: 0 14px 44px rgba(245, 158, 11, 0.3); }
.art-chip {
  position: absolute;
  font-size: 0.78rem; font-weight: 600; font-family: var(--font-display);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--surface-border);
  color: var(--text);
  animation: float 6s ease-in-out infinite;
}
.art-chip-1 { top: 16%; left: 10%; }
.art-chip-2 { top: 22%; right: 10%; animation-delay: -1.6s; }
.art-chip-3 { bottom: 20%; left: 14%; animation-delay: -3s; }
.art-chip-4 { bottom: 14%; right: 12%; animation-delay: -4.5s; }
@keyframes float { 50% { transform: translateY(-12px); } }

/* ---------- Training CTA ---------- */
.training-cta {
  margin-top: 3rem;
  padding: 2.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: linear-gradient(120deg, rgba(99,102,241,0.14), rgba(6,182,212,0.1));
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.training-cta p { font-size: 1.15rem; font-weight: 600; }

/* ---------- Company ---------- */
.company-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: start; }
.company-grid p { color: var(--text-dim); margin-bottom: 1.1rem; }
.facts-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 2rem;
}
.facts-card h3 { margin-bottom: 1.2rem; }
.facts-list div {
  display: grid; grid-template-columns: 130px 1fr; gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--surface-border);
}
.facts-list div:last-child { border-bottom: 0; }
.facts-list dt { color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.facts-list dd { font-size: 0.95rem; font-weight: 500; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.contact-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.7rem 1.9rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
a.contact-card:hover { transform: translateY(-4px); border-color: rgba(6, 182, 212, 0.55); }
.contact-label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim); margin-bottom: 0.5rem; }
.contact-value { font-weight: 600; font-size: 1.08rem; word-break: break-word; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--surface-border); padding: 3.5rem 0 0; background: var(--bg-alt); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand img { margin-bottom: 0.9rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-dim); padding: 0.28rem 0; font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-col p { color: var(--text-dim); font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid var(--surface-border); padding: 1.4rem 0; }
.footer-bottom p { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .art-chip, .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; gap: 2rem; }
  .product-flip .product-body { order: 1; }
  .product-flip .product-art { order: 2; }
  .company-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: flex-start;
    background: rgba(11, 16, 32, 0.97);
    padding: 1.6rem 5%;
    border-bottom: 1px solid var(--surface-border);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: none; }
  .grid-3, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero-facts { gap: 1.4rem; }
  .section { padding: 80px 0; }
}

/* ---------- Lead form ---------- */
.lead-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; }
.lead-copy .steps { list-style: none; margin-top: 1.6rem; display: grid; gap: 1rem; counter-reset: step; }
.lead-copy .steps li { counter-increment: step; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.9rem; color: var(--text-dim); }
.lead-copy .steps li::before {
  content: counter(step); width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.lead-copy .steps strong { color: var(--text); display: block; }
.lead-direct { margin-top: 1.8rem; color: var(--text-dim); font-size: 0.95rem; }
.lead-direct a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lead-form {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem;
}
.lead-form .full { grid-column: 1 / -1; }
.lead-form label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-dim); }
.lead-form input, .lead-form select, .lead-form textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--surface-border);
  border-radius: 12px; padding: 0.8rem 1rem;
}
.lead-form select option { color: #111; }
.lead-form textarea { min-height: 110px; resize: vertical; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  outline: 2px solid var(--brand-3); outline-offset: 1px; border-color: transparent;
}
.lead-form .consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--text-dim); font-weight: 400; }
.lead-form .consent input { width: auto; margin-top: 0.3rem; }
.lead-form .consent a { text-decoration: underline; color: var(--text); }
.lead-form .hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.lead-form button { cursor: pointer; border: 0; width: 100%; font-size: 1rem; }
.lead-form button[disabled] { opacity: 0.6; cursor: progress; }
.form-note { font-size: 0.8rem; color: var(--text-dim); }
.form-status { font-size: 0.92rem; min-height: 1.3em; }
.form-status.err { color: #FCA5A5; }

/* ---------- Landing / inner pages ---------- */
.page-hero { padding: 150px 0 70px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.page-hero p.lede { color: var(--text-dim); font-size: 1.12rem; max-width: 700px; margin-bottom: 1.8rem; }
.crumbs { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.2rem; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose p, .prose li { color: var(--text-dim); margin-top: 0.8rem; }
.prose ul { padding-left: 1.2rem; }
.card-link { display: inline-block; margin-top: 0.9rem; font-weight: 600; color: var(--brand-3); }
.faq { max-width: 820px; display: grid; gap: 0.8rem; }
.faq details { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 14px; padding: 1rem 1.3rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--text-dim); margin-top: 0.7rem; }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; list-style: none; counter-reset: p; }
.process li { counter-increment: p; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 1.4rem; color: var(--text-dim); }
.process li::before { content: "0" counter(p); display: block; font-family: var(--font-display); font-weight: 700; color: var(--brand-3); margin-bottom: 0.5rem; }
.process strong { display: block; color: var(--text); margin-bottom: 0.3rem; }
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; }
.center-page .lede { color: var(--text-dim); max-width: 560px; margin: 1rem auto 2rem; }
.hero-cta .btn + .btn { margin-left: 0; }

@media (max-width: 960px) {
  .lead-wrap { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .lead-form { grid-template-columns: 1fr; padding: 1.4rem; }
  .process { grid-template-columns: 1fr; }
  .page-hero { padding-top: 120px; }
}

.duns-seal { margin-top: 0.9rem; min-height: 40px; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }

/* GitHub Developer Program badge — logo unmodified, with clear space around it */
.gh-badge { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-top: 1.1rem; color: var(--text-dim); font-size: 0.85rem; }
.gh-badge img { height: 25px; width: auto; display: block; margin: 8px 0; }
