/* ==========================================================================
   nxcloud — Official Website
   Theme: Bright Professional Corporate Light (NXDOM family style)
   ========================================================================== */

:root {
  --bg-main: #FFFFFF;
  --bg-alt: #FFF8F1;        /* warm orange-tinted alt */
  --bg-card: #FFFFFF;

  --border: #E2E8F0;
  --border-hover: #CBD5E1;

  --text-heading: #0F172A;
  --text-main: #334155;
  --text-muted: #64748B;

  --brand-primary: #F6821F;   /* Cloudflare orange — bright */
  --brand-hover: #E06D0A;
  --brand-accent: #2563EB;    /* blue counterpart */
  --brand-sponsor: #DB2777;   /* pink for sponsor heart */

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
}

body {
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-hover); text-decoration: none; transition: 0.2s ease; }
a:hover { color: var(--brand-primary); }

code, pre { font-family: var(--font-mono); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Background Effects */
.glow-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 0%, rgba(246, 130, 31, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 100%, rgba(37, 99, 235, 0.04) 0%, transparent 50%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

/* Header */
.navbar {
  position: fixed;
  top: 0; width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background 0.3s ease, border-bottom 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-heading);
}

.brand-logo {
  display: block;
  width: 32px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.25rem;
}

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--text-heading); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Lang Switch */
.lang-switch {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  padding: 2px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-switch button.active {
  background: var(--bg-card);
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(246, 130, 31, 0.28);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(246, 130, 31, 0.38);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-heading);
  background: #ffffff;
}

.btn-outline:hover {
  border-color: var(--text-heading);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-sponsor {
  background: #FDF2F8;
  color: var(--brand-sponsor);
  border: 1px solid #FBCFE8;
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-sponsor:hover {
  background: var(--brand-sponsor);
  color: #fff;
  border-color: var(--brand-sponsor);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: 160px 0 90px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.grad {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 660px;
  margin: 22px auto 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* Terminal */
.hero-terminal {
  max-width: 640px;
  margin: 52px auto 0;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #1E293B, #0F172A);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: #1E293B;
}

.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.term-bar span:first-child { background: #FF5F57; }
.term-bar span:nth-child(2) { background: #FEBC2E; }
.term-bar span:nth-child(3) { background: #28C840; }
.term-bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: #94A3B8;
}

.hero-terminal pre {
  padding: 20px 22px;
  font-size: 0.86rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #E2E8F0;
}

.cmt { color: #64748B; }
.dim { color: #7AA2F7; font-weight: 700; }
.ok { color: #4ADE80; }
.url { color: #FBA94C; }

/* Strip */
.strip {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}

.strip-inner {
  padding-block: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.stat span { color: var(--text-muted); font-size: 0.85rem; }

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

.section-header { margin-bottom: 44px; }
.section-header.center { text-align: center; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-heading);
}

.section-subtitle { color: var(--text-muted); margin-top: 8px; }

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.div-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.div-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}

.div-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-primary) 12%, #ffffff);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.div-icon svg { width: 22px; height: 22px; }

.div-card h4 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.div-card p { color: var(--text-muted); font-size: 0.93rem; }

.div-card code {
  background: #FFF3E6;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--brand-hover);
}

/* Flow */
.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 110px;
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
}

.flow-node small { color: var(--text-muted); font-weight: 400; }
.flow-node.hl {
  border-color: color-mix(in srgb, var(--brand-primary) 50%, var(--border));
  background: #FFF3E6;
}
.flow-arrow {
  align-self: center;
  color: var(--brand-primary);
  font-size: 1.3rem;
  font-weight: 700;
}
.flow-note {
  margin-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.93rem;
  max-width: 640px;
  margin-inline: auto;
}
.flow-note em { color: var(--brand-hover); font-style: normal; font-weight: 600; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.step > div {
  min-width: 0;
  max-width: 100%;
}

.step:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}

.step-num {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-primary) 14%, #ffffff);
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin-bottom: 0;
  color: var(--text-heading);
}

/* Code block + copy button */
.code-block { position: relative; }

.code-block pre {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-x: auto;
  color: #334155;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  color: var(--brand-primary);
  border-color: color-mix(in srgb, var(--brand-primary) 50%, var(--border));
  background: #ffffff;
}

.copy-btn svg { width: 15px; height: 15px; }

.copy-btn.copied {
  color: #16A34A;
  border-color: #16A34A;
  background: #F0FDF4;
}

/* Kode di step: light theme — teks gelap di atas latar terang */
.step pre code {
  display: block;
  white-space: pre;
  width: max-content;
  max-width: 100%;
  color: #0F172A;
}

.step pre .cmt { color: #94A3B8; }

.step pre a { color: var(--brand-accent); }

.step h3 {
  overflow-wrap: break-word;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #F1F5F9;
  padding: 52px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-heading);
}

.footer-brand .brand-logo { width: 28px; }

.footer-org { font-size: 0.92rem; font-weight: 600; }

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }

.footer-links a {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
}

.footer-links a:hover { color: var(--brand-primary); }

.text-pink { color: var(--brand-sponsor) !important; }

.footer-copy {
  margin-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.grid-3 .div-card:nth-child(1) { transition-delay: 0.05s; }
.grid-3 .div-card:nth-child(2) { transition-delay: 0.1s; }
.grid-3 .div-card:nth-child(3) { transition-delay: 0.15s; }
.grid-3 .div-card:nth-child(4) { transition-delay: 0.2s; }
.grid-3 .div-card:nth-child(5) { transition-delay: 0.25s; }
.grid-3 .div-card:nth-child(6) { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .footer-top { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
