/* Shared styles for popkiln.com brand pages (home, trade pages). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-800-latin.woff2") format("woff2");
}
:root {
  --bg: #FFF7ED;      /* cream */
  --panel: #FFFFFF;
  --ink: #1C1917;
  --quiet: #57534E;
  --link: #C2410C;    /* ember deep: passes contrast on cream */
  --ember: #F2542D;
  --rule: #E7C3A0;    /* clay */
  --soft: #FBEBDD;
  --on-link: #FFF7ED;
  --shadow: 0 18px 40px rgba(28, 25, 23, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1917;
    --panel: #292524;
    --ink: #FFF7ED;
    --quiet: #D6D3D1;
    --link: #F2542D;  /* ember on ink: 5.1 */
    --rule: #44403C;
    --soft: #2E2724;
    --on-link: #1C1917;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h1 em, h2 em { font-style: normal; color: var(--ember); }
p { margin: 0 0 16px; color: var(--quiet); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); margin-bottom: 14px; }

/* header */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.logo { width: 140px; height: auto; display: block; }
nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--link); }
nav .nav-cta { border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; }
nav .nav-cta:hover { border-color: var(--link); }

/* buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--link); line-height: 1.2; }
.btn.primary { background: var(--link); color: var(--on-link); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--link); }
.btn.ghost:hover { background: var(--soft); }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 40px 0 80px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; margin-bottom: 22px; }
.hero .lead { font-size: 1.15rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.9rem; color: var(--quiet); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); flex: none; }

.stage { position: relative; aspect-ratio: 5 / 4; }
.stage .shot { position: absolute; right: 0; top: 4%; width: 88%; height: auto; border-radius: 16px; border: 1px solid var(--rule); box-shadow: var(--shadow); transform: rotate(2deg); }
.stage .result {
  position: absolute; left: 0; bottom: 0; width: 56%; background: var(--panel); border: 1px solid var(--rule);
  border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); transform: rotate(-2deg);
}
.result .lbl { display: block; font-size: 0.78rem; color: var(--quiet); }
.result .num { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; margin-bottom: 8px; }
.result .num.price { color: var(--link); margin-bottom: 0; }
.result .cap { display: block; margin-top: 10px; font-size: 0.75rem; color: var(--quiet); }

/* sections */
section { padding: 64px 0; border-top: 1px solid var(--rule); scroll-margin-top: 12px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.1; }
.section-head p { margin: 0; max-width: 30rem; }

/* catalog */
.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.item { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s; }
.item:hover { transform: translateY(-3px); border-color: var(--ember); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .item, .item:hover { transition: none; transform: none; } }
.item img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-bottom: 1px solid var(--rule); }
.item .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; background: var(--soft); color: var(--link); }
.chip.plain { background: none; border: 1px solid var(--rule); color: var(--quiet); }
.item h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 8px; }
.item p { font-size: 0.95rem; margin-bottom: 18px; }
.item .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.item .foot .price { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 1.3rem; }
.item .foot .go { color: var(--link); }
.item.next { border-style: dashed; background: none; justify-content: center; padding: 28px; }
.item.next:hover { transform: none; box-shadow: none; }
.item.next h3 { margin-bottom: 10px; }
.item.next p { margin: 0; }

/* featured */
.featured { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 56px; align-items: center; }
.featured h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.08; margin-bottom: 16px; }
.featured .lead { font-size: 1.08rem; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--link);
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; color: var(--ink); }
.steps span { color: var(--quiet); font-size: 0.95rem; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.buy .amount { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 2rem; }
.small { font-size: 0.85rem; color: var(--quiet); margin: 12px 0 0; }
.featured img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--rule); box-shadow: var(--shadow); display: block; }

/* principles */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ways h3 { font-size: 1.2rem; margin-bottom: 8px; }
.ways p { margin: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ember); margin-bottom: 14px; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.1; }
.follow { background: var(--soft); border-radius: 16px; padding: 24px; }
.follow h3 { font-size: 1.15rem; margin-bottom: 6px; }
.follow p { margin-bottom: 14px; }

/* footer */
footer { border-top: 1px solid var(--rule); padding: 40px 0 48px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 28px; font-size: 0.92rem; }
footer .tagline { margin: 12px 0 0; }
footer h4 { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: var(--link); text-decoration: underline; }
.legal { grid-column: 1 / -1; font-size: 0.82rem; color: var(--quiet); padding-top: 16px; border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .hero, .featured, .about { grid-template-columns: 1fr; }
  .hero { gap: 40px; padding-bottom: 56px; }
  .stage { max-width: 520px; }
  .catalog { grid-template-columns: 1fr 1fr; }
  .featured img { max-width: 360px; }
}
@media (max-width: 640px) {
  .catalog, .ways { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
  footer .brand { grid-column: 1 / -1; }
  nav { gap: 12px; font-size: 0.85rem; }
  nav .hide-sm { display: none; }
  .logo { width: 110px; }
  section { padding: 48px 0; }
  .hero { padding-top: 16px; }
}

/* nav: current page */
nav a[aria-current="page"] { color: var(--link); }

/* what we make: product types */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.type { background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; }
.type.soon { background: none; border-style: dashed; }
.type h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.type p { font-size: 0.95rem; margin-bottom: 16px; }
.type .count { margin-top: auto; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.type .count a { text-decoration: none; }

/* shop by trade */
.trades { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.trade { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.trade:hover { border-color: var(--ember); box-shadow: var(--shadow); }
.trade img { width: 100%; height: 100%; object-fit: cover; display: block; border-right: 1px solid var(--rule); }
.trade .body { padding: 24px; display: flex; flex-direction: column; }
.trade h3 { font-size: 1.6rem; margin-bottom: 8px; }
.trade ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 4px; color: var(--quiet); font-size: 0.95rem; }
.trade .go { margin-top: auto; font-weight: 600; color: var(--link); }
.trade.soon { display: flex; flex-direction: column; justify-content: center; padding: 28px; background: none; border-style: dashed; }
.trade.soon:hover { box-shadow: none; border-color: var(--rule); }
.trade.soon h3 { font-size: 1.3rem; }
.trade.soon p { margin: 0; }

/* email updates */
.updates { background: var(--soft); border-radius: 20px; padding: 32px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.updates h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; margin-bottom: 8px; }
.updates p { margin: 0; }
.updates .actions { margin: 0; justify-content: flex-end; }
.updates .small { margin-top: 8px; }

/* trade page */
.crumbs { font-size: 0.9rem; color: var(--quiet); margin: 8px 0 18px; }
.crumbs a { color: var(--quiet); }
.hub-hero { padding: 24px 0 48px; max-width: 46rem; }
.hub-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.04; margin-bottom: 18px; }
.hub-hero .lead { font-size: 1.12rem; }
.group-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.group-nav a { border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.group-nav a:hover { border-color: var(--link); color: var(--link); }

@media (max-width: 900px) {
  .types { grid-template-columns: 1fr 1fr; }
  .trades { grid-template-columns: 1fr; }
  .updates { grid-template-columns: 1fr; }
  .updates .actions { justify-content: flex-start; }
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .types { grid-template-columns: 1fr; }
  .trade { grid-template-columns: 1fr; }
  .trade img { border-right: 0; border-bottom: 1px solid var(--rule); aspect-ratio: 4 / 3; height: auto; }
}

/* wide card for paid templates on trade pages */
.catalog .item.wide { grid-column: 1 / -1; flex-direction: row; }
.catalog .item.wide img { width: 46%; aspect-ratio: 4 / 3; border-bottom: 0; border-right: 1px solid var(--rule); }
.catalog .item.wide .body { padding: 28px 32px; justify-content: center; }
.catalog .item.wide h3 { font-size: 1.7rem; }
.catalog .item.wide p { font-size: 1.02rem; max-width: 30rem; }
@media (max-width: 640px) {
  .catalog .item.wide { flex-direction: column; }
  .catalog .item.wide img { width: 100%; border-right: 0; border-bottom: 1px solid var(--rule); }
}
