/* PixelScape — design system */
:root {
  --bg: #f6f1e7;
  --bg-soft: #ede5d2;
  --paper: #fbf7ee;
  --ink: #131a18;
  --ink-soft: #3b4845;
  --muted: #6e766f;
  --rule: #d8cdb6;
  --teal: #0e3a3a;
  --teal-2: #1a5959;
  --teal-soft: #cfe1da;
  --amber: #c8842c;
  --amber-2: #f0b85a;
  --rose: #a14b3a;
  --shadow-sm: 0 1px 2px rgba(20, 30, 28, 0.05), 0 2px 6px rgba(20,30,28,0.04);
  --shadow-md: 0 4px 14px rgba(20, 30, 28, 0.08), 0 12px 28px rgba(20,30,28,0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-2); text-decoration: none; }
a:hover { color: var(--amber); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,231,.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px; letter-spacing: -0.01em;
  font-weight: 700;
}
.brand-mark { display: inline-flex; align-items: center; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: 15px;
  padding: 6px 0; position: relative;
}
.site-nav a:hover { color: var(--teal); }
.site-nav a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--amber); border-radius: 2px;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--teal);
  color: #fdf6e3;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url('/images/hero.png') center/cover no-repeat;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(14,58,58,0) 0%, rgba(14,58,58,.55) 60%, rgba(14,26,24,.85) 100%),
    linear-gradient(180deg, rgba(14,26,24,.25), rgba(14,26,24,.55));
}
.hero-inner {
  display: grid; gap: 28px; align-items: center;
  padding: 92px 24px 96px;
  max-width: var(--container); margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber-2);
}
.hero-eyebrow::before {
  content: ''; width: 28px; height: 1px; background: var(--amber-2);
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 14px 0 16px;
  color: #fdf6e3;
}
.hero h1 em { font-style: italic; color: var(--amber-2); font-weight: 400; }
.hero p.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 56ch; color: rgba(253,246,227,.88);
  margin: 0 0 28px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--amber-2); color: #1a1208; }
.btn-primary:hover { background: #f7c876; color: #1a1208; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fdf6e3; border-color: rgba(253,246,227,.4); }
.btn-ghost:hover { background: rgba(253,246,227,.1); color: #fff; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stat strong {
  font-family: 'Fraunces', Georgia, serif; font-size: 28px; display: block;
  color: var(--amber-2); font-weight: 500;
}
.hero-stat span { font-size: 13px; color: rgba(253,246,227,.7); letter-spacing: .08em; text-transform: uppercase; }

/* Section */
section { padding: 72px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: clamp(28px, 3.8vw, 42px);
  letter-spacing: -0.015em; line-height: 1.1; margin: 0;
}
.section-eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--amber); font-weight: 600; margin-bottom: 10px;
}
.section-sub { color: var(--muted); margin: 8px 0 0; max-width: 56ch; }
.see-all { color: var(--teal); font-weight: 600; }

/* Grids */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid-tight { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  display: block; background: var(--paper);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ink); }
.card-img-wrap {
  aspect-ratio: 3/2; background: var(--bg-soft); overflow: hidden;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.card-sub { font-size: 12.5px; color: var(--muted); }

/* Category cards */
.cat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.cat-card {
  position: relative; display: block;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/5; color: #fdf6e3;
  border: 1px solid var(--rule);
  background: var(--teal);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: #fdf6e3; }
.cat-card-bg { position: absolute; inset: 0; }
.cat-card-bg img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,26,24,.0) 30%, rgba(14,26,24,.85) 100%);
}
.cat-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 22px; z-index: 1;
}
.cat-card h3 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: 26px; letter-spacing: -0.01em; margin: 0 0 4px;
}
.cat-card p { margin: 0; font-size: 14px; color: rgba(253,246,227,.82); }
.cat-card .count {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,0,0,.32); backdrop-filter: blur(6px);
  color: #fdf6e3; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}

/* Article / prose */
.prose { max-width: 70ch; margin: 0 auto; color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { color: var(--ink); font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }
.prose h1 { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; margin: 0 0 18px; }
.prose h2 { font-size: 28px; margin: 36px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--ink); }
.prose em { color: var(--teal); font-style: italic; }

/* Page header */
.page-head { padding: 56px 0 12px; border-bottom: 1px solid var(--rule); background: var(--bg-soft); }
.page-head h1 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.02em; line-height: 1.05; margin: 8px 0 10px;
}
.page-head .tagline { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 0 0 20px; }
.page-head .meta-line { color: var(--muted); font-size: 14px; margin-bottom: 18px; letter-spacing: .04em; }
.page-head .palette { display: inline-flex; gap: 8px; vertical-align: middle; margin-left: 10px; }
.page-head .swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--rule); display: inline-block; }

/* Breadcrumbs */
.breadcrumbs { padding: 18px 24px 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumbs ol li[aria-current] { color: var(--ink); font-weight: 500; }
.breadcrumbs .sep { color: var(--muted); opacity: .6; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--teal); }

/* Wallpaper detail */
.detail-grid {
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, 1fr);
}
.detail-hero {
  border-radius: var(--radius); overflow: hidden;
  background: var(--teal); box-shadow: var(--shadow-md);
  border: 1px solid var(--rule);
}
.detail-hero img { width: 100%; height: auto; max-height: 78vh; object-fit: cover; display: block; }
.detail-body { display: grid; grid-template-columns: minmax(0,1fr); gap: 32px; }
.detail-meta {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.detail-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.detail-meta dt { color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.detail-meta dd { margin: 0; color: var(--ink); font-weight: 500; }
.palette-row { display: inline-flex; gap: 6px; vertical-align: middle; }
.palette-row .swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--rule); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  display: inline-block; background: var(--bg-soft); color: var(--ink-soft);
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--rule); font-weight: 500;
}
.tag:hover { background: var(--teal); color: #fdf6e3; border-color: var(--teal); }
.download-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--teal); color: #fdf6e3; font-weight: 600; font-size: 13px;
  border: 1px solid var(--teal);
}
.dl-btn:hover { background: var(--teal-2); color: #fff; }
.dl-btn.secondary { background: transparent; color: var(--teal); }
.dl-btn.secondary:hover { background: var(--teal); color: #fdf6e3; }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 32px 0 8px; flex-wrap: wrap;
}
.pg {
  padding: 9px 16px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px;
  border: 1px solid var(--rule);
}
.pg:hover { background: var(--teal); color: #fdf6e3; }
.pg-info { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { background: #0e1a18; color: rgba(253,246,227,.78); padding: 56px 0 24px; margin-top: 80px; }
.site-footer .brand-name { color: #fdf6e3; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; }
.footer-col h4 { color: #fdf6e3; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: rgba(253,246,227,.78); }
.footer-col a:hover { color: var(--amber-2); }
.footer-col p { margin: 0; font-size: 14px; line-height: 1.65; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(253,246,227,.12); font-size: 13px; color: rgba(253,246,227,.55); }

/* Utility */
.muted { color: var(--muted); }
.center { text-align: center; }
.divider { height: 1px; background: var(--rule); margin: 32px 0; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Featured strip on home */
.featured-strip {
  background: var(--bg-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 18px 0; margin-top: -1px;
}
.featured-row { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; justify-content: center; color: var(--ink-soft); font-size: 14px; }
.featured-row strong { color: var(--ink); font-family: 'Fraunces', serif; font-weight: 500; }
.featured-row .dot { width: 4px; height: 4px; background: var(--rule); border-radius: 50%; }

/* Mobile */
@media (max-width: 820px) {
  .header-inner { padding: 12px 16px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
  .container { padding: 0 16px; }
  .hero-inner { padding: 64px 16px 70px; }
  .hero-stats { gap: 18px; }
  .hero-stat strong { font-size: 22px; }
  section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .grid-tight { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-card { aspect-ratio: 3/4; }
  .cat-card h3 { font-size: 20px; }
  .cat-card-body { padding: 14px 16px; }
  .detail-meta dl { grid-template-columns: 1fr; }
  .detail-meta dt { margin-top: 8px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; justify-content: space-between; gap: 8px; }
}
