@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500&display=swap');

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

:root {
  --bg:        #080C12;
  --bg2:       #0F1923;
  --bg3:       #162030;
  --blue:      #3B82F6;
  --blue-dim:  #1D4ED8;
  --text:      #F0F4F8;
  --text2:     #8A9BB0;
  --text3:     #4A5E72;
  --border:    rgba(59,130,246,.15);
  --radius:    6px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 500; }
h4 { font-size: 1rem; font-weight: 500; }

p { max-width: 62ch; color: var(--text2); line-height: 1.75; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

section { padding: 96px 0; }
section + section { border-top: 1px solid var(--border); }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,18,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.nav-logo span { color: var(--blue); }

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

.nav-links a {
  color: var(--text2);
  font-size: .9rem;
  font-weight: 400;
  transition: color .15s;
}

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

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s;
}

.nav-cta:hover { background: var(--blue-dim); text-decoration: none !important; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

/* ── Hero ── */
.hero {
  padding: 80px 0 96px;
  border-top: none;
}

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

.hero-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .12em;
  margin-bottom: 24px;
  font-family: 'Space Grotesk', sans-serif;
}

.hero h1 {
  margin-bottom: 28px;
}

.hero h1 .light { font-weight: 300; color: var(--text2); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 52ch;
  margin-bottom: 44px;
  line-height: 1.75;
}

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

.hero-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 0 60px rgba(59,130,246,.25));
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: .95rem;
  transition: background .15s, transform .1s;
}

.btn-primary:hover { background: var(--blue-dim); text-decoration: none; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: .95rem;
  transition: color .15s, border-color .15s;
}

.btn-secondary:hover { color: var(--text); border-color: rgba(59,130,246,.4); text-decoration: none; }

/* ── Roles section ── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 56px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.role-card {
  background: var(--bg2);
  padding: 40px 32px;
}

.role-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--blue);
}

.role-card h3 { margin-bottom: 12px; color: var(--text); }
.role-card p { font-size: .9rem; max-width: none; }

/* ── Section header ── */
.section-header { margin-bottom: 56px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.05rem; }

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.feature-card {
  background: var(--bg2);
  padding: 36px 32px;
}

.feature-card h4 {
  color: var(--text);
  margin-bottom: 10px;
  font-size: 1rem;
}

.feature-card p {
  font-size: .875rem;
  max-width: none;
  color: var(--text2);
}

.feature-icon {
  color: var(--blue);
  margin-bottom: 18px;
}

/* ── DBI3 section ── */
.dbi3-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.dbi3-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .12em;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 16px;
}

.dbi3-text h2 { margin-bottom: 20px; }
.dbi3-text p { margin-bottom: 16px; max-width: none; }
.dbi3-text p:last-of-type { margin-bottom: 28px; }

.dbi3-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 28px;
  font-family: 'Space Grotesk', sans-serif;
}

.dbi3-badge-icon {
  font-size: 1.4rem;
}

.dbi3-badge-text {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
}

.dbi3-badge-text span {
  color: var(--blue);
  font-weight: 700;
}

.dbi3-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,.05);
  border: 1px dashed rgba(59,130,246,.3);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: .8rem;
  color: var(--text2);
  font-family: 'Space Grotesk', sans-serif;
}

.dbi3-coming-soon::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.dbi3-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.dbi3-device-mock {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  width: 100%;
}

.dbi3-device-mock svg { color: var(--blue); opacity: .6; }
.dbi3-device-label {
  font-size: .75rem;
  color: var(--text3);
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: .06em;
}

.dbi3-connection {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .75rem;
  color: var(--text3);
  font-family: 'Space Grotesk', sans-serif;
}

.dbi3-connection-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

/* ── Stats strip ── */
.stats-strip {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}

.stat-item {
  flex: 1;
  background: var(--bg2);
  padding: 36px 32px;
  text-align: left;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label { font-size: .85rem; color: var(--text2); }

/* ── Tutorials preview ── */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.tutorial-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.tutorial-embed {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--bg3);
}

.tutorial-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.tutorial-embed-placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: .8rem;
  font-family: 'Space Grotesk', sans-serif;
  text-align: center;
  padding: 16px;
  gap: 8px;
}

.tutorial-info { padding: 20px; }

.tutorial-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .08em;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 8px;
}

.tutorial-info h4 { color: var(--text); font-size: .95rem; }

/* ── CTA section ── */
.cta-section {
  background: var(--bg2);
  border-radius: 12px;
  padding: 72px 64px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta-section h2 { max-width: 16ch; }
.cta-section p { margin-top: 16px; max-width: 44ch; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; flex-shrink: 0; flex-direction: column; align-items: flex-start; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand { max-width: 280px; }
.footer-brand p { font-size: .85rem; color: var(--text3); max-width: none; margin-top: 12px; }

.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-size: .8rem; color: var(--text); margin-bottom: 16px; font-weight: 500; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: var(--text2); font-size: .85rem; transition: color .15s; }
.footer-col ul li a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: .8rem; color: var(--text3); max-width: none; }

/* ── Page header (inner pages) ── */
.page-header {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 { margin-bottom: 16px; }
.page-header p { font-size: 1.1rem; max-width: 56ch; }

/* ── Tutorials page ── */
.tutorials-section { padding: 72px 0; }
.tutorials-category { margin-bottom: 72px; }
.tutorials-category h3 {
  font-size: 1rem;
  color: var(--text2);
  font-weight: 400;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
}

.tutorials-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.add-tutorial-note {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: .875rem;
  color: var(--text2);
}

.add-tutorial-note code {
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: .8rem;
  color: var(--text);
}

/* ── Features page ── */
.features-category { margin-bottom: 72px; }
.features-category-label {
  font-size: .8rem;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: .1em;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 20px;
}

.features-category h3 {
  font-size: 1.4rem;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.features-full-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.feature-full-card {
  background: var(--bg2);
  padding: 32px;
}

.feature-full-card h4 { color: var(--text); margin-bottom: 10px; }
.feature-full-card p { font-size: .9rem; max-width: none; }

/* ── About page ── */
.about-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.about-text h2 { margin-bottom: 24px; }
.about-text p { margin-bottom: 20px; }
.about-text p:last-child { margin-bottom: 0; }

.about-sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  position: sticky;
  top: 80px;
}

.about-sidebar h4 { margin-bottom: 20px; color: var(--text2); font-weight: 400; font-size: .85rem; }
.about-fact { padding: 16px 0; border-bottom: 1px solid var(--border); }
.about-fact:last-child { border-bottom: none; padding-bottom: 0; }
.about-fact-label { font-size: .75rem; color: var(--text3); margin-bottom: 4px; }
.about-fact-value { font-size: .9rem; color: var(--text); font-family: 'Space Grotesk', sans-serif; }

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 56px;
}

.contact-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
}

.contact-card h3 { margin-bottom: 12px; }
.contact-card p { font-size: .9rem; margin-bottom: 24px; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo-wrap { display: none; }
  .dbi3-section { grid-template-columns: 1fr; gap: 40px; padding: 40px 32px; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }

  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }

  .hero { padding: 64px 0; }
  .roles-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .tutorials-grid { grid-template-columns: 1fr; }
  .tutorials-full-grid { grid-template-columns: 1fr; }
  .features-full-grid { grid-template-columns: 1fr; }

  .stats-strip { flex-direction: column; background: none; border: none; gap: 1px; }
  .stat-item { border: 1px solid var(--border); border-radius: var(--radius); }

  .cta-section { flex-direction: column; padding: 48px 32px; gap: 32px; }
  .about-content { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .cta-section { padding: 40px 24px; }
  .role-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Phone mockup ── */
.phone-mockup {
  display: flex;
  justify-content: center;
}

.phone-frame {
  background: #0a0a0a;
  border: 2px solid #2a2a2a;
  border-radius: 40px;
  padding: 12px;
  width: 260px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  position: relative;
}

.phone-notch {
  width: 80px;
  height: 10px;
  background: #0a0a0a;
  border-radius: 0 0 10px 10px;
  margin: 0 auto 8px;
  position: relative;
  z-index: 2;
}

.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9/19.5;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.phone-mockup--sm .phone-frame { width: 210px; border-radius: 32px; }
.phone-mockup--sm .phone-screen { border-radius: 22px; }

.phone-mockup--offset {
  margin-top: 48px;
  margin-left: -32px;
}

/* ── Feature showcase ── */
.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.feature-showcase + .feature-showcase {
  border-top: 1px solid var(--border);
}

.feature-showcase--reverse {
  direction: rtl;
}

.feature-showcase--reverse > * {
  direction: ltr;
}

.feature-showcase-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .12em;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 16px;
}

.feature-showcase-text h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 20px;
  color: var(--text);
}

.feature-showcase-text p {
  margin-bottom: 16px;
  font-size: .95rem;
  max-width: none;
}

.feature-showcase-screens {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: flex-start;
}

.feature-showcase-screens--single {
  justify-content: center;
}

@media (max-width: 900px) {
  .feature-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 0;
  }
  .feature-showcase--reverse { direction: ltr; }
  .feature-showcase-screens { justify-content: center; }
  .phone-mockup--offset { margin-top: 32px; margin-left: -20px; }
}

@media (max-width: 480px) {
  .phone-frame { width: 200px; }
  .phone-mockup--sm .phone-frame { width: 160px; }
  .phone-mockup--offset { margin-left: -16px; }
}

/* Coming Soon Banner */
.coming-soon-banner {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.coming-soon-banner p {
  margin: 0;
}

.coming-soon-banner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.coming-soon-banner a:hover {
  text-decoration: underline;
}

/* Legal pages (Privacy Policy, etc.) */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 1.25rem;
  color: var(--text);
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 16px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.legal-table th {
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.legal-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .legal-table {
    display: block;
    overflow-x: auto;
  }
}
