/* colorprints.ai — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #7c3aed;
  --brand-light: #ede9fe;
  --text: #1a1a2e;
  --muted: #6b7280;
  --bg: #fff;
  --bg-soft: #faf9ff;
  --border: #e8eaef;
  --max: 1100px;
  --radius: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ──────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.nav-logo {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-back {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.nav-back:hover { color: var(--brand); text-decoration: none; }

/* ── Index ────────────────────────────────────────────────────────────── */

.index {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.index-header {
  margin-bottom: 52px;
  text-align: center;
}

.index-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.index-header p {
  font-size: 17px;
  color: var(--muted);
}

/* ── Holiday sections ─────────────────────────────────────────────────── */

.holiday-section {
  margin-bottom: 56px;
}

.holiday-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.holiday-section-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

/* ── Hub ──────────────────────────────────────────────────────────────── */

.hub {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.hub-header {
  margin-bottom: 40px;
}

.hub-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hub-header p {
  font-size: 16px;
  color: var(--muted);
}

/* ── Card grid ────────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.card-grid--preview {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  text-decoration: none;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f8f8f8;
}

.card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card-complexity {
  font-size: 12px;
  color: var(--muted);
}

.card--small .card-title {
  font-size: 13px;
  padding: 8px 10px;
}

/* ── Leaf page ────────────────────────────────────────────────────────── */

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.page-image-wrap {
  background: #f8f8f8;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.page-image {
  width: 100%;
  height: auto;
  display: block;
}

.page-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.btn-print, .btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: none;
  text-decoration: none;
}

.btn-print {
  background: var(--brand);
  color: #fff;
}

.btn-download {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-print:hover, .btn-download:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.page-info {
  margin-bottom: 32px;
}

.page-info h1 {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--brand-light);
  color: var(--brand);
}

.page-description {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 12px;
}

.print-tip {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Ad slot ──────────────────────────────────────────────────────────── */

.ad-slot {
  margin: 32px 0;
  min-height: 90px;
}

/* ── Related ──────────────────────────────────────────────────────────── */

.related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 20px;
}

.related ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.related ul a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}

.related ul img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.related ul span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.related ul a:hover span { color: var(--brand); }

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer a { color: var(--muted); font-weight: 600; }
.footer a:hover { color: var(--brand); text-decoration: none; }

/* ── Print styles ─────────────────────────────────────────────────────── */

@media print {
  nav, .page-actions, .page-info, .ad-slot, .related, .footer { display: none !important; }
  body { margin: 0; padding: 0; background: white; }
  .page { padding: 0; max-width: none; }
  .page-image-wrap { border: none; border-radius: 0; margin: 0; }
  .page-image { width: 100%; height: auto; page-break-inside: avoid; }
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .index, .hub { padding: 32px 16px 72px; }
  .page { padding: 24px 16px 72px; }
  .page-actions { flex-direction: column; }
  .btn-print, .btn-download { justify-content: center; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
