/* =========================================================
   Weave Network — Chrome Store Site
   css/style.css
   Global styles, design tokens, and component library.
   ========================================================= */

/* ---------------------------------------------------------
   1. CSS VARIABLES (Design Tokens)
   --------------------------------------------------------- */
:root {
  /* Colors */
  --bg-primary:     #0B0F19;
  --bg-card:        #1A1D21;
  --bg-elevated:    #1E2530;
  --border:         #1E293B;
  --border-hover:   rgba(0, 242, 254, 0.35);
  --cyan:           #00F2FE;
  --purple:         #C621FF;
  --gradient:       linear-gradient(135deg, #00F2FE 0%, #C621FF 100%);
  --gradient-subtle:linear-gradient(135deg, rgba(0,242,254,0.08) 0%, rgba(198,33,255,0.08) 100%);

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;

  /* Sizing */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Effects */
  --transition:   0.2s ease;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow:  0 0 40px rgba(0, 242, 254, 0.12);
  --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ---------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
               "Helvetica Neue", Arial, sans-serif;
  background:  var(--bg-primary);
  color:       var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img  { max-width: 100%; display: block; }
a    { color: var(--cyan); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.78; }
ul, ol { list-style: none; }

/* ---------------------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------------------- */
h1 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.2rem;  font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--text-secondary); }

/* Gradient text utility */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.section    { padding: 88px 0; }
.section-sm { padding: 52px 0; }

/* ---------------------------------------------------------
   5. NAVIGATION
   --------------------------------------------------------- */
.site-nav {
  position:   sticky;
  top:        0;
  z-index:    100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

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

/* Logo */
.nav-logo {
  display:     flex;
  align-items: center;
  gap:         10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { width: 34px; height: 34px; }
.nav-logo-text {
  font-size:   1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background:  var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Links */
.nav-links {
  display:     flex;
  align-items: center;
  gap:         28px;
  flex:        1;
  justify-content: center;
}
.nav-links a {
  color:       var(--text-secondary);
  font-size:   0.875rem;
  font-weight: 500;
  transition:  color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color:   var(--text-primary);
  opacity: 1;
}

/* CTA Button */
.nav-cta {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       8px 18px;
  background:    var(--gradient);
  border-radius: var(--radius-sm);
  color:         #000 !important;
  font-size:     0.85rem;
  font-weight:   700;
  white-space:   nowrap;
  text-decoration: none;
  transition:    opacity var(--transition), transform var(--transition);
  flex-shrink:   0;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Hamburger */
.nav-toggle {
  display:    none;
  background: none;
  border:     none;
  cursor:     pointer;
  padding:    6px;
  color:      var(--text-primary);
  flex-shrink: 0;
}
.nav-toggle span {
  display:    block;
  width:      22px;
  height:     2px;
  background: currentColor;
  margin:     5px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

/* Mobile nav */
@media (max-width: 720px) {
  .nav-links  { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display:    flex;
    flex-direction: column;
    align-items: flex-start;
    position:   absolute;
    top:        64px;
    left:       0;
    right:      0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding:    16px 24px 20px;
    gap:        16px;
  }
}

/* ---------------------------------------------------------
   6. FOOTER
   --------------------------------------------------------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding:    48px 0 24px;
}

.footer-top {
  display:        flex;
  justify-content: space-between;
  align-items:    flex-start;
  flex-wrap:      wrap;
  gap:            36px;
  margin-bottom:  40px;
}

.footer-brand  { max-width: 260px; }
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p {
  font-size: 0.85rem;
  color:     var(--text-muted);
  line-height: 1.6;
}

.footer-links-col h4 {
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color:          var(--text-muted);
  margin-bottom:  14px;
}
.footer-links-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links-col a {
  color:      var(--text-secondary);
  font-size:  0.875rem;
  transition: color var(--transition);
}
.footer-links-col a:hover { color: var(--text-primary); opacity: 1; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display:     flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap:   wrap;
  gap:         12px;
  font-size:   0.78rem;
  color:       var(--text-muted);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--text-primary); opacity: 1; }

/* ---------------------------------------------------------
   7. BUTTONS
   --------------------------------------------------------- */
.btn {
  display:       inline-flex;
  align-items:   center;
  justify-content: center;
  gap:           8px;
  padding:       11px 24px;
  border-radius: var(--radius-sm);
  font-weight:   600;
  font-size:     0.95rem;
  cursor:        pointer;
  border:        none;
  transition:    all var(--transition);
  text-decoration: none;
  line-height:   1;
}

.btn-primary {
  background: var(--gradient);
  color:      #000;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border:     1px solid var(--border);
  color:      var(--text-primary);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); opacity: 1; }

.btn-lg {
  padding:       15px 32px;
  font-size:     1.05rem;
  border-radius: 10px;
}

/* ---------------------------------------------------------
   8. CARDS
   --------------------------------------------------------- */
.card {
  background:  var(--bg-card);
  border:      1px solid var(--border);
  border-radius: var(--radius);
  padding:     24px;
  transition:  border-color var(--transition), transform var(--transition),
               box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  transform:    translateY(-2px);
  box-shadow:   var(--shadow-card);
}

/* ---------------------------------------------------------
   9. BADGES
   --------------------------------------------------------- */
.badge {
  display:        inline-block;
  padding:        5px 13px;
  border-radius:  100px;
  font-size:      0.72rem;
  font-weight:    700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.badge-cyan {
  background: rgba(0, 242, 254, 0.1);
  color:      var(--cyan);
  border:     1px solid rgba(0, 242, 254, 0.3);
}
.badge-purple {
  background: rgba(198, 33, 255, 0.1);
  color:      var(--purple);
  border:     1px solid rgba(198, 33, 255, 0.3);
}

/* ---------------------------------------------------------
   10. SECTION HEADER
   --------------------------------------------------------- */
.section-header {
  text-align:    center;
  margin-bottom: 56px;
}
.section-header .badge  { margin-bottom: 16px; }
.section-header h2      { margin-bottom: 12px; }
.section-header p {
  max-width:  540px;
  margin:     0 auto;
  font-size:  1.05rem;
  line-height: 1.7;
}

/* ---------------------------------------------------------
   11. HERO
   --------------------------------------------------------- */
.hero {
  padding:  108px 0 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Radial glow behind hero */
.hero::before {
  content:   '';
  position:  absolute;
  top:       -180px;
  left:      50%;
  transform: translateX(-50%);
  width:     700px;
  height:    700px;
  background: radial-gradient(circle,
    rgba(0, 242, 254, 0.07) 0%,
    transparent 68%);
  pointer-events: none;
}

.hero-logo {
  width:   96px;
  height:  96px;
  margin:  0 auto 28px;
  filter:  drop-shadow(0 0 28px rgba(0, 242, 254, 0.28));
}

.hero h1 { max-width: 760px; margin: 0 auto; }

.hero-subtitle {
  font-size:   1.12rem;
  max-width:   520px;
  margin:      20px auto 36px;
  color:       var(--text-secondary);
  line-height: 1.75;
}

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

.hero-note {
  font-size: 0.78rem;
  color:     var(--text-muted);
  margin-top: 16px;
}

/* ---------------------------------------------------------
   12. FEATURE GRID
   --------------------------------------------------------- */
.feature-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap:                   20px;
}

.feature-card {
  display:        flex;
  flex-direction: column;
  gap:            12px;
}

.feature-icon {
  width:         48px;
  height:        48px;
  border-radius: 10px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.35rem;
  background:    rgba(0, 242, 254, 0.07);
  border:        1px solid rgba(0, 242, 254, 0.18);
  flex-shrink:   0;
}

.feature-card h3 { color: var(--text-primary); }
.feature-card p  { font-size: 0.9rem; line-height: 1.7; }

/* ---------------------------------------------------------
   13. SCREENSHOTS
   --------------------------------------------------------- */
.screenshots-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   16px;
}

@media (max-width: 640px) {
  .screenshots-grid { grid-template-columns: 1fr; }
}

.screenshot-item {
  border-radius: var(--radius);
  overflow:      hidden;
  border:        1px solid var(--border);
  background:    var(--bg-card);
  transition:    border-color var(--transition), box-shadow var(--transition);
}
.screenshot-item:hover {
  border-color: var(--border-hover);
  box-shadow:   var(--shadow-glow);
}

/* Actual image inside screenshot item */
.screenshot-item img {
  width:      100%;
  height:     auto;
  display:    block;
  transition: transform 0.35s ease;
}
.screenshot-item:hover img { transform: scale(1.015); }

/* Placeholder shown when image file is missing */
.screenshot-placeholder {
  width:         100%;
  aspect-ratio:  16 / 9;
  background:    var(--bg-elevated);
  display:       none; /* shown via JS onerror */
  align-items:   center;
  justify-content: center;
  flex-direction: column;
  gap:           8px;
  color:         var(--text-muted);
  font-size:     0.78rem;
  border-bottom: 1px solid var(--border);
}
.screenshot-placeholder .ph-icon { font-size: 2rem; opacity: 0.3; }

/* Caption bar under each screenshot */
.screenshot-caption {
  padding:     10px 14px;
  font-size:   0.82rem;
  color:       var(--text-secondary);
  font-weight: 500;
  border-top:  1px solid var(--border);
}

/* ---------------------------------------------------------
   14. HOW IT WORKS (3-step row)
   --------------------------------------------------------- */
.steps-row {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   24px;
  position:              relative;
}

/* Connecting line between steps */
.steps-row::before {
  content:   '';
  position:  absolute;
  top:       30px;
  left:      17%;
  right:     17%;
  height:    1px;
  background: var(--gradient);
  opacity:   0.25;
}

.step         { text-align: center; padding: 20px 12px; }

.step-number {
  width:         56px;
  height:        56px;
  border-radius: 50%;
  background:    var(--gradient);
  color:         #000;
  font-weight:   800;
  font-size:     1.1rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin:        0 auto 18px;
}

.step h3 { color: var(--text-primary); margin-bottom: 8px; }

@media (max-width: 640px) {
  .steps-row        { grid-template-columns: 1fr; }
  .steps-row::before { display: none; }
}

/* ---------------------------------------------------------
   15. CTA BANNER
   --------------------------------------------------------- */
.cta-banner {
  background:    var(--gradient-subtle);
  border:        1px solid var(--border);
  border-radius: var(--radius-xl);
  padding:       64px 48px;
  text-align:    center;
}
.cta-banner h2   { margin-bottom: 12px; }
.cta-banner > p  { margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------
   16. PAGE HERO (inner pages)
   --------------------------------------------------------- */
.page-hero {
  padding:       60px 0 48px;
  border-bottom: 1px solid var(--border);
}
.page-hero .badge { margin-bottom: 12px; }
.page-hero h1     { margin-bottom: 12px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero p      { max-width: 560px; font-size: 1.05rem; }

/* ---------------------------------------------------------
   17. PROSE (long-form content)
   --------------------------------------------------------- */
.prose { max-width: 720px; }
.prose h2 {
  font-size:   1.5rem;
  margin:      44px 0 14px;
  color:       var(--text-primary);
}
.prose h3 {
  font-size:   1.1rem;
  margin:      28px 0 10px;
  color:       var(--cyan);
}
.prose p   { margin-bottom: 16px; line-height: 1.78; }
.prose ul,
.prose ol  { margin: 0 0 16px 20px; color: var(--text-secondary); line-height: 1.8; }
.prose li  { margin-bottom: 7px; }
.prose strong  { color: var(--text-primary); font-weight: 600; }
.prose a       { color: var(--cyan); }
.prose a:hover { opacity: 0.78; }
.prose hr {
  border:     none;
  border-top: 1px solid var(--border);
  margin:     36px 0;
}

/* ---------------------------------------------------------
   18. HOW-TO-USE STEPS
   --------------------------------------------------------- */
.how-step {
  display:     flex;
  gap:         24px;
  margin-bottom: 44px;
  align-items: flex-start;
}

.how-step-num {
  width:         38px;
  height:        38px;
  border-radius: 50%;
  background:    var(--gradient);
  color:         #000;
  font-weight:   800;
  font-size:     0.9rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
  flex-shrink:   0;
  margin-top:    2px;
}

.how-step-body { flex: 1; }
.how-step-body h3 { color: var(--text-primary); margin-bottom: 6px; }
.how-step-body p  { line-height: 1.75; }

.how-step-screenshot {
  margin-top:    16px;
  border-radius: var(--radius-sm);
  overflow:      hidden;
  border:        1px solid var(--border);
}
.how-step-screenshot img { width: 100%; }

/* ---------------------------------------------------------
   19. COMPATIBILITY TABLE / GRID
   --------------------------------------------------------- */
.compat-section-title {
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color:          var(--text-muted);
  margin-bottom:  16px;
  margin-top:     40px;
}
.compat-section-title:first-child { margin-top: 0; }

.compat-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap:                   10px;
  margin-bottom:         8px;
}

.compat-item {
  display:       flex;
  align-items:   center;
  gap:           10px;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:       12px 14px;
  font-size:     0.875rem;
  font-weight:   500;
  color:         var(--text-primary);
  transition:    border-color var(--transition);
}
.compat-item:hover { border-color: var(--border-hover); }

.compat-dot {
  width:         7px;
  height:        7px;
  border-radius: 50%;
  flex-shrink:   0;
}
.compat-dot-watch  { background: var(--cyan); }
.compat-dot-read   { background: var(--purple); }
.compat-dot-listen { background: #F59E0B; }

/* ---------------------------------------------------------
   20. BROWSER COMPAT TABLE
   --------------------------------------------------------- */
.table-wrap { overflow-x: auto; }

table {
  width:           100%;
  border-collapse: collapse;
  font-size:       0.9rem;
}
th {
  text-align:     left;
  padding:        11px 16px;
  background:     var(--bg-card);
  border-bottom:  2px solid var(--border);
  color:          var(--text-muted);
  font-weight:    700;
  font-size:      0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
td {
  padding:      12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color:        var(--text-secondary);
}
tr:last-child td { border-bottom: none; }

.status-yes     { color: #22C55E; font-weight: 600; }
.status-partial { color: #F59E0B; font-weight: 600; }
.status-no      { color: var(--text-muted); }

/* ---------------------------------------------------------
   21. UTILITIES
   --------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

.mt-2 { margin-top:    8px; }
.mt-4 { margin-top:   16px; }
.mt-6 { margin-top:   24px; }
.mt-8 { margin-top:   32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.divider {
  height:     1px;
  background: var(--border);
  border:     none;
  margin:     0;
}

/* Inline icon sizing */
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
