/* --- LAYOUT --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  height: 64px;
  background: rgba(248, 250, 251, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.header-tagline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: auto;
  letter-spacing: 0.02em;
}

/* --- Main content --- */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(64px + var(--space-2xl)) var(--space-xl) var(--space-3xl);
  width: 100%;
}

.page-container {
  width: 100%;
  max-width: 900px;
}

/* --- Hero --- */

.hero-section {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.hero-headline em {
  font-style: normal;
  color: var(--teal);
}

.hero-lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Sections --- */

.demo-section {
  padding: var(--space-2xl) 0;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

/* --- Card surfaces --- */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

/* --- StreamLog tab (right edge) --- */

.streamlog-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: var(--space-lg) var(--space-sm);
  cursor: pointer;
  transition: color var(--duration-fast) ease,
              background var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.streamlog-tab:hover {
  color: var(--teal);
  background: var(--teal-soft);
  box-shadow: var(--shadow-md);
}

.streamlog-tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.streamlog-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 33.333vw;
  min-width: 320px;
  max-width: 500px;
  z-index: 95;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  overflow-y: auto;
  padding: var(--space-xl);
}

.streamlog-panel[aria-expanded="true"] {
  transform: translateX(0);
}

.streamlog-panel-header {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.streamlog-panel-close {
  font-size: 1.25rem;
  color: var(--text-secondary);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) ease,
              background var(--duration-fast) ease;
}

.streamlog-panel-close:hover {
  color: var(--text);
  background: var(--bg-mid);
}

.streamlog-empty {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Footer --- */

.site-footer {
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .site-header {
    padding: 0 var(--space-md);
  }

  .main-content {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .header-tagline {
    display: none;
  }

  .streamlog-panel {
    width: 85vw;
    min-width: unset;
  }

  .card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: var(--space-xl) 0;
  }
}
