/* Main Styles for SideRun Demo Site */

:root {
  /* Colors */
  --page-bg: #ffffff;
  --content-fg: #080232;
  --color-text: #373737;
  --color-accent: #df6502;
  
  /* Container styling */
  --container-bg: linear-gradient(135deg, #f5f0eb 0%, #ebe4dc 100%);
  --card-shadow: 0 4px 16px rgba(8, 2, 50, 0.04);
  
  /* Typography */
  --fluid-base: clamp(14px, 1.8vw, 18px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--page-bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html {
  font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--fluid-base);
}

body {
  font-size: 1rem;
  color: var(--content-fg);
}

button, a {
  touch-action: manipulation;
}

/* Single page layout - 100dvh */
body.single-page {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Content above fixed grid */
main, header, footer, section, nav {
  position: relative;
  z-index: 1;
}

/* ========================================
   GRID BACKGROUND
======================================== */

.hero-parallax {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-parallax__grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(50, 20, 2, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(50, 20, 2, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  background-repeat: repeat;
}

/* Stroke container for SideRun effect */
.site-nav__stroke.siderun {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

/* ========================================
   PAGE LAYOUT
======================================== */

.page-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(80px, 12vh, 120px) clamp(24px, 5vw, 80px) clamp(24px, 4vh, 60px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

/* Left Section: Hero + Info */
.page-left {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 48px);
}

.hero-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-compact .hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
}

.hero-compact .hero__title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  color: var(--content-fg);
  margin: 0;
}

.hero-compact .hero__subtitle {
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0.85;
  max-width: 380px;
}

/* Quick Info */
.quick-info {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Info Buttons with SideRun */
.info-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  background: rgba(245, 240, 235, 0.8);
  color: var(--content-fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.info-btn:hover {
  background: rgba(235, 228, 220, 1);
}

.info-btn .site-nav__stroke {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.info-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  color: var(--content-fg);
}

.info-value {
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  color: var(--content-fg);
}

/* Right Section: Demo Box */
.page-right {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.demo-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  background: var(--container-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.5s ease;
}

.demo-box:hover {
  transform: scale(1.02);
}

/* Toggle Views */
.demo-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.demo-view.active {
  opacity: 1;
  pointer-events: auto;
}

.demo-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(11px, 1.2vw, 14px);
  line-height: 1.6;
  color: var(--content-fg);
  background: rgba(0, 0, 0, 0.04);
  padding: 16px 20px;
  border-radius: 12px;
  display: block;
  text-align: left;
}

.demo-hint {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.6;
  color: var(--color-text);
}

/* Guide Steps */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(12px, 1.4vw, 14px);
  color: var(--content-fg);
}

.guide-step code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Footer */
.page-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  font-size: 12px;
  opacity: 0.6;
  color: var(--content-fg);
}

.page-footer a {
  color: inherit;
  text-decoration: none;
}

.page-footer a:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .page-container {
    grid-template-columns: 1fr;
    padding: clamp(70px, 10vh, 100px) 20px 20px;
    gap: 24px;
  }
  
  .page-left {
    text-align: center;
    align-items: center;
  }
  
  .hero-compact .hero__subtitle {
    max-width: 100%;
  }
  
  .quick-info {
    justify-content: center;
  }
  
  .demo-box {
    max-width: 100%;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 640px) {
  .site-nav.siderun {
    left: 1rem;
    right: 1rem;
    justify-content: center;
  }
  
  .site-nav__link.siderun {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
  }
}
