/* =========================================================
   Morsar — Storefront
   Gumroad / comic style: flat brights, thick black borders,
   hard offset shadows, chunky type.
   ========================================================= */

:root {
  --ink: #1a1a1a;          /* near-black for borders & text */
  --paper: #fdf7e3;        /* warm cream background */
  --card: #ffffff;
  --pink: #ff90e8;         /* Gumroad pink */
  --yellow: #ffc900;
  --cyan: #23a094;
  --blue: #90a8ed;
  --purple: #c3a7f5;

  --border: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);

  --radius: 10px;
  --maxw: 1180px;
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--paper);
  /* subtle comic dot texture */
  background-image: radial-gradient(var(--ink) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  background-position: -13px -13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { /* fade the dots so they're subtle */
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--paper); opacity: 0.86; pointer-events: none;
}

img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--card); border: var(--border); border-radius: 8px;
  padding: 12px 22px; box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--pink); }
.btn-outline { background: var(--card); }
.btn-buy { background: var(--yellow); width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-family: var(--display); font-weight: 700;
  font-size: 0.82rem; padding: 6px 14px; border: var(--border);
  border-radius: 999px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.badge-pink { background: var(--pink); }
.badge-yellow { background: var(--yellow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
}
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--cyan); color: #fff; border: var(--border); border-radius: 8px;
  box-shadow: var(--shadow-sm); font-size: 1rem;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:not(.nav-cta):hover { text-decoration: underline; text-decoration-thickness: 3px; }
.nav-cta {
  font-family: var(--display); font-weight: 700; background: var(--yellow);
  border: var(--border); border-radius: 8px; padding: 8px 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s;
}
.nav-cta:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 3px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero / profile ---------- */
.hero { padding: 64px 0 0; }
.hero-inner { display: flex; gap: 36px; align-items: center; }
.avatar {
  flex-shrink: 0; width: 150px; height: 150px; display: grid; place-items: center;
  background: var(--purple); border: var(--border); border-radius: 20px;
  box-shadow: var(--shadow-lg); font-family: var(--display); font-weight: 800;
  font-size: 4.5rem; transform: rotate(-3deg);
}
.hero-text h1 {
  font-family: var(--display); font-weight: 800; line-height: 1.02;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem); letter-spacing: -0.02em; margin-bottom: 14px;
}
.hero-text p { font-size: 1.15rem; max-width: 620px; color: #333; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* marquee */
.marquee {
  margin-top: 56px; background: var(--ink); color: var(--paper);
  border-top: var(--border); border-bottom: var(--border); overflow: hidden; padding: 12px 0;
}
.marquee-track {
  display: inline-flex; gap: 48px; white-space: nowrap;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.04em;
  animation: scroll 22s linear infinite;
}
.marquee-track span { padding-right: 10px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-title {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 4vw, 2.6rem); display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.section-sub { font-size: 1.1rem; color: #444; margin-top: 8px; }
.store-head { margin-bottom: 40px; }
.count-chip {
  font-family: var(--display); font-size: 1rem; font-weight: 700;
  background: var(--cyan); color: #fff; border: var(--border); border-radius: 999px;
  padding: 4px 14px; box-shadow: var(--shadow-sm); white-space: nowrap;
}

/* ---------- Product grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.product-card {
  background: var(--card); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.product-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; display: block; border-bottom: var(--border); background: var(--blue); }
.card-thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; display: block; }
.card-thumb--empty {
  aspect-ratio: 3 / 4; display: grid; place-items: center; padding: 24px; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink);
}
.price-tag {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  background: var(--yellow); color: var(--ink);
  border: var(--border); border-radius: 8px; padding: 5px 12px; box-shadow: var(--shadow-sm);
  transform: rotate(3deg);
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.card-sub { color: #555; font-size: 0.95rem; flex: 1; }
.card-body .btn-buy { margin-top: 6px; }

/* ---------- States (loading / empty / error) ---------- */
.state {
  grid-column: 1 / -1; text-align: center; padding: 56px 24px;
  background: var(--card); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.state h3 { font-family: var(--display); font-size: 1.5rem; margin-bottom: 8px; }
.state p { color: #555; max-width: 460px; margin: 0 auto 18px; }
.state--error { background: #ffe1e1; }

/* skeleton */
.skel { box-shadow: var(--shadow); }
.skel-box { aspect-ratio: 3 / 4; border-bottom: var(--border); background: #ececec; }
.skel .card-body { gap: 12px; }
.skel-line { height: 16px; background: #ececec; border-radius: 4px; }
.skel-line.short { width: 55%; }
.skel-box, .skel-line { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- About ---------- */
.about-card {
  display: flex; gap: 32px; align-items: center;
  background: var(--pink); border: var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 40px;
}
.about-avatar {
  flex-shrink: 0; width: 120px; height: 120px; display: grid; place-items: center;
  background: var(--card); border: var(--border); border-radius: 16px; box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 800; font-size: 3.4rem; transform: rotate(3deg);
}
.about-text p { font-size: 1.1rem; max-width: 560px; margin-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--border); background: var(--ink); color: var(--paper); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.footer-brand .logo-mark { box-shadow: none; }
.footer-social { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-social a { color: var(--paper); font-weight: 600; }
.footer-fine { color: #bbb; font-size: 0.9rem; max-width: 540px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .hero-inner { gap: 26px; }
  .avatar { width: 110px; height: 110px; font-size: 3.2rem; }
}
@media (max-width: 640px) {
  .nav {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); border-bottom: var(--border); padding: 14px 22px;
    transform: translateY(-150%); transition: transform 0.25s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 0; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 44px; }
  .hero-inner { flex-direction: column; text-align: center; align-items: center; }
  .grid { grid-template-columns: 1fr; }
  .about-card { flex-direction: column; text-align: center; padding: 30px 22px; }
  .section { padding: 56px 0; }
}
