/* ============================================================
   Kioku — Marketing Site Styles
   Design: dark-mode-first, deep navy + warm amber accent,
   generous whitespace, sharp typographic hierarchy.
   ============================================================ */

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

:root {
  --bg:          #0b0f1a;
  --bg-card:     #111827;
  --bg-elevated: #1a2236;
  --border:      rgba(255,255,255,0.08);
  --accent:      #f5a623;
  --accent-dim:  rgba(245,166,35,0.15);
  --accent-glow: rgba(245,166,35,0.25);
  --text:        #f0f4ff;
  --text-muted:  #8b9ab8;
  --text-faint:  #4a5568;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --shadow-card: 0 4px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 60px rgba(245,166,35,0.08);
  --max-w:       1100px;
  --section-pad: 112px 24px;
  --font-sans:   'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

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

img, video { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---- Layout helpers --------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-pad);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

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

/* ---- Nav -------------------------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(11,15,26,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-logo .logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #0b0f1a;
}
.btn-primary:hover {
  background: #f7b940;
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.2);
  background: var(--bg-elevated);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.82rem;
}

/* ---- Hero ------------------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(245,166,35,0.10) 0%,
    rgba(245,166,35,0.03) 45%,
    transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--accent-dim);
  border: 1px solid rgba(245,166,35,0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero-headline {
  margin-bottom: 24px;
}
.hero-headline .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-footnote {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ---- Demo ------------------------------------------------- */
#demo {
  padding-top: 0;
  padding-bottom: 80px;
}

.demo-container {
  max-width: 860px;
  margin: 0 auto;
}

.demo-label {
  text-align: center;
  margin-bottom: 32px;
}

.demo-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.demo-video-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  /* Hidden until a src is loaded — placeholder sits on top */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.demo-video-wrap video.has-src {
  opacity: 1;
  pointer-events: auto;
}

/* Placeholder overlay shown when video src is missing */
.demo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, #111827 0%, #1a2236 100%);
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.demo-placeholder .play-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(245,166,35,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}
.demo-placeholder:hover .play-ring {
  border-color: var(--accent);
  transform: scale(1.06);
}
.demo-placeholder .play-inner {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
}

.demo-placeholder p {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.demo-placeholder .demo-soon {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.demo-caption {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* .demo-placeholder hidden via JS once video src is set */

/* ---- How it works ---------------------------------------- */
#how {
  border-top: 1px solid var(--border);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 56px;
}

.how-step {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.how-step:hover {
  border-color: rgba(245,166,35,0.25);
  box-shadow: 0 0 40px rgba(245,166,35,0.06);
}

.step-number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.step-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.how-step h3 {
  margin-bottom: 10px;
}

.how-step p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.connector {
  display: none;
}

/* ---- Security -------------------------------------------- */
#security {
  border-top: 1px solid var(--border);
}

.security-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.security-header { margin-bottom: 48px; }

.security-tagline {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.security-left {
  max-width: 540px;
}

.security-left h2 {
  margin-bottom: 16px;
}

.security-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color 0.25s;
}
.sec-card:hover {
  border-color: rgba(245,166,35,0.2);
}

.sec-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
}

.sec-card h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.sec-card p {
  font-size: 0.85rem;
  line-height: 1.65;
}

.enclave-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* ---- Footer ---------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 40px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.footer-logo .logo-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-footnote {
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 720px;
}
.footer-footnote strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }
  .nav-links {
    display: none;
  }
  #hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 64px;
  }
  .hero-badge {
    margin-bottom: 28px;
  }
  .security-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .security-left {
    max-width: 100%;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  section {
    padding: 80px 20px;
  }
  #demo {
    padding-top: 0;
    padding-bottom: 60px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.6rem; }
  .hero-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .btn { justify-content: center; }
}

/* ---- Utility --------------------------------------------- */
.text-center { text-align: center; }
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }

/* ====================================================
   WAITLIST / REQUEST ACCESS
==================================================== */
#waitlist {
  padding: var(--section-pad);
  border-top: 1px solid var(--border);
}
.waitlist-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.waitlist-tagline {
  margin: 16px auto 32px;
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.6;
}
.waitlist-form {
  text-align: left;
}
.waitlist-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.waitlist-form input[type="text"],
.waitlist-form input[type="email"],
.waitlist-form textarea {
  flex: 1 1 180px;
  min-width: 0;
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.waitlist-form input::placeholder,
.waitlist-form textarea::placeholder {
  color: var(--text-faint);
}
.waitlist-form input:focus,
.waitlist-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.waitlist-form textarea {
  display: block;
  width: 100%;
  margin-top: 10px;
  resize: vertical;
}
.waitlist-submit {
  flex: 0 0 auto;
}
.waitlist-status {
  min-height: 1.2em;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 500;
}
.waitlist-status.is-success { color: var(--accent); }
.waitlist-status.is-error   { color: #ff6b6b; }
.waitlist-fineprint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* Honeypot: kept in the DOM for bots, invisible + unreachable for humans. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Screen-reader-only labels. */
.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;
}

@media (max-width: 480px) {
  .waitlist-submit { width: 100%; }
}
