/* ============================================================
   BLOQRA — Shared design system
   Crystal Block Puzzle marketing site
   ============================================================ */

:root {
  /* Color */
  --bg: #0A0A18;
  --bg-alt: #0F0F26;
  --card: #14142C;
  --card-2: #191940;
  --border: #262650;
  --primary: #7C5CFC;
  --primary-light: #AA8BFF;
  --secondary: #00D4E8;
  --accent: #FFB800;
  --text: #F5F4FF;
  --sub: #9694B8;
  --sub-dim: #6E6C93;
  --success: #22C55E;
  --danger: #EF4444;

  /* Type */
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max-w: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% -10%, rgba(124,92,252,0.20), transparent 50%),
    radial-gradient(circle at 100% 15%, rgba(0,212,232,0.10), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--secondary);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0;
  color: var(--text);
}

h1 { font-size: clamp(34px, 5.5vw, 60px); line-height: 1.05; letter-spacing: 0.5px; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; }
h3 { font-size: 19px; }

p { color: var(--sub); margin: 0; }

.lede {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--sub);
  max-width: 52ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 24, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
}

.brand .marks { display: flex; gap: 3px; }
.brand .mark {
  width: 12px; height: 12px; border-radius: 3px;
}
.brand .mark:nth-child(1) { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.brand .mark:nth-child(2) { background: linear-gradient(135deg, var(--secondary), #67E8F9); }
.brand .mark:nth-child(3) { background: linear-gradient(135deg, var(--accent), #FFD666); }

.brand .brand-text {
  background: linear-gradient(120deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav .nav-links {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sub);
}

.main-nav .nav-links a { transition: color .15s ease; }
.main-nav .nav-links a:hover,
.main-nav .nav-links a[aria-current="page"] { color: var(--text); }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
}

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--sub);
  padding: 7px 13px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background .15s ease, color .15s ease;
}

.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0A0A18;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  padding: 14px 26px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #08081a;
  box-shadow: 0 10px 30px rgba(124,92,252,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124,92,252,0.5); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
  color: var(--sub);
  cursor: default;
  opacity: 0.75;
}

.btn small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  opacity: 0.75;
}

.store-icon { flex: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lede { margin-bottom: 30px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.trust-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--sub-dim);
}
.trust-row span { display: flex; align-items: center; gap: 6px; }
.trust-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); }

/* Signature: live grid demo */
.grid-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.grid-frame {
  position: relative;
  width: min(380px, 88vw);
  aspect-ratio: 1;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45), 0 0 60px rgba(124,92,252,0.12);
}

#liveGrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
}

.cell {
  border-radius: 5px;
  background: rgba(255,255,255,0.035);
  transition: background .35s ease, box-shadow .35s ease, opacity .35s ease;
}

.cell.filled {
  box-shadow: 0 0 10px 1px var(--glow, rgba(124,92,252,0.5));
}

.cell.clearing {
  opacity: 0.15;
}

.grid-caption {
  text-align: center;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--sub-dim);
  letter-spacing: 0.5px;
}

/* ---------- Sections ---------- */
section { padding: 78px 0; }
.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.section-head h2 { margin-bottom: 14px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: none;
  margin: 0;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: linear-gradient(160deg, var(--card), rgba(20,20,44,0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}

.feature-card .ico {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  margin-bottom: 16px;
  background: rgba(124,92,252,0.14);
  border: 1px solid rgba(124,92,252,0.3);
}

.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}
.step .step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 14.5px; }

/* CTA banner */
.cta-banner {
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 0%, rgba(124,92,252,0.3), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(0,212,232,0.2), transparent 55%),
    var(--card);
  border: 1px solid var(--border);
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner .lede { margin: 0 auto 30px; }
.cta-banner .cta-row { justify-content: center; margin-bottom: 0; }

/* ---------- Legal / content pages ---------- */
.page-hero {
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow { display: block; margin-bottom: 12px; }
.page-hero .updated { margin-top: 14px; font-size: 13px; color: var(--sub-dim); }

.legal-body {
  padding: 50px 0 90px;
  max-width: 780px;
  margin: 0 auto;
}
.legal-body h2 {
  font-size: 21px;
  margin-top: 42px;
  margin-bottom: 12px;
  padding-top: 6px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { color: var(--sub); margin-bottom: 14px; font-size: 15px; }
.legal-body ul { color: var(--sub); font-size: 15px; padding-left: 20px; margin-bottom: 14px; }
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); }

.notice-box {
  background: rgba(255,184,0,0.08);
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--sub);
  margin-bottom: 36px;
}
.notice-box strong { color: var(--accent); }

.placeholder-tag {
  color: var(--accent);
  font-weight: 600;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}
.contact-card .ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  background: rgba(0,212,232,0.12);
  border: 1px solid rgba(0,212,232,0.3);
}
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { font-size: 14.5px; margin-bottom: 18px; }
.contact-card .btn { width: 100%; }

.faq-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item h3 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 30px;
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 44px;
}

.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; max-width: 30ch; }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sub-dim);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--sub);
  margin-bottom: 10px;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--sub-dim);
}

.footer-bottom .lang-switch { transform: scale(0.92); transform-origin: right center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-stage { order: -1; }
  .grid-frame { width: min(320px, 74vw); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav .nav-links,
  .main-nav .header-cta { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .main-nav.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: rgba(10,10,24,0.98);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 26px;
    gap: 18px;
  }
  .main-nav.mobile-open .header-cta {
    display: inline-flex;
    margin: 4px 24px 20px;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  section { padding: 56px 0; }
  .cta-banner { padding: 40px 22px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
}
