/* ==========================================================================
   ARKA SMART BD — DARK SCI-FI STYLESHEET (Cloudflare Pages Static Site)
   World: Historical Characters on a Spaceship (sops.md 3b)
   Tone: Cool, serious, premium cinematic. Clean and function-first.
   ========================================================================== */

:root {
  --bg-deep: #070a10;
  --bg-card: #0e1422;
  --bg-card-hover: #141d30;
  --bg-elevated: #182238;
  --border-dim: #1f2d48;
  --border-bright: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8493a8;
  --text-accent: #38bdf8;

  --accent-cyan: #00e5ff;
  --accent-cyan-dim: rgba(0, 229, 255, 0.12);
  --accent-blue: #0284c7;
  --accent-gold: #f59e0b;
  --accent-gold-dim: rgba(245, 158, 11, 0.12);

  --wa-green: #25d366;
  --wa-green-hover: #1ebd5a;
  --wa-green-glow: rgba(37, 211, 102, 0.3);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --container-max: 980px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-deep);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.15), transparent 70%),
    radial-gradient(circle at 15% 30%, rgba(0, 229, 255, 0.04), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.03), transparent 40%),
    var(--bg-deep);
  color: var(--text-secondary);
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Sci-Fi Navigation Header */
.site-header {
  border-bottom: 1px solid var(--border-dim);
  background: rgba(7, 10, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-logo .hull-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  text-decoration: none;
}

/* Outreach Teaser Banner */
.banner-outreach {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-bottom: 1px solid var(--border-dim);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.banner-outreach .banner-tag {
  display: inline-block;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
}

.banner-outreach strong {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid var(--border-dim);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.825rem;
  color: var(--text-accent);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.hero-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--wa-green);
  box-shadow: 0 0 8px var(--wa-green);
}

.hero-title {
  font-size: 2.5rem;
  max-width: 820px;
  margin: 0 auto 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-title span.highlight {
  color: var(--accent-cyan);
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA WhatsApp Button */
.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: var(--wa-green);
  color: #062312;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--wa-green-glow);
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-whatsapp:hover {
  background-color: var(--wa-green-hover);
  color: #03150a;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-whatsapp svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.founder-line {
  font-size: 0.875rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Content Sections */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-dim);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
  display: block;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-cyan);
}

.card:hover {
  border-color: var(--border-bright);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.card h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Feature Checklist ("Yang Kamu Dapat") */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

/* Demo Placeholder Block (Vinci the Artist) */
.demo-box {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-header .ship-log {
  color: var(--accent-cyan);
}

.demo-placeholder-art {
  min-height: 240px;
  background: 
    radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(255, 255, 255, 0.02) 20px, rgba(255, 255, 255, 0.02) 21px),
    #0a0f1d;
  border: 1px dashed var(--border-dim);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.demo-placeholder-art .character-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.demo-chat-simulation {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 85%;
}

.chat-bubble.inbound {
  align-self: flex-start;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
}

.chat-bubble.outbound {
  align-self: flex-end;
  background-color: #0b3b24;
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #e2fbe8;
}

.chat-bubble .chat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-top: 0.35rem;
  opacity: 0.75;
}

/* Legal & Agree Pages Specific Styles */
.legal-page {
  padding: 3rem 0 5rem;
}

.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-top: 0.5rem;
}

.legal-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.legal-body h1 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.legal-body h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.legal-body h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text-accent);
}

.legal-body hr {
  border: 0;
  border-top: 1px solid var(--border-dim);
  margin: 2rem 0;
}

.legal-body ul, .legal-body ol {
  margin: 1rem 0 1rem 1.5rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-body em {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Agree Page Summary & Inline Document Readers */
.agree-summary-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.agree-bullets {
  list-style: none;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.agree-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border-left: 2px solid var(--accent-cyan);
  padding-left: 1rem;
}

.agree-bullet-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.agree-bullet-item em {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: normal;
  display: block;
}

/* Document Expanders on Agree Page */
.doc-expand-section {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.doc-viewer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.doc-viewer-card.viewed {
  border-color: rgba(37, 211, 102, 0.4);
}

.doc-viewer-header {
  padding: 1rem 1.25rem;
  background-color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.doc-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.read-status-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.read-status-badge.status-read {
  background-color: rgba(37, 211, 102, 0.15);
  color: var(--wa-green);
  border-color: rgba(37, 211, 102, 0.35);
}

.btn-toggle-doc {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-doc:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}

.doc-scroll-pane {
  max-height: 380px;
  overflow-y: auto;
  padding: 1.5rem;
  background-color: #080c16;
  border-top: 1px solid var(--border-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.doc-scroll-pane::-webkit-scrollbar {
  width: 8px;
}
.doc-scroll-pane::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
.doc-scroll-pane::-webkit-scrollbar-thumb {
  background: var(--border-dim);
  border-radius: 4px;
}
.doc-scroll-pane::-webkit-scrollbar-thumb:hover {
  background: var(--border-bright);
}

.scroll-sentinel {
  height: 4px;
  width: 100%;
}

.scroll-hint {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  text-align: center;
  padding: 0.5rem;
  background: var(--accent-gold-dim);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

/* Form & Checkbox Controls */
.agree-action-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
  margin-bottom: 1.5rem;
}

.checkbox-container input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0.2rem;
  accent-color: var(--wa-green);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.checkbox-label em {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.btn-agree {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-cyan);
  color: #04121a;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-agree:hover:not(:disabled) {
  background-color: #38bdf8;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.btn-agree:disabled {
  background-color: #1e293b;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.validation-notice {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Submission Note Banner (Newton's Engine TODO) */
.submit-result-box {
  display: none;
  margin-top: 2rem;
  background: #081a13;
  border: 1px solid var(--wa-green);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #bbf7d0;
}

.submit-result-box h4 {
  color: var(--wa-green);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.submit-result-box pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
  margin-top: 0.75rem;
  color: #86efac;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-dim);
  background-color: var(--bg-deep);
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }

  .grid-3, .grid-2, .feature-list, .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .site-nav {
    display: none; /* simple mobile fallback or stack */
  }

  .header-inner {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
