/* Etsy Listing Kit — demo surface. Warm editorial "craft" system.
   Trustworthy marketplace-tool feel; NOT an Etsy clone. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --paper:    #f6f0e6;
  --paper-2:  #fdfbf6;
  --card:     #fffdf9;
  --ink:      #26221b;
  --ink-soft: #5f584c;
  --ink-mute: #8a8172;
  --forest:   #3f5a44;
  --forest-d: #2f4534;
  --terra:    #bb6640;
  --terra-d:  #9c5030;
  --line:     #e6dfce;
  --line-2:   #d8cfba;
  --ok:       #3f5a44;
  --code-bg:  #221f1a;
  --code-fg:  #ece4d3;
  --code-key: #c9a36a;
  --code-str: #a8c090;
  --code-num: #d99a72;
  --radius:   14px;
  --shadow:   0 1px 2px rgba(38,34,27,.05), 0 12px 40px -18px rgba(38,34,27,.28);
  --shadow-sm:0 1px 2px rgba(38,34,27,.06), 0 4px 14px -8px rgba(38,34,27,.22);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(63,90,68,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(187,102,64,.06), transparent 55%);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- typography ---------- */
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; color: var(--ink-soft); }
a  { color: var(--terra-d); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  font-family: 'Hanken Grotesk', sans-serif;
  text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
  font-weight: 700; color: var(--terra-d);
}
.serif-accent { font-style: italic; color: var(--forest); }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); background: rgba(253,251,246,.72); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 40; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .glyph { width: 30px; height: 30px; border-radius: 9px; background: var(--forest); color: #f6f0e6; display: grid; place-items: center; font-size: 15px; box-shadow: var(--shadow-sm); }
.topbar nav { display: flex; gap: 22px; font-size: .9rem; font-weight: 500; }
.topbar nav a { color: var(--ink-soft); }
.chip-mini { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(63,90,68,.1); color: var(--forest-d); border: 1px solid rgba(63,90,68,.18); }

/* ---------- hero ---------- */
.hero { padding: 58px 0 26px; }
.hero .lede { max-width: 640px; font-size: 1.12rem; color: var(--ink-soft); }
.hero h1 { margin-bottom: 16px; max-width: 16ch; }
.hero .tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* honesty banner */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-left: 4px solid var(--terra); border-radius: 10px;
  padding: 13px 16px; font-size: .88rem; color: var(--ink-soft);
  margin: 22px 0;
}
.notice b { color: var(--ink); font-weight: 600; }
.notice .i { flex: none; margin-top: 1px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: .92rem; font-weight: 600; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, box-shadow .2s, background .2s; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--forest); color: #f6f0e6; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--forest-d); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-mute); }
.btn-sm { padding: 8px 13px; font-size: .82rem; }

/* ---------- cards / sections ---------- */
.section { padding: 26px 0 40px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head .num { font-family: 'Fraunces', serif; font-style: italic; color: var(--terra); font-size: 1.5rem; }

.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
/* min-width:0 lets the code panel's long lines scroll instead of blowing out the column */
.grid-2 > * { min-width: 0; }
@media (max-width: 900px){ .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- listing preview ("marketplace card") ---------- */
.preview-label { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-mute); padding: 11px 16px; border-bottom: 1px dashed var(--line-2); background: var(--paper-2); }
.preview-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 3px rgba(187,102,64,.16); }

.listing { display: grid; grid-template-columns: 300px 1fr; gap: 0; }
@media (max-width: 640px){ .listing { grid-template-columns: 1fr; } }
.listing .gallery { border-right: 1px solid var(--line); background: var(--paper-2); padding: 16px; }
@media (max-width: 640px){ .listing .gallery { border-right: none; border-bottom: 1px solid var(--line); } }
.listing .hero-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line-2); cursor: pointer; opacity: .68; transition: opacity .15s, border-color .15s; background:#fff; }
.thumbs img:hover, .thumbs img.active { opacity: 1; border-color: var(--forest); }

.listing .body { padding: 20px 22px 22px; min-width: 0; }
.listing-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.32rem; line-height: 1.22; margin: 0 0 6px; color: var(--ink); }
.title-meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--ink-mute); margin-bottom: 14px; }
.title-meta .len-ok { color: var(--ok); font-weight: 600; }
.price { font-family: 'Fraunces', serif; font-size: 1.7rem; font-weight: 600; color: var(--forest-d); margin: 4px 0 16px; }
.price small { font-size: .9rem; color: var(--ink-mute); font-family: 'Hanken Grotesk',sans-serif; font-weight: 500; }

.label-sm { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ink-mute); margin: 18px 0 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: .78rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: rgba(63,90,68,.08); color: var(--forest-d); border: 1px solid rgba(63,90,68,.16); white-space: nowrap; }
.tag .c { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .68rem; margin-left: 5px; }

.desc { font-size: .92rem; color: var(--ink-soft); white-space: pre-wrap; margin-top: 6px; }

/* variation selectors */
.varrow { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 4px; }
.varfield { flex: 1; min-width: 150px; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; appearance: none; font-family: inherit; font-size: .92rem; padding: 10px 34px 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); cursor: pointer; }
.select-wrap::after { content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-mute); pointer-events: none; }
.combo-readout { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.combo-readout .sku { font-family: 'Hanken Grotesk', monospace; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.combo-readout .cp { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600; color: var(--forest-d); }

/* ---------- toggles / tabs ---------- */
.toggle { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.toggle button { font-family: inherit; font-size: .82rem; font-weight: 600; border: none; background: transparent; color: var(--ink-soft); padding: 6px 15px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.toggle button.active { background: var(--forest); color: #f6f0e6; }

/* ---------- code / payload panel ---------- */
.panel { background: var(--code-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid #34302a; box-shadow: var(--shadow); }
.panel-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #34302a; }
.panel-bar .ttl { color: var(--code-fg); font-size: .8rem; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.panel-bar .meth { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: rgba(168,192,144,.16); color: var(--code-str); letter-spacing: .05em; }
.panel pre { margin: 0; padding: 15px 16px; overflow: auto; max-height: 460px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .78rem; line-height: 1.55; color: var(--code-fg); }
.panel pre::-webkit-scrollbar { height: 9px; width: 9px; }
.panel pre::-webkit-scrollbar-thumb { background: #3f3a33; border-radius: 6px; }
.tok-key { color: var(--code-key); }
.tok-str { color: var(--code-str); }
.tok-num { color: var(--code-num); }
.tok-bool{ color: #d29fd0; }
.tok-punc{ color: #7d766a; }

/* ---------- matrix table ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
table.matrix { border-collapse: collapse; width: 100%; font-size: .84rem; }
table.matrix th, table.matrix td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.matrix thead th { position: sticky; top: 0; background: var(--paper-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); font-weight: 700; z-index: 1; }
table.matrix tbody tr:hover { background: rgba(63,90,68,.045); }
table.matrix td.sku { font-family: ui-monospace, monospace; font-weight: 600; color: var(--terra-d); }
table.matrix td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono-badge { display:inline-block; font-family: ui-monospace, monospace; font-size:.72rem; background: rgba(187,102,64,.1); color: var(--terra-d); border:1px solid rgba(187,102,64,.22); border-radius:6px; padding:2px 7px; }

/* ---------- stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 4px 0 8px; }
@media (max-width: 720px){ .stats { grid-template-columns: repeat(2,1fr); } }
.stat { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.stat .v { font-family: 'Fraunces', serif; font-size: 1.75rem; font-weight: 600; color: var(--forest-d); line-height: 1; }
.stat .k { font-size: .76rem; color: var(--ink-mute); margin-top: 6px; }

/* how-it-works steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 800px){ .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.step .n { font-family:'Fraunces',serif; font-style: italic; color: var(--terra); font-size: 1.2rem; }
.step h3 { margin: 6px 0 6px; }
.step p { font-size: .88rem; margin: 0; }

.card-pad { padding: 20px 22px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 44px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; }
footer .fine { font-size: .82rem; color: var(--ink-mute); max-width: 620px; }
footer .fine b { color: var(--ink-soft); }
footer .sig { font-family: 'Fraunces', serif; color: var(--ink-soft); font-size: .92rem; }

/* index cards */
.demo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px){ .demo-cards { grid-template-columns: 1fr; } }
.demo-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s, box-shadow .2s; }
.demo-card:hover { transform: translateY(-3px); box-shadow: 0 20px 50px -22px rgba(38,34,27,.4); text-decoration: none; }
.demo-card .cover { aspect-ratio: 16/9; background: var(--paper-2); border-bottom: 1px solid var(--line); display:grid; place-items:center; overflow:hidden; }
.demo-card .cover img { width: 100%; height:100%; object-fit: cover; }
.demo-card .meta { padding: 18px 20px 20px; }
.demo-card .meta h3 { font-size: 1.25rem; margin-bottom: 6px; }
.demo-card .meta p { font-size: .9rem; margin: 0 0 12px; }
.demo-card .go { color: var(--terra-d); font-weight: 600; font-size: .9rem; }

.hr { height:1px; background: var(--line); border:none; margin: 34px 0; }
.muted { color: var(--ink-mute); }
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity:1; transform:none; } }
.d1{animation-delay:.05s}.d2{animation-delay:.12s}.d3{animation-delay:.2s}.d4{animation-delay:.28s}
