/* ShopFront — bone paper, cobalt ink, coral accents, chunky Syne headings. */
:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --ink: #17181c;
  --ink-2: #4b4d55;
  --muted: #777a82;
  --line: #e3ded2;
  --cobalt: #1d3bbf;
  --cobalt-2: #2d4fe0;
  --cobalt-soft: #e5e9fb;
  --coral: #ff6a45;
  --ok: #138a52;
  --err: #d23b25;
  --radius: 18px;
  --display: "Syne", "Segoe UI", sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: var(--cobalt); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -60px; background: var(--ink); color: #fff; padding: .55rem 1rem; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 1rem; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
kbd { font: 600 .72rem ui-monospace, Consolas, monospace; padding: .1rem .4rem; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); color: var(--ink-2); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.2rem; height: 70px; }
.logo { font: 800 1.5rem var(--display); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--cobalt); }
.header-search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.header-search input { width: 100%; padding: .7rem 2.6rem .7rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.header-search input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.search-kbd { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.header-search input:focus + .search-kbd { opacity: 0; }
.icon-btn { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.4rem; line-height: 1; transition: border-color .2s, transform .15s; }
.icon-btn:hover { border-color: var(--ink); }
.cart-btn.bump { animation: bump .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-6deg); } 100% { transform: scale(1); } }
.badge { position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font-size: .74rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

/* Hero */
.hero-banner { padding: 3.2rem 0 2.4rem; }
.hero-banner-inner { display: grid; grid-template-columns: 1.4fr .9fr; gap: 2rem; align-items: center; background: var(--cobalt); color: #fff; border-radius: 28px; padding: 3rem; position: relative; overflow: hidden; }
.hero-banner-inner::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.2px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.hero-copy { position: relative; }
.eyebrow { margin: 0 0 .7rem; font-weight: 500; color: #c8d2ff; letter-spacing: .02em; }
.demo-tag { margin-left: .4rem; padding: .1rem .5rem; border-radius: 6px; background: rgba(255,255,255,.14); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.hero-banner h1 { margin: 0; font: 800 clamp(2.2rem, 5vw, 3.8rem)/1.02 var(--display); letter-spacing: -.035em; }
.squiggle { position: relative; white-space: nowrap; color: #ffd9cf; }
.squiggle::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: .22em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 5 Q5 0 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%23ff6a45' stroke-width='3'/%3E%3C/svg%3E") repeat-x; background-size: 40px 100%; }
.hero-text { max-width: 46ch; margin: 1.2rem 0 1.5rem; color: #e1e6ff; font-size: 1.08rem; }
.hero-perks { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-perks span { padding: .45rem .85rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); font-size: .9rem; }
.hero-stack { position: relative; height: 260px; }
.stack-card { position: absolute; width: 170px; height: 210px; border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5); transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.s1 { right: 130px; top: 30px; background: #f6d9c4; transform: rotate(-10deg); }
.s2 { right: 60px; top: 10px; background: #d8ecdf; transform: rotate(4deg); }
.s3 { right: 0; top: 50px; background: var(--coral); transform: rotate(14deg); }
.hero-banner-inner:hover .s1 { transform: rotate(-16deg) translateX(-14px); }
.hero-banner-inner:hover .s3 { transform: rotate(20deg) translateX(10px); }

/* Shop layout */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding-bottom: 4rem; }
.filters { position: sticky; top: 92px; align-self: start; }
.filters-title { font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .7rem; }
.filters-title + * { margin-bottom: 1.6rem; }
.chip-group { display: flex; flex-direction: column; gap: .2rem; }
.chip { text-align: left; padding: .55rem .8rem; border-radius: 12px; border: 0; background: transparent; cursor: pointer; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s, padding .2s; }
.chip:hover { background: var(--surface); color: var(--ink); padding-left: 1rem; }
.chip.active { background: var(--ink); color: #fff; }
#sort-select { width: 100%; padding: .65rem .8rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); }
.result-count { color: var(--muted); font-size: .9rem; margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .25s cubic-bezier(.3,1.3,.5,1), box-shadow .25s; animation: rise .4s ease both; }
.product-card:nth-child(3n+2) { animation-delay: .05s; } .product-card:nth-child(3n+3) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(23,24,28,.45); }
.product-media { border: 0; padding: 0; background: none; cursor: zoom-in; width: 100%; }
.art { display: grid; place-items: center; background: var(--tint); aspect-ratio: 4 / 3; width: 100%; }
.art svg { width: 44%; height: auto; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.product-card:hover .art svg { transform: scale(1.08) rotate(-4deg); }
.art-sm { aspect-ratio: 1; border-radius: 12px; }
.art-sm svg { width: 64%; stroke-width: 3; }
.art-lg { aspect-ratio: 1; border-radius: 20px; }
.product-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.product-category { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.product-body h3 { margin: .2rem 0 .3rem; font: 700 1.12rem var(--display); letter-spacing: -.01em; }
.product-desc { margin: 0 0 1rem; color: var(--ink-2); font-size: .93rem; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.price { font-weight: 700; font-size: 1.12rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; padding: .8rem 1.4rem; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; transition: background .2s, transform .12s, color .2s, border-color .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--cobalt); }
.btn-primary.added { background: var(--ok); }
.btn-primary:disabled { background: #bdbcb7; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.empty-state { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.empty-state p { margin: 0; }

/* Cart drawer */
.cart-drawer { position: fixed; inset: 0; z-index: 60; }
.cart-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(15, 16, 22, .45); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.cart-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); display: flex; flex-direction: column; animation: slide .3s cubic-bezier(.2,.9,.3,1); box-shadow: -20px 0 50px -20px rgba(0,0,0,.4); }
@keyframes slide { from { transform: translateX(100%); } }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.cart-header h2 { margin: 0; font: 800 1.4rem var(--display); }
.cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.cart-empty svg { width: 80px; margin: 0 auto 1rem; fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linejoin: round; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); animation: rise .3s ease both; }
.cart-thumb { width: 64px; }
.cart-item h3 { margin: 0; font-size: .98rem; }
.cart-item p { margin: 0; color: var(--muted); font-size: .88rem; }
.qty-controls { display: inline-flex; align-items: center; gap: .2rem; margin-top: .4rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty-controls button { width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.qty-controls button:hover { background: var(--cobalt-soft); }
.qty-controls span { min-width: 1.5rem; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-item-actions { text-align: right; display: grid; gap: .3rem; justify-items: end; }
.remove-btn { border: 0; background: none; color: var(--muted); font-size: .82rem; cursor: pointer; text-decoration: underline; }
.remove-btn:hover { color: var(--err); }
.cart-footer { padding: 1.2rem 1.4rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface); }
.ship-nudge { margin-bottom: 1rem; }
.ship-text { margin: 0 0 .4rem; font-size: .9rem; font-weight: 500; }
.ship-track { height: 8px; border-radius: 999px; background: var(--cobalt-soft); overflow: hidden; }
.ship-fill { height: 100%; width: 0; background: var(--cobalt); border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: .9rem; font-size: 1.05rem; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; }
.modal-panel { position: relative; background: var(--surface); border-radius: 24px; width: min(760px, 100%); padding: 1.6rem; animation: pop .3s cubic-bezier(.3,1.4,.5,1); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.modal-close { position: absolute; top: 1rem; right: 1rem; z-index: 1; }
.modal-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: center; }
.modal-meta { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 700; color: var(--muted); }
.modal-layout h2 { font: 800 1.8rem/1.1 var(--display); margin: .3rem 0 .6rem; }
.modal-price { font-size: 1.5rem; font-weight: 700; margin: 1rem 0; }

/* Checkout */
.checkout-view, .success-view { padding: 2.4rem 0 4rem; }
.checkout-view h1 { font: 800 2.4rem var(--display); margin: .4rem 0 1.4rem; letter-spacing: -.03em; }
.link-back { border: 0; background: none; color: var(--cobalt); font-weight: 600; cursor: pointer; padding: 0; }
.link-back:hover { text-decoration: underline; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; }
.checkout-form fieldset { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.3rem .4rem; margin: 0 0 1.1rem; }
.checkout-form legend { font: 700 1.05rem var(--display); padding: 0 .4rem; }
.field { margin-bottom: .9rem; }
.field label { display: flex; justify-content: space-between; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field input { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); background: #fff; }
.field input.invalid { border-color: var(--err); }
.field-error { display: block; min-height: 1em; font-size: .82rem; color: var(--err); margin-top: .2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.hint { margin: 0 0 1rem; font-size: .9rem; color: var(--ink-2); background: var(--cobalt-soft); padding: .6rem .8rem; border-radius: 10px; }
.card-brand { font-weight: 700; color: var(--cobalt); }
.order-summary { position: sticky; top: 92px; background: var(--ink); color: #fff; border-radius: 22px; padding: 1.5rem; }
.order-summary h2 { margin: 0 0 1rem; font: 800 1.3rem var(--display); }
.summary-lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.18); font-size: .94rem; }
.summary-totals div { display: flex; justify-content: space-between; padding: .3rem 0; color: #cfd0d6; }
.summary-totals .total { color: #fff; font-size: 1.2rem; padding-top: .7rem; margin-top: .4rem; border-top: 1px solid rgba(255,255,255,.25); }

.success-card { max-width: 520px; margin: 2rem auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 2.6rem 2rem; animation: pop .4s cubic-bezier(.3,1.4,.5,1); }
.success-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 2rem; }
.success-card h1 { font: 800 2rem var(--display); margin: 0 0 .5rem; }
.order-id { font-family: ui-monospace, Consolas, monospace; background: var(--bg); display: inline-block; padding: .35rem .7rem; border-radius: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.2rem; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); visibility: hidden; z-index: 90; display: flex; align-items: center; gap: 1rem; background: var(--ink); color: #fff; padding: .7rem .7rem .7rem 1.1rem; border-radius: 14px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); transition: transform .3s cubic-bezier(.3,1.4,.5,1), visibility 0s .3s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.toast button { border: 0; background: var(--coral); color: #fff; font-weight: 700; padding: .45rem .85rem; border-radius: 10px; cursor: pointer; white-space: nowrap; }

@media (max-width: 900px) {
  .hero-banner-inner { grid-template-columns: 1fr; padding: 2rem; }
  .hero-stack { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .chip-group { flex-direction: row; flex-wrap: wrap; }
  .chip { border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
}
@media (max-width: 560px) {
  .header-inner { gap: .7rem; }
  .logo { font-size: 1.2rem; }
  .search-kbd { display: none; }
  .modal-layout, .field-row { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .product-desc { display: none; }
  .product-footer { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.stack-card { display: grid; place-items: center; }
.stack-card svg { width: 55%; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.s3 svg { stroke: #fff; }
