:root {
  --bg: #121212;
  --panel: #1e1e1e;
  --panel-soft: #262626;
  --line: #33302c;
  --ink: #f2efe9;
  --muted: #b8b2a7;
  --sage: #5c6b58;
  --sage-dark: #46543f;
  --sage-light: #b7c9b2;
  --accent: #e89a67;
  --accent-dark: #d97f4a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--sage-light); }

/* Header + nav */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 18px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
}
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.3px;
}
.wordmark span { color: var(--accent); }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; flex: 1; }
.nav-filter {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 14.5px; padding: 4px 0;
}
.nav-filter:hover { color: var(--ink); }
.nav-filter.is-active { color: var(--accent); font-weight: 600; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.nav-link:hover { color: var(--ink); }

/* Hero */
.hero { padding: 48px 20px 36px; }
.hero-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px; line-height: 1.12; margin: 0 0 18px;
}
.hero-copy h1 em { color: var(--accent); font-style: italic; }
.hero-copy p { color: var(--muted); font-size: 18px; margin: 0 0 26px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-sage {
  background: var(--sage); color: #fff; text-decoration: none; font-weight: 600;
  padding: 13px 26px; border-radius: 999px; font-size: 16px;
}
.btn-sage:hover { background: var(--sage-dark); }
.btn-outline {
  border: 1.5px solid var(--muted); color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 12px 26px; border-radius: 999px; font-size: 16px;
}
.btn-outline:hover { border-color: var(--ink); }
.hero-collage {
  margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-radius: 16px; overflow: hidden; position: relative;
}
.hero-collage img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3 / 4; }
.hero-collage figcaption {
  grid-column: 1 / -1; background: rgba(0, 0, 0, 0.72); color: var(--ink);
  padding: 16px 20px; position: absolute; left: 0; right: 0; bottom: 0;
}
.hero-collage figcaption strong { display: block; font-size: 19px; }
.hero-collage figcaption span { color: var(--muted); font-size: 14px; }

/* Promise strip */
.promise-strip {
  list-style: none; margin: 0; padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 10px 36px; justify-content: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}

/* Product grid — compact cards */
.shop { max-width: 1240px; margin: 0 auto; padding: 28px 20px 40px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.card-price { margin: 0; font-size: 16px; font-weight: 700; color: var(--sage-light); }
.card-actions { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding-top: 8px; }
.view-btn {
  display: block; text-align: center; background: var(--sage); color: #fff;
  text-decoration: none; border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600;
}
.view-btn:hover, .view-btn:focus-visible { background: var(--sage-dark); }
.view-btn small { display: block; font-size: 12px; font-weight: 400; opacity: 0.85; }
.details-link {
  display: block; text-align: center; color: var(--sage-light); text-decoration: underline;
  background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 0;
}
.details-link small { display: block; font-size: 12px; color: var(--muted); text-decoration: none; }
.noscript-note { text-align: center; color: var(--muted); }

/* About + how it works */
.about, .how-it-works { max-width: 860px; margin: 0 auto; padding: 8px 20px 36px; }
.about h2, .how-it-works h2 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; margin: 0 0 12px; }
.about p { color: var(--muted); font-size: 17px; margin: 0 0 12px; }
.how-it-works ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 17px; }
.how-it-works li { margin-bottom: 14px; }
.how-it-works li strong { display: block; color: var(--ink); }
.how-it-works li span { display: block; }

/* Footer */
.site-footer { text-align: center; padding: 32px 16px 40px; border-top: 1px solid var(--line); }
.site-footer h2 { font-size: 18px; color: var(--ink); margin: 0 0 10px; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.social-links a { color: var(--sage-light); text-decoration: underline; font-size: 15px; }
.footer-note { color: var(--muted); font-size: 14px; max-width: 640px; margin: 22px auto 0; }
.footer-copy { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* Detail + preview modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-panel { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 860px; padding: 22px; position: relative; margin: auto 0; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.pd-title { margin: 0 28px 4px 0; font-size: 22px; line-height: 1.3; }
.pd-price { font-size: 19px; font-weight: 700; color: var(--sage-light); margin: 0 0 12px; }
.pd-main { width: 100%; max-width: 380px; max-height: 52vh; object-fit: contain; margin: 0 auto; border-radius: 10px; display: block; background: var(--panel-soft); }
.pd-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; justify-content: center; }
.pd-thumb { border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; background: none; }
.pd-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }
.pd-thumb.active { border-color: var(--accent); }
.pd-desc { white-space: pre-line; color: var(--ink); }
.pd-desc.is-collapsed { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.pd-desc-toggle { background: none; border: none; color: var(--sage-light); text-decoration: underline; cursor: pointer; font-size: 15px; padding: 4px 0; }
.pd-desc-toggle[hidden] { display: none; }
.how-files { background: var(--panel-soft); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }
.how-files h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.how-files ol { margin: 0; padding-left: 20px; color: var(--muted); }
.buy-btn { display: block; width: 100%; background: var(--sage); color: #fff; border: none; border-radius: 8px; padding: 12px 16px; font-size: 17px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; box-sizing: border-box; }
.buy-btn:hover, .buy-btn:focus-visible { background: var(--sage-dark); }

/* Tablet */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy h1 { font-size: 44px; }
}

/* Phone — compact cards, shorter scroll */
@media (max-width: 560px) {
  .topbar-inner { padding: 14px 12px; }
  .wordmark { font-size: 22px; }
  /* Phone header like the showcase: wordmark + Etsy button in one clean row,
     section filters as a single sideways-scrollable strip below, never a cramped column. */
  .main-nav {
    order: 3; flex: 1 1 100%; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    gap: 4px 14px; padding-bottom: 2px;
  }
  .nav-filter, .nav-link { white-space: nowrap; }
  .hero { padding: 32px 12px 24px; }
  .hero-copy h1 { font-size: 38px; }
  .hero-copy p { font-size: 16px; }
  .shop { padding: 20px 12px 28px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card-body { padding: 10px 12px 12px; }
  .card-title { font-size: 15px; }
  .card-price { font-size: 15.5px; }
  .view-btn { font-size: 14px; }
  .modal { padding: 12px 8px; }
  .modal-panel { padding: 16px; }
  .pd-title { font-size: 19px; }
  .about, .how-it-works { padding-left: 12px; padding-right: 12px; }
}

/* Portfolio */
.portfolio { max-width: 1240px; margin: 0 auto; padding: 8px 20px 36px; }
.portfolio h2 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; margin: 0 0 12px; }
.portfolio p { color: var(--muted); font-size: 17px; margin: 0 0 18px; max-width: 860px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.portfolio-tile { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.portfolio-tile img { width: 100%; aspect-ratio: auto; object-fit: cover; display: block; }
.portfolio-tile figcaption { padding: 10px 12px 12px; }
.portfolio-tile figcaption strong { display: block; font-size: 15px; }
.portfolio-tile figcaption span { color: var(--muted); font-size: 14px; }
.portfolio-note { margin-top: 18px; }
.portfolio h3 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; margin: 26px 0 8px; }
.portfolio-grid--merch { margin-top: 4px; }
.portfolio-grid--merch .portfolio-tile img { aspect-ratio: auto; }
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio { padding-left: 12px; padding-right: 12px; }
}
