/*
 * Shared site styling for Silk.
 */

:root {
  --bg: #f4efe7;
  --bg-soft: #fbf8f2;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-dark: #102033;
  --text: #142033;
  --muted: #5d6778;
  --line: rgba(20, 32, 51, 0.12);
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --accent: #d97706;
  --accent-soft: rgba(217, 119, 6, 0.12);
  --shadow: 0 24px 60px rgba(16, 32, 51, 0.12);
  --shadow-soft: 0 14px 34px rgba(16, 32, 51, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at left 20%, rgba(217, 119, 6, 0.14), transparent 24%),
    linear-gradient(180deg, #f7f2ea 0%, #f4efe7 44%, #efe8dc 100%);
  color: var(--text);
  font-family: "Segoe UI", "Avenir Next", "Trebuchet MS", sans-serif;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

#wrapper {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

#sidebar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  min-height: 100vh;
  height: 100vh;
  width: 16rem;
  margin-left: -16rem;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  transition: margin 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
  padding: 0.75rem 1rem 1.25rem;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#sidebar-wrapper .list-group {
  width: 100%;
  gap: 0.5rem;
}

#sidebar-wrapper .list-group-item {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item:focus {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  transform: translateX(2px);
}

#page-content-wrapper {
  width: 100%;
  min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
  margin-left: 0;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 1rem 1.5rem;
  background: rgba(244, 239, 231, 0.72);
  border-bottom: 1px solid rgba(20, 32, 51, 0.08);
  backdrop-filter: blur(14px);
}

.site-nav .navbar-brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav .nav-link,
.site-nav .dropdown-item {
  color: var(--muted);
  font-weight: 600;
}

.site-nav .nav-link:hover,
.site-nav .dropdown-item:hover {
  color: var(--primary-dark);
}

.menu-button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(20, 32, 51, 0.08);
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: 3rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 26%),
    linear-gradient(135deg, #0f1f32 0%, #123251 48%, #175d63 100%);
  color: #f9fafb;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f6d7a9;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-header h1,
.section-header h2,
.story-card h2,
.feature-card h3,
.platform-card h3,
.stat-card strong,
.cta-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 1rem 0;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 39rem;
  color: rgba(249, 250, 251, 0.88);
  font-size: 1.1rem;
}

.hero-actions,
.button-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.button-row {
  margin-top: 0;
}

.btn-brand,
.btn-secondary-brand,
.store-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.btn-brand {
  padding: 0.95rem 1.4rem;
  background: linear-gradient(135deg, #f1a43b 0%, #d97706 100%);
  color: #fffaf2;
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.28);
}

.btn-brand:hover {
  color: #fffaf2;
  transform: translateY(-1px);
}

.btn-secondary-brand {
  padding: 0.95rem 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.btn-secondary-brand:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-grid,
.cards-grid,
.platform-grid,
.story-grid,
.download-grid,
.stats-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  align-items: end;
}

.cards-grid,
.platform-grid,
.story-grid,
.download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.hero-panel,
.feature-card,
.platform-card,
.story-card,
.stat-card,
.cta-panel,
.page-card,
.download-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  color: var(--text);
}

.hero-panel h2,
.download-card h3,
.page-card h2,
.story-card h2,
.cta-panel h2 {
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
}

.hero-panel p,
.hero-panel li,
.feature-card p,
.platform-card p,
.story-card p,
.download-card p,
.download-card li,
.page-card p,
.page-card li,
.cta-panel p {
  color: var(--muted);
}

.feature-card,
.platform-card,
.story-card,
.stat-card,
.cta-panel,
.page-card,
.download-card {
  padding: 1.6rem;
}

.stat-card {
  color: var(--text);
}

.stat-card strong {
  color: var(--text);
}

.stat-card p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--muted);
}

.feature-card {
  background: rgba(255, 255, 255, 0.88);
}

.feature-icon,
.platform-badge,
.stat-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-icon,
.platform-badge {
  padding: 0.45rem 0.8rem;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
}

.stat-label {
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.section-block {
  margin-top: 2rem;
}

.section-header {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

.section-header h2,
.section-header h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2rem, 3vw, 3rem);
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.platform-card {
  position: relative;
  overflow: hidden;
}

.platform-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 38%);
  pointer-events: none;
}

.platform-card.featured {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.platform-meta,
.download-meta {
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-meta li,
.download-meta li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.platform-meta li:last-child,
.download-meta li:last-child {
  border-bottom: 0;
}

.store-link,
.text-link {
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
}

.store-link {
  background: var(--surface-dark);
  color: #ffffff;
}

.store-link:hover {
  color: #ffffff;
  background: #0c1828;
}

.text-link {
  padding-left: 0;
  color: var(--primary-dark);
}

.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.inline-tags span {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(249, 250, 251, 0.92);
  font-size: 0.92rem;
}

.story-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.76) 100%);
}

.download-card {
  height: 100%;
}

.download-card.featured {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.download-card .store-link,
.download-card .btn-brand {
  width: 100%;
  margin-top: 1rem;
}

.download-card .btn-brand {
  border: 0;
}

.page-card + .page-card,
.cta-panel {
  margin-top: 1.5rem;
}

.cta-panel {
  background: linear-gradient(135deg, #102033 0%, #174c56 100%);
  color: #f9fafb;
}

.cta-panel p {
  color: rgba(249, 250, 251, 0.82);
}

.page-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-footer a {
  color: var(--primary-dark);
}

.mono-note {
  font-family: "Consolas", "Courier New", monospace;
}

@media (min-width: 768px) {
  #sidebar-wrapper {
    margin-left: 0;
  }

  #page-content-wrapper {
    min-width: 0;
    width: calc(100% - 16rem);
    margin-left: 16rem;
  }

  #wrapper.toggled #sidebar-wrapper {
    margin-left: -16rem;
  }

  #wrapper.toggled #page-content-wrapper {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 991.98px) {
  .hero,
  .feature-card,
  .platform-card,
  .story-card,
  .stat-card,
  .cta-panel,
  .page-card,
  .download-card,
  .hero-panel {
    padding: 1.35rem;
  }

  .hero-grid,
  .cards-grid,
  .platform-grid,
  .story-grid,
  .download-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-bottom: 3rem;
  }

  .site-nav {
    padding: 0.85rem 0.9rem;
  }

  .hero {
    padding: 1.4rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .button-row,
  .hero-actions {
    flex-direction: column;
  }

  .btn-brand,
  .btn-secondary-brand,
  .store-link {
    width: 100%;
  }
}
