/* =========================================================
   24HG Developer Portal — style.css
   ========================================================= */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Custom properties --- */
:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #0e0e12;
  --bg-card: #111116;
  --bg-card-hover: #18181f;
  --bg-terminal: #0c0c10;
  --cyan: #00e5ff;
  --cyan-dim: #00b8d4;
  --cyan-glow: rgba(0, 229, 255, 0.15);
  --cyan-glow-strong: rgba(0, 229, 255, 0.25);
  --green: #00ff88;
  --yellow: #ffd600;
  --red: #ff4455;
  --purple: #a78bfa;
  --text-primary: #e8eaed;
  --text-secondary: #8b8fa3;
  --text-dim: #555566;
  --border: #1a1a24;
  --border-hover: #2a2a3a;
  --font-mono: 'Share Tech Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* --- Reset & base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* --- Keyframes --- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.05); }
  50% { box-shadow: 0 0 40px rgba(0, 229, 255, 0.12); }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- Utility classes --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
}

.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-purple { color: var(--purple); }
.text-dim { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }

/* --- Scanline overlay (subtle) --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-mark {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.5px;
}

.nav-brand-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.nav-brand-label .slash {
  color: var(--text-dim);
  margin: 0 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: all 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--cyan);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  text-align: center;
}

/* Background gradient orbs */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 229, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 184, 212, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 229, 255, 0.02) 0%, transparent 70%);
  background-size: 200% 200%;
  animation: gradient-shift 12s ease-in-out infinite;
  pointer-events: none;
}

/* Grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  animation: fade-in-up 0.8s ease-out both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2s infinite;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}

.hero h1 .line2 {
  color: var(--cyan);
  display: block;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
}

/* Terminal code block in hero */
.hero-terminal {
  margin-top: 48px;
  text-align: left;
  max-width: 620px;
  width: 100%;
  animation: fade-in-up 0.8s ease-out 0.3s both;
}

.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.06);
  animation: glow-pulse 4s ease-in-out infinite;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-line {
  white-space: nowrap;
  opacity: 0;
  animation: slide-in-left 0.4s ease-out forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.6s; }
.terminal-line:nth-child(2) { animation-delay: 0.9s; }
.terminal-line:nth-child(3) { animation-delay: 1.2s; }
.terminal-line:nth-child(4) { animation-delay: 1.5s; }
.terminal-line:nth-child(5) { animation-delay: 1.8s; }
.terminal-line:nth-child(6) { animation-delay: 2.1s; }

.prompt {
  color: var(--green);
}

.flag {
  color: var(--yellow);
}

.string {
  color: var(--cyan);
}

.url {
  color: var(--purple);
}

.comment {
  color: var(--text-dim);
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--cyan);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  animation: fade-in-up 0.8s ease-out 0.5s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* =========================================================
   SECTION COMMON
   ========================================================= */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 12px auto 0;
}

/* =========================================================
   FEATURE CARDS
   ========================================================= */
.features-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--cyan);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================================================
   API DOCS PREVIEW
   ========================================================= */
.api-section {
  background: var(--bg-primary);
}

.api-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.api-endpoints {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  font-family: var(--font-mono);
  font-size: 13px;
}

.api-endpoint:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.api-method {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  min-width: 52px;
  text-align: center;
  letter-spacing: 0.5px;
}

.method-get {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
}

.method-post {
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
}

.method-put {
  background: rgba(255, 214, 0, 0.1);
  color: var(--yellow);
}

.method-delete {
  background: rgba(255, 68, 85, 0.1);
  color: var(--red);
}

.api-path {
  color: var(--text-secondary);
}

.api-response {
  position: sticky;
  top: 100px;
}

.api-response .terminal {
  font-size: 12px;
}

.api-response .terminal-body {
  line-height: 1.7;
}

.json-key {
  color: var(--cyan);
}

.json-string {
  color: var(--green);
}

.json-number {
  color: var(--yellow);
}

.json-bool {
  color: var(--purple);
}

/* =========================================================
   SDK SECTION
   ========================================================= */
.sdk-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sdk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.sdk-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
  text-align: center;
}

.sdk-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sdk-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: var(--radius-lg);
}

.sdk-card h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sdk-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

.sdk-card .sdk-install {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* =========================================================
   COMING SOON BANNER
   ========================================================= */
.coming-soon {
  padding: 80px 0;
  text-align: center;
  position: relative;
}

.coming-soon-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px;
  border: 1px dashed rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-lg);
  position: relative;
  background: rgba(0, 229, 255, 0.02);
}

.coming-soon-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--yellow);
  background: rgba(255, 214, 0, 0.1);
  border: 1px solid rgba(255, 214, 0, 0.2);
  border-radius: 4px;
  padding: 4px 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.coming-soon h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.coming-soon p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

.coming-soon .status-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.coming-soon .status-line .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  margin-right: 8px;
  animation: blink 2s infinite;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left p {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-left p.tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* =========================================================
   SCROLL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .api-layout {
    grid-template-columns: 1fr;
  }

  .api-response {
    position: static;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .sdk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero h1 {
    letter-spacing: -0.5px;
  }

  section {
    padding: 64px 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .terminal-body {
    font-size: 11px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .sdk-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }

  .hero-badge {
    font-size: 10px;
  }
}
