/* pybuilds.com — shared site styles */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-page:    #f3f4f6;
  --bg-card:    #ffffff;
  --border:     #e0e0e0;
  --text:       #1a1a1a;
  --text-muted: #6b7280;
  --accent:     #1a1a1a;
  --accent-fg:  #ffffff;
  --shadow:     0 4px 24px rgba(0, 0, 0, 0.10);
  --radius:     14px;
  --link:       #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:    #111111;
    --bg-card:    #1e1e1e;
    --border:     #3a3a3a;
    --text:       #e8e8e8;
    --text-muted: #9ca3af;
    --accent:     #e8e8e8;
    --accent-fg:  #1a1a1a;
    --shadow:     0 4px 24px rgba(0, 0, 0, 0.45);
    --link:       #60a5fa;
  }
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 40px 36px;
}

.card.narrow {
  max-width: 500px;
  text-align: center;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}

p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px -40px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  transition: background 0.15s;
}

.product-item:hover {
  background: var(--bg-page);
  text-decoration: none;
}

.product-item .name {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.product-item .desc {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.footer-note {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

.updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

ul {
  color: var(--text-muted);
  margin: 0 0 12px 20px;
}

li {
  margin-bottom: 6px;
}

/* ── Landing page ── */

.landing {
  min-height: 100vh;
  padding: 88px 48px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.landing-header {
  flex-shrink: 0;
}

.landing-header h1 {
  font-size: 52px;
  letter-spacing: -1px;
}

.landing-header .subtitle {
  font-size: 20px;
  margin-bottom: 0;
}

.products-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.product-box {
  display: flex;
  flex-direction: column;
  width: clamp(200px, 17vw, 300px);
  min-height: clamp(330px, 36vh, 460px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 3vw, 40px) clamp(22px, 2.4vw, 32px);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-box:hover {
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .product-box:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  }
}

.product-box-empty {
  cursor: default;
  opacity: 0.7;
}

.product-box-empty:hover {
  transform: scale(1.06) translateY(-4px);
}

.product-box-icon {
  width: clamp(44px, 4vw, 60px);
  height: clamp(44px, 4vw, 60px);
  border-radius: 10px;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: clamp(20px, 2vw, 28px);
  flex-shrink: 0;
}

.product-box-icon svg {
  width: clamp(22px, 2vw, 28px);
  height: clamp(22px, 2vw, 28px);
}

.product-box-name {
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text);
  margin-bottom: 8px;
}

.product-box-desc {
  font-size: clamp(13px, 1.1vw, 15px);
  color: var(--text-muted);
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .landing {
    padding: 40px 20px;
  }

  .product-box {
    width: 100%;
  }
}
