/* ============================================
   BeachViber Static Website — Shared Styles
   Matches beachviber-webapp design system
   ============================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a26;
  --bg-input: #1e1e2e;
  --bg-card: #13131f;
  --border-primary: #2a2a3a;
  --border-hover: #3a3a4a;
  --text-primary: #e4e4ef;
  --text-secondary: #8888a0;
  --text-muted: #555566;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.2);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
}

html, body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 2px; }

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

img { max-width: 100%; height: auto; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-primary);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand .beach { color: var(--text-primary); }
.nav-brand .viber {
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }

.nav-cta {
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all 0.2s;
}
.nav-cta:hover {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.nav-toggle:hover {
  border-color: var(--border-hover);
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.hero-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  max-width: 560px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-split {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content {
  flex: 1;
  text-align: left;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image img,
.hero-image svg {
  width: 100%;
  max-width: 580px;
}

.hero-description {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 28px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all 0.2s;
}
.btn-primary:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ============================================
   Feature Cards
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-card.accent-blue { border-left: 3px solid var(--accent); }
.feature-card.accent-green { border-left: 3px solid var(--success); }
.feature-card.accent-amber { border-left: 3px solid var(--warning); }
.feature-card.accent-red { border-left: 3px solid var(--danger); }
.feature-card.accent-violet { border-left: 3px solid #8b5cf6; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.feature-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.feature-icon.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.feature-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.feature-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.feature-icon.violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   Architecture Diagram (CLI-style)
   ============================================ */
.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 32px;
}

.arch-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
}

.arch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.arch-dot.red { background: #ef4444; }
.arch-dot.yellow { background: #f59e0b; }
.arch-dot.green { background: #22c55e; }

.arch-titlebar span {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.arch-body {
  padding: 24px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  color: var(--text-secondary);
}

.arch-body .c-blue { color: #60a5fa; }
.arch-body .c-green { color: #4ade80; }
.arch-body .c-amber { color: #fbbf24; }
.arch-body .c-red { color: #f87171; }
.arch-body .c-violet { color: #a78bfa; }
.arch-body .c-cyan { color: #22d3ee; }
.arch-body .c-white { color: var(--text-primary); }
.arch-body .c-muted { color: var(--text-muted); }
.arch-body .c-dim { color: #3a3a4a; }
.arch-body .bold { font-weight: 700; }

/* ============================================
   Security Highlights
   ============================================ */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.security-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.security-item:hover { border-color: var(--border-hover); }

.security-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.security-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.security-item p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   How It Works
   ============================================ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
}

.step h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   Tech Stack
   ============================================ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stack-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.2s;
}
.stack-card:hover { border-color: var(--border-hover); }

.stack-card .stack-emoji {
  font-size: 28px;
  margin-bottom: 12px;
}

.stack-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.stack-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Security Page Specific
   ============================================ */
.security-hero {
  padding: 120px 0 40px;
  text-align: center;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.principle-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.2s;
}
.principle-card:hover { border-color: var(--border-hover); }

.principle-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.principle-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.principle-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Audit table */
.audit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 13px;
}

.audit-table th,
.audit-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
}

.audit-table th {
  background: var(--bg-tertiary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.audit-table tr:hover td {
  background: rgba(59, 130, 246, 0.03);
}

.badge {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Detail sections */
.detail-section {
  margin-top: 48px;
}

.detail-block {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  margin-top: 16px;
}

.detail-block h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-block p,
.detail-block li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.detail-block ul {
  list-style: none;
  padding: 0;
}

.detail-block li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.detail-block li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.inline-code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border-primary);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text-secondary); }

.footer-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-primary);
    padding: 20px 24px;
    gap: 12px;
    z-index: 99;
  }

  .nav-links.open li {
    width: 100%;
    text-align: right;
  }

  .nav-links.open a {
    font-size: 16px;
    padding: 8px 0;
    display: inline-block;
  }

  .nav-links.open .nav-cta {
    margin-top: 4px;
    padding: 10px 16px;
  }

  .hero-split {
    flex-direction: column;
    text-align: center;
  }
  .hero-content { text-align: center; }
  .hero-description { margin: 0 auto 28px; }
  .hero-title { font-size: 28px; }
  .hero-image { max-width: 100%; overflow: hidden; }
  .hero-image svg { max-width: 100%; height: auto; }

  .features-grid,
  .principle-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section { padding: 48px 0; }
  .hero { padding: 100px 0 48px; }
  .security-hero { padding: 100px 0 24px; }

  .arch-body { font-size: 10px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
