/* ============================================
   SquirrelCache Website
   Color Palette:
     --teal-light:  #3B5F6A
     --teal-mid:    #3F696A
     --teal-dark:   #153132
     --white:       #FFFFFF
   ============================================ */

:root {
  --teal-light: #3B5F6A;
  --teal-mid: #3F696A;
  --teal-dark: #153132;
  --white: #FFFFFF;
  --off-white: #F0F4F5;
  --gray-100: #E8EDEF;
  --gray-200: #D1DBDE;
  --gray-600: #5A7A7D;
  --text-primary: #0D1F20;
  --text-secondary: #3A5556;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav--scrolled {
  background: rgba(21, 49, 50, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--white);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal-dark) 100%);
  overflow: hidden;
  padding: 6rem 2rem 4rem;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 680px;
}

.hero__icon {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  margin: 0 auto 2.5rem;
  transition: transform 0.4s ease;
}

.hero__icon:hover {
  transform: scale(1.05) translateY(-4px);
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 0.75rem 1.75rem;
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero__badge:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero__badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---- Section shared ---- */
.section {
  padding: 6rem 2rem;
}

.section--alt {
  background: var(--off-white);
}

.section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-mid);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Features Grid ---- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1080px;
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 8px 32px rgba(59, 95, 106, 0.1);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-card__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- CTA / Coming Soon ---- */
.cta {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal-dark) 100%);
  position: relative;
  overflow: hidden;
}

.cta__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.cta__content {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.cta__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cta__text {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 1rem 2rem;
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.cta__badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
  background: var(--teal-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 2rem;
}

.footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer__name {
  font-weight: 600;
  color: var(--white);
  font-size: 1rem;
}

.footer__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer__links a {
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
}

/* ---- Page Layout (docs, privacy) ---- */
.page-hero {
  background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal-dark) 100%);
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.page-hero__title {
  position: relative;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.page-hero__subtitle {
  position: relative;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.75rem;
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.5rem;
}

.page-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.page-content a {
  color: var(--teal-mid);
  text-decoration: underline;
  text-decoration-color: rgba(63, 105, 106, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.page-content a:hover {
  text-decoration-color: var(--teal-mid);
}

.page-content code {
  background: var(--gray-100);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.page-content pre {
  background: var(--text-primary);
  color: var(--gray-200);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.page-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Docs sidebar layout */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  gap: 3rem;
}

.docs-sidebar {
  position: sticky;
  top: 5rem;
  align-self: start;
}

.docs-sidebar__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.docs-sidebar ul {
  list-style: none;
}

.docs-sidebar li {
  margin-bottom: 0.25rem;
}

.docs-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  background: var(--gray-100);
  color: var(--text-primary);
}

.docs-main {
  min-width: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(21, 49, 50, 0.97);
    backdrop-filter: blur(12px);
    padding: 1rem 2rem 1.5rem;
    gap: 0;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__links li:last-child {
    border-bottom: none;
  }

  .nav__toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.5rem 4rem;
  }

  .hero__icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    margin-bottom: 2rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__tagline {
    font-size: 1.0625rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .cta {
    padding: 4rem 1.5rem;
  }

  .cta__title {
    font-size: 1.75rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 4rem;
  }

  .docs-sidebar {
    position: static;
  }

  .page-hero {
    padding: 7rem 1.5rem 3rem;
  }

  .page-hero__title {
    font-size: 2rem;
  }

  .page-content {
    padding: 3rem 1.5rem 4rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.875rem;
  }

  .hero__icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
  }

  .hero__badge {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }
}
