/* ============================================
   Gunicorn Landing Page
   Inspired by Caddy: minimal, spacious, clean
   ============================================ */

.home {
  --accent: #00a650;
  --accent-hover: #00c853;
  --accent-dark: #008542;
  --teal: #00bfa5;
  --text: #1a1a2e;
  --text-muted: #555;
  --bg: #fff;
  --bg-alt: #f8faf8;
  --border: #e0e6e0;
  --code-bg: #0d1117;
  --max-width: 900px;

  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

[data-md-color-scheme="slate"] .home {
  --text: #e6e6e6;
  --text-muted: #aaa;
  --bg: #0d1117;
  --bg-alt: #161b22;
  --border: #30363d;
}

/* Remove MkDocs constraints */
.md-main__inner { margin: 0; max-width: none; }
.md-content { max-width: none; }
.md-content__inner { margin: 0; padding: 0; }

/* ============================================
   Sections - Caddy-style vertical flow
   ============================================ */
.home section {
  padding: 5rem 2rem;
}

.home section:nth-child(even) {
  background: var(--bg-alt);
}

.home .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  text-align: center;
  padding: 6rem 2rem 5rem;
}

.hero .container {
  max-width: 700px;
}

.hero__logo {
  width: 350px !important;
  max-width: 350px !important;
  min-width: 350px;
  height: auto;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero__tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem 0;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 166, 80, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(0, 166, 80, 0.4);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Terminal */
.terminal {
  background: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.terminal__header {
  background: #161b22;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 6px;
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }

.terminal__body {
  padding: 1.25rem 1.5rem;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #c9d1d9;
}

.terminal__line {
  display: block;
}

.terminal__prompt {
  color: var(--accent-hover);
  user-select: none;
}

.terminal__comment {
  color: #6e7681;
}

/* ============================================
   Why Gunicorn - 3 pillars
   ============================================ */
.why h2 {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 3rem 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pillar h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem 0;
}

.pillar p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9375rem;
}

/* ============================================
   Frameworks
   ============================================ */
.frameworks h2 {
  text-align: center;
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
}

.frameworks__subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}

.frameworks__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.framework-tag {
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

[data-md-color-scheme="slate"] .framework-tag {
  background: var(--bg-alt);
}

.framework-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.framework-tag--new {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================
   Workers
   ============================================ */
.workers h2 {
  font-size: 1.75rem;
  margin: 0 0 2rem 0;
}

.workers__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.worker {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

[data-md-color-scheme="slate"] .worker {
  background: var(--bg-alt);
}

.worker:hover {
  border-color: var(--accent);
}

.worker h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.worker p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Quick Links
   ============================================ */
.quick-links {
  text-align: center;
}

.quick-links h2 {
  font-size: 1.75rem;
  margin: 0 0 2rem 0;
}

.quick-links__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: left;
}

.quick-link {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

[data-md-color-scheme="slate"] .quick-link {
  background: var(--bg-alt);
}

.quick-link:hover {
  border-color: var(--accent);
}

.quick-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

.quick-link span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   Sponsors
   ============================================ */
.sponsors {
  text-align: center;
}

.sponsors h2 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
}

.sponsors p {
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}

.sponsors__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  min-height: 60px;
}

.sponsors__logos img {
  max-height: 50px;
  max-width: 150px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.15s ease;
}

.sponsors__logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

[data-md-color-scheme="slate"] .sponsors__logos img {
  filter: grayscale(100%) brightness(1.5);
}

[data-md-color-scheme="slate"] .sponsors__logos img:hover {
  filter: grayscale(0%) brightness(1);
}

.sponsors__placeholder {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem 2rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
}

/* ============================================
   Footer CTA
   ============================================ */
.home-footer {
  text-align: center;
}

.home-footer h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
}

.home-footer p {
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}

.home-footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.home-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .home section {
    padding: 3.5rem 1.5rem;
  }

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

  .pillars {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .workers__grid {
    grid-template-columns: 1fr;
  }

  .quick-links__grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .hero__buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .quick-links__grid {
    grid-template-columns: 1fr;
  }
}
