/* ================================================
   CloudHost Test — Global Styles
   ================================================ */

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

/* ------------------------------------------------
   Custom Properties
   ------------------------------------------------ */
:root {
  /* Colours */
  --bg:           #0A0F1E;
  --surface:      #111827;
  --surface-2:    #1A2332;
  --border:       #1E2D45;
  --border-light: #253550;

  --accent:       #00D4FF;
  --accent-dim:   rgba(0, 212, 255, 0.12);
  --accent-glow:  rgba(0, 212, 255, 0.25);
  --accent-strong: rgba(0, 212, 255, 0.45);
  --purple:       #7B2FFF;
  --purple-dim:   rgba(123, 47, 255, 0.15);

  --text:         #F0F4FF;
  --text-2:       #8892A4;
  --text-3:       #4A5568;

  --green:        #00D97E;
  --amber:        #FFB800;
  --red:          #FF4757;

  /* Typography */
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing (8px base) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Radius */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 28px rgba(0, 212, 255, 0.22);
  --shadow-accent-lg: 0 0 60px rgba(0, 212, 255, 0.35);

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 220ms ease;
  --t-slow: 380ms ease;

  /* Layout */
  --nav-h:  72px;
  --max-w:  1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

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

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ------------------------------------------------
   Layout
   ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--sp-32) 0; }

/* ------------------------------------------------
   Typography
   ------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: clamp(2.75rem, 6.5vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
h5 { font-size: 1.0625rem; }

p { color: var(--text-2); }

/* ------------------------------------------------
   Buttons
   ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.875rem 1.875rem;
  border-radius: var(--r-md);
  transition: all var(--t-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #fff;
  box-shadow: var(--shadow-accent-lg);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-dim);
  box-shadow: var(--shadow-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface);
}

.btn-lg { font-size: 1.0625rem; padding: 1.125rem 2.375rem; }
.btn-sm { font-size: 0.875rem; padding: 0.625rem 1.25rem; }

/* ------------------------------------------------
   Section Header
   ------------------------------------------------ */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
}
.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.section-title { margin-bottom: var(--sp-4); }

.section-subtitle {
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ------------------------------------------------
   Cards
   ------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}

/* ------------------------------------------------
   Icon box
   ------------------------------------------------ */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.18);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.icon-box-lg {
  width: 68px;
  height: 68px;
  border-radius: var(--r-xl);
}

/* ------------------------------------------------
   Badge
   ------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-full);
}

.badge-accent  { background: var(--accent); color: var(--bg); }
.badge-purple  { background: var(--purple); color: #fff; }
.badge-green   { background: var(--green); color: var(--bg); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }

/* ------------------------------------------------
   Terminal / code aesthetic
   ------------------------------------------------ */
.terminal-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--r-sm);
  padding: 0.25rem 0.75rem;
}

.terminal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}

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

/* ------------------------------------------------
   Circuit grid background
   ------------------------------------------------ */
.circuit-bg {
  position: relative;
  overflow: hidden;
}
.circuit-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}
.circuit-bg > * { position: relative; z-index: 1; }

/* ------------------------------------------------
   Glow orbs (decorative)
   ------------------------------------------------ */
.orb {
  position: absolute;
  border-radius: var(--r-full);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-cyan {
  background: radial-gradient(circle, rgba(0,212,255,0.18) 0%, transparent 70%);
}

.orb-purple {
  background: radial-gradient(circle, rgba(123,47,255,0.15) 0%, transparent 70%);
}

/* ------------------------------------------------
   Scroll Reveal
   ------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }
.delay-5 { transition-delay: 0.50s; }
.delay-6 { transition-delay: 0.60s; }

/* ------------------------------------------------
   Grids
   ------------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------
   Check list
   ------------------------------------------------ */
.check-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.9375rem;
  color: var(--text-2);
}

.check-list li .check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: var(--r-full);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--accent);
  margin-top: 2px;
}

/* ------------------------------------------------
   Stats row
   ------------------------------------------------ */
.stat-block { text-align: center; }

.stat-number {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--text);
  line-height: 1;
}

.stat-number .accent { color: var(--accent); }
.stat-label { font-size: 0.875rem; color: var(--text-2); margin-top: 0.375rem; }

/* ------------------------------------------------
   Inner page hero
   ------------------------------------------------ */
.page-hero {
  padding: calc(var(--nav-h) + var(--sp-20)) 0 var(--sp-20);
  text-align: center;
}

.page-hero .section-label { margin-bottom: var(--sp-5); }
.page-hero h1 { margin-bottom: var(--sp-6); }
.page-hero .lead {
  font-size: 1.1875rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ------------------------------------------------
   Divider
   ------------------------------------------------ */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-24) 0 var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-8);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3125rem;
  color: var(--text);
  margin-bottom: var(--sp-5);
  text-decoration: none;
}

.footer-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.25);
  color: var(--accent);
}

.footer-logo span { color: var(--accent); }

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 280px;
  margin-bottom: var(--sp-6);
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  transition: opacity var(--t-fast);
}
.footer-email:hover { opacity: 0.75; }

.footer-col-title {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-5);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }

.footer-col ul a {
  font-size: 0.9375rem;
  color: var(--text-2);
  transition: color var(--t-fast);
}
.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-3);
}

.footer-bottom a {
  color: var(--text-3);
  transition: color var(--t-fast);
}
.footer-bottom a:hover { color: var(--text-2); }

.footer-bottom-links { display: flex; gap: var(--sp-6); }

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1; }
  .footer-bottom { flex-direction: column; gap: var(--sp-4); text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
  section { padding: var(--sp-20) 0; }
}

/* ------------------------------------------------
   Utility
   ------------------------------------------------ */
.text-accent  { color: var(--accent) !important; }
.text-muted   { color: var(--text-3) !important; }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
