:root {
  --paper: #f6f7fb; --card: #ffffff; --ink: #0e1330; --muted: #5a6180; --line: #dde1ee;
  --blue: #2438d6; --blue-ink: #ffffff; --sun: #ffc933; --good: #0e7c4a; --bad: #b3261e; --low: #b45309;
  --shadow: 0 1px 2px rgba(14,19,48,.06), 0 8px 24px -12px rgba(14,19,48,.18);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --art-mix: white;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0b0f26; --card: #131938; --ink: #eef0fb; --muted: #9aa2c8; --line: #262e58;
          --blue: #7f8dff; --blue-ink: #0b0f26; --good: #4fd29a; --bad: #ff8f86; --low: #f0b04a; --art-mix: #131938;
          --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .logo, .btn, .price b, .tile-name { font-family: var(--display); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; letter-spacing: -.015em; font-weight: 700; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .25rem; }
a { color: var(--blue); }
p { margin: 0 0 .8rem; }
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 42rem; }
.block { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 50; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.4rem; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 1.9rem; height: 1.9rem; border-radius: 8px; background: var(--blue); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 22% 24% 26%; border: solid var(--sun); border-width: 0 0 4px 4px; transform: rotate(-45deg) skew(8deg, 8deg) translate(2px, -4px); border-radius: 0 0 2px 2px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.search { flex: 1 1 18rem; display: flex; gap: .4rem; }
.search input { flex: 1; min-width: 0; }
nav { display: flex; gap: 1.1rem; align-items: center; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--blue); }
.count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; text-align: center; background: var(--sun); color: #0e1330; border-radius: 999px; font-weight: 700; font-size: .8rem; }

/* controls */
input, select, textarea, button { font: inherit; }
input, select, textarea { color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .7rem; width: 100%; }
select { width: auto; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
.search button, .btn, button.btn { cursor: pointer; border: 0; border-radius: 8px; padding: .6rem 1.1rem; background: var(--blue); color: var(--blue-ink); font-weight: 700; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover, .search button:hover { filter: brightness(1.08); }
.btn.big { padding: .8rem 1.4rem; font-size: 1.02rem; }
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.block-btn { display: block; margin-top: 1rem; }
.linkbtn { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; padding: 0; }

/* hero: the hanging price tag is the one memorable thing */
.hero { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 10%, var(--paper)), var(--paper)); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; padding-top: 3rem; padding-bottom: 2rem; }
.hero-copy { max-width: 34rem; }
.lede { font-size: 1.15rem; color: var(--muted); }
.hero-tag { position: relative; height: 22rem; display: flex; justify-content: center; }
.string { position: absolute; top: -3rem; width: 2px; height: 5rem; background: var(--ink); opacity: .5; }
.hang { position: absolute; top: 1.6rem; width: 13rem; padding: 2.4rem 1.2rem 1.4rem; background: var(--sun); color: #0e1330; border-radius: 6px 6px 18px 18px;
  clip-path: polygon(14% 0, 86% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); transform-origin: 50% -5rem; box-shadow: var(--shadow); animation: swing 2.4s ease-out 1; }
.hole { position: absolute; top: .9rem; left: calc(50% - .5rem); width: 1rem; height: 1rem; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(14,19,48,.35); }
.hang-mark { width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--blue); margin-bottom: .8rem; }
.hang-big { font: 800 2.8rem/1 var(--display); letter-spacing: -.04em; margin: .2rem 0 .4rem; }
.hang-line { font-weight: 500; }
@keyframes swing { 0% { transform: rotate(14deg); } 30% { transform: rotate(-9deg); } 55% { transform: rotate(5deg); } 78% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .hang { animation: none; } html { scroll-behavior: auto; } }

/* categories and grid */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem; }
.cats a { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-family: var(--display); }
.cats a:hover { border-color: var(--hue); }
.cats .icon { width: 1.8rem; height: 1.8rem; color: var(--hue); flex: none; }
.icon svg { width: 100%; height: 100%; display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.2rem; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.tile:hover { box-shadow: var(--shadow); border-color: var(--hue); }
.tag-art { display: grid; place-items: center; height: 11rem; position: relative; color: var(--hue);
  background: color-mix(in srgb, var(--hue) 14%, var(--art-mix)); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.tag-art::before { content: ""; position: absolute; top: .7rem; left: .7rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hue) 45%, transparent); }
.tag-art .icon { width: 4.6rem; height: 4.6rem; }
.tag-art.large { height: 100%; min-height: 20rem; border-radius: 16px; }
.tag-art.large .icon { width: 9rem; height: 9rem; }
.tile-body { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem 1.1rem; }
.tile-name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.tile-cat { font-size: .85rem; }
.rating { font-size: .9rem; } .star { color: #e5a400; }
.price { margin: .25rem 0 0; } .price b { font-size: 1.2rem; } .price s { font-size: .9rem; } .off { color: var(--good); font-weight: 700; font-size: .9rem; }

/* shop */
.page-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { padding: .35rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--card); font-weight: 500; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sort { display: flex; align-items: center; gap: .5rem; }

/* product */
.crumbs { margin-bottom: 1rem; font-size: .9rem; color: var(--muted); } .crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.detail-art { --hue: var(--blue); }
.specs { padding-left: 1.2rem; margin: 0 0 1rem; } .specs li { margin: .15rem 0; }
.low { color: var(--low); font-weight: 700; } .ok { color: var(--good); font-weight: 700; }
.buy { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1rem 0 .6rem; }
.buy label { font-weight: 500; }

/* cart and checkout */
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 5rem 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.thumb { display: grid; place-items: center; height: 5rem; border-radius: 10px; color: var(--hue); background: color-mix(in srgb, var(--hue) 14%, var(--art-mix)); }
.thumb .icon { width: 2.6rem; height: 2.6rem; }
.line-info { display: flex; flex-direction: column; gap: .2rem; }
.line-name { font-family: var(--display); font-weight: 700; color: var(--ink); text-decoration: none; }
.line-ctl { display: flex; gap: 1rem; align-items: center; margin-top: .3rem; }
.line-total { font-family: var(--display); font-size: 1.1rem; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.summary.plain { margin-bottom: 1rem; }
.row { display: flex; justify-content: space-between; padding: .3rem 0; }
.row.good { color: var(--good); font-weight: 500; }
.row.total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .7rem; font: 800 1.25rem var(--display); }
.nudge { background: color-mix(in srgb, var(--sun) 30%, transparent); padding: .5rem .7rem; border-radius: 8px; }
.coupon { margin-top: 1rem; } .coupon label { display: block; font-weight: 500; margin-bottom: .3rem; }
.inline { display: flex; gap: .5rem; }
.bad { color: var(--bad); } .coupon-msg { margin-top: .4rem; }
.mini { list-style: none; padding: 0; margin: 0 0 .6rem; }
.mini li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .95rem; }
.checkout fieldset { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 1rem 1.2rem 1.2rem; margin: 0 0 1.2rem; }
.checkout legend { font: 700 1.1rem var(--display); padding: 0 .4rem; }
.field { margin-bottom: .9rem; } .field label { display: block; font-weight: 500; margin-bottom: .25rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.err { color: var(--bad); font-size: .875rem; margin: .25rem 0 0; min-height: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.radio { display: flex; gap: .6rem; align-items: center; padding: .55rem .2rem; font-weight: 500; }
.radio input { width: auto; accent-color: var(--blue); }

/* order and empty states */
.thanks { background: color-mix(in srgb, var(--good) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--good) 40%, var(--line)); border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.thanks h1 { font-size: 2rem; }
.pre { white-space: pre-line; }
.empty { text-align: left; max-width: 28rem; padding: 2rem 0; }
.orders { list-style: none; padding: 0; margin: 0; }
.orders li { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 1rem; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; align-items: center; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1.6rem; }
.foot { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: 10px; box-shadow: var(--shadow); transition: transform .25s; z-index: 30; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 52rem) {
  .hero-grid, .detail, .two { grid-template-columns: 1fr; }
  .hero-tag { height: 15rem; order: -1; } .hang { top: .5rem; width: 10.5rem; padding-top: 2rem; transform-origin: 50% -2rem; } .string { top: -2rem; height: 3rem; }
  .hang-big { font-size: 2.2rem; } .tag-art.large { min-height: 14rem; }
  .orders li { grid-template-columns: 1fr 1fr; } .cols { grid-template-columns: 1fr; }
  .line { grid-template-columns: 4rem 1fr; } .line-total { grid-column: 2; }
}
