/*
VOICE: a modern gift shop that tells jokes on the shelf tags
IDEA: the old rainbow stripe and price-tag yellow, kept as the brand; everything else quiet
PICTURE: product photos on cool grey tiles, big and edge to edge
COLOUR/TYPE: white + ink + cool tile grey + price-tag yellow; each category owns one rainbow colour
TYPE: Bricolage Grotesque (display, tight and loud) + Instrument Sans (text)
*/
@font-face { font-family: "Bricolage"; src: url(/fonts/bricolage-grotesque-latin-standard-normal.woff2) format("woff2-variations"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/instrument-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #16181D;
  --ink-2: #2A2D35;
  --muted: #5E636E;
  --line: #E4E6EA;
  --tile: #EFF1F4;
  --page: #FFFFFF;
  --tag: #FFD23F;
  --tag-hot: #FFC21A;
  --r1: #E53935; --r2: #FB8C00; --r3: #F4C20D; --r4: #2E9E4F; --r5: #1E88E5; --r6: #3949AB; --r7: #8E24AA;
  --display: "Bricolage", "Arial Black", system-ui, sans-serif;
  --text: "Instrument", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
#all, :target { scroll-margin-top: 140px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; font-family: var(--text); font-size: 1.0625rem; line-height: 1.55; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--r5); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tag); padding: 0.5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* category colours */
.c-cool-gifts { --c: var(--r5); } .c-useful-gifts { --c: var(--r4); } .c-gifts-for-men { --c: var(--r6); }
.c-tech-gifts { --c: var(--r7); } .c-wtf-gifts { --c: var(--r1); } .c-shirts { --c: var(--r2); } .c-blog { --c: var(--r3); }
.c-gifts { --c: #D7263D; }

/* ---------- header ---------- */
.rainbow { display: grid; grid-template-columns: repeat(7, 1fr); height: 4px; }
.rainbow i:nth-child(1) { background: var(--r1); } .rainbow i:nth-child(2) { background: var(--r2); }
.rainbow i:nth-child(3) { background: var(--r3); } .rainbow i:nth-child(4) { background: var(--r4); }
.rainbow i:nth-child(5) { background: var(--r5); } .rainbow i:nth-child(6) { background: var(--r6); }
.rainbow i:nth-child(7) { background: var(--r7); }
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.mast-row { display: flex; align-items: center; gap: 1rem 1.5rem; padding: 0.8rem 0; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; text-decoration: none; line-height: 1; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; flex: none; }
.search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.search input { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--tile); border-radius: 999px; padding: 0 1rem 0 2.6rem; font-size: 1rem; }
.search input:focus { background: #fff; border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(30,136,229,.25); }
.search svg { position: absolute; left: 0.95rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.toplinks { display: flex; gap: 1.25rem; font-weight: 600; font-size: 0.98rem; }
.toplinks a { text-decoration: none; color: var(--ink-2); }
.toplinks a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.catbar { border-top: 1px solid var(--line); }
.catnav { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; padding: 0.55rem 0; }
.catnav::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; flex: none; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.42rem 0.9rem; border-radius: 999px; color: var(--ink-2); background: transparent; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink)); }
.pill:hover { background: var(--tile); }
.pill[aria-current="page"], .pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pill.all::before { display: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 6.4vw, 5.3rem); line-height: 0.95; letter-spacing: -0.035em; text-wrap: balance; }
.hero .sub { margin: 1.1rem 0 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.hero-search { margin-top: 1.75rem; display: flex; gap: 0.5rem; max-width: 520px; }
.hero-search .search { max-width: none; margin: 0; }
.hero-search input { height: 54px; font-size: 1.05rem; background: #fff; border: 1.5px solid var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 44px; padding: 0.6rem 1.15rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; line-height: 1.2; }
.btn-ink { background: var(--ink); color: #fff; height: 54px; padding: 0 1.5rem; }
.btn-ink:hover { background: #000; }
.stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.98rem; }
.stats b { color: var(--ink); font-weight: 700; }

/* featured stack */
.stack { position: relative; aspect-ratio: 1 / 0.92; }
.stack a { position: absolute; width: 54%; background: #fff; border-radius: 18px; padding: 0.55rem; box-shadow: 0 1px 2px rgba(22,24,29,.06), 0 12px 32px -8px rgba(22,24,29,.22); text-decoration: none; transition: transform .25s ease; }
.stack a img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 12px; }
.stack a span { display: block; padding: 0.55rem 0.35rem 0.2rem; font-weight: 600; font-size: 0.92rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack a:nth-child(1) { left: 0; top: 8%; rotate: -5deg; z-index: 1; }
.stack a:nth-child(2) { right: 0; top: 0; rotate: 4deg; z-index: 2; }
.stack a:nth-child(3) { left: 21%; bottom: 0; rotate: -1deg; z-index: 3; }
.stack a:hover { transform: translateY(-6px); z-index: 4; }
.tagsticker { position: absolute; z-index: 5; right: 4%; bottom: 10%; width: clamp(92px, 11vw, 128px); rotate: 12deg; filter: drop-shadow(0 6px 10px rgba(22,24,29,.25)); }

/* ---------- sections ---------- */
.section { padding: clamp(2rem, 4vw, 3.25rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.035em; line-height: 1; }
.sec-head p { margin: 0.4rem 0 0; color: var(--muted); }
.textlink { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--tag); }
.textlink:hover { text-decoration-color: var(--ink); }
.rail-ctl { display: flex; gap: 0.4rem; }
.rail-ctl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.rail-ctl button:hover { border-color: var(--ink); }
.rail-ctl svg { width: 18px; height: 18px; }

/* rail */
.rail { list-style: none; margin: 0; padding: 0.25rem 0 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23%, 290px); gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > li { scroll-snap-align: start; }
.rank { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 2; min-width: 32px; height: 32px; padding: 0 0.5rem; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 800; font-size: 0.95rem; display: grid; place-items: center; }

/* category tiles */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.cat-tile { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--tile); border-radius: var(--radius); padding: 1rem; overflow: hidden; transition: background .2s; }
.cat-tile:hover { background: #E5E8EC; }
.cat-tile .pics { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.5rem; aspect-ratio: 16 / 9; }
.cat-tile .pics img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.cat-tile .pics img:first-child { grid-row: span 2; }
.cat-tile .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.9rem; }
.cat-tile h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; display: flex; align-items: center; gap: 0.5rem; }
.cat-tile h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.cat-tile .n { color: var(--muted); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.cat-tile p { margin: 0.25rem 0 0; color: var(--ink-2); font-size: 0.98rem; }

/* ---------- product cards ---------- */
.toolbar { display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filters .pill { border-color: var(--line); }
.sort { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.sort label { color: var(--muted); font-weight: 500; }
.sort select { height: 44px; padding: 0 2.2rem 0 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2316181D' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.9rem center; appearance: none; font-weight: 600; cursor: pointer; }
.count { color: var(--muted); width: 100%; margin: -0.5rem 0 1rem; font-size: 0.95rem; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2.25rem 1.5rem; }
.card { position: relative; display: flex; flex-direction: column; }
.card .ph { position: relative; display: block; background: var(--tile); border-radius: var(--radius); overflow: hidden; }
.card .ph img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; transition: transform .35s ease; }
.card:hover .ph img { transform: scale(1.04); }
.card .body { padding: 0.85rem 0.15rem 0; display: flex; flex-direction: column; flex: 1; }
.card .cat { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 0.3rem; }
.card .cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.card h3 { margin: 0 0 0.35rem; font-family: var(--display); font-size: 1.2rem; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card:hover h3 a { text-decoration: underline; text-underline-offset: 3px; }
.card p { margin: 0 0 0.9rem; font-size: 0.96rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .buy { position: relative; z-index: 2; margin-top: auto; align-self: flex-start; }
.buy { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--tag); color: var(--ink); font-weight: 700; text-decoration: none; padding: 0.6rem 1.05rem; border-radius: 999px; min-height: 44px; font-size: 0.95rem; white-space: nowrap; transition: background .15s, transform .15s; }
.buy svg { width: 16px; height: 16px; flex: none; }
.buy:hover { background: var(--tag-hot); transform: translateY(-1px); }
.empty { padding: 3rem 0; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--ink); letter-spacing: -0.03em; margin-bottom: 0.3rem; }
.more { display: flex; justify-content: center; margin-top: 2.5rem; }
.more.auto { margin-top: 1.5rem; min-height: 1px; }
.more.auto .btn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.more.auto .btn:focus { position: static; width: auto; height: 50px; clip: auto; }
.btn-line { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); padding: 0 1.6rem; height: 50px; }
.btn-line:hover { background: var(--ink); color: #fff; }

/* ---------- category page head ---------- */
.pagehead { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.25rem, 3vw, 2rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: 0.92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: #A5AAB3; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--ink); }
.pagehead h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5.5vw, 4.2rem); letter-spacing: -0.035em; line-height: 0.95; display: flex; align-items: center; gap: 0.9rem; }
.pagehead h1 .dot { width: 0.36em; height: 0.36em; border-radius: 50%; background: var(--c); flex: none; }
.pagehead p { margin: 0.8rem 0 0; font-size: 1.2rem; color: var(--muted); max-width: 55ch; }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4.5rem); align-items: start; padding: 1.5rem 0 clamp(2.5rem, 5vw, 4rem); }
.product-img { background: var(--tile); border-radius: 22px; padding: clamp(1rem, 3vw, 2.25rem); position: sticky; top: 140px; }
.product-img img { width: 100%; aspect-ratio: 6 / 5; object-fit: contain; border-radius: 12px; mix-blend-mode: multiply; }
.product-text { padding-top: 0.5rem; }
.product h1 { margin: 0.25rem 0 1rem; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; margin: 0 0 1.75rem; max-width: 52ch; color: var(--ink-2); }
.buybox { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 0.8rem; max-width: 460px; }
.buybox .buy { justify-content: center; font-size: 1.1rem; min-height: 56px; }
.buybox small { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.product .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.5rem; }
.product .chips .pill { border-color: var(--line); }

/* ---------- posts and pages ---------- */
.post { max-width: 740px; padding: 0 0 4rem; }
.post-date { color: var(--muted); margin: 0 0 0.25rem; }
.post-body { font-size: 1.12rem; line-height: 1.7; }
.post-body h2 { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -0.03em; margin: 2.25rem 0 0.5rem; line-height: 1.15; }
.post-body img { margin: 1.75rem auto; border-radius: 14px; }
.post-body a { color: #1556B0; text-underline-offset: 3px; }
.post-list { list-style: none; padding: 0 0 4rem; margin: 0; max-width: 760px; }
.post-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.post-list a { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.025em; text-decoration: none; line-height: 1.15; }
.post-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-list span { display: block; color: var(--muted); margin-top: 0.3rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B9BDC5; margin-top: 3rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding: 3rem 0 2rem; font-size: 0.96rem; }
.foot-logo { color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; margin: 0 0 0.5rem; }
.foot-grid h2 { color: #fff; font-size: 1rem; margin: 0 0 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #E6E8EC; text-decoration: none; }
.site-footer a:hover { color: var(--tag); text-decoration: underline; }
.disclosure { margin: 0; padding: 1.5rem 0 2.5rem; border-top: 1px solid #2E323B; font-size: 0.88rem; line-height: 1.65; color: #9DA2AC; max-width: 110ch; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stack { max-width: 520px; width: 100%; margin-inline: auto; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toplinks { display: none; }
}
@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; }
  .product-img { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .rail { grid-auto-columns: 68%; }
  .rail-ctl { display: none; }
  .sort { margin-left: 0; }
}
@media (max-width: 620px) {
  .mast-row { flex-wrap: wrap; gap: 0.6rem; padding-bottom: 0.6rem; }
  .masthead .search { order: 3; flex-basis: 100%; max-width: none; }
  .masthead .search input { height: 42px; }
  .hero-search { flex-direction: column; }
  .cats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 0.75rem; }
  .card h3 { font-size: 1.02rem; }
  .card p { font-size: 0.88rem; -webkit-line-clamp: 3; }
  .card .buy { font-size: 0.82rem; padding: 0.5rem 0.75rem; }
  .card .buy svg { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .filters .pill { flex: none; }
}

/* product no longer on Amazon */
.buybox.gone { background: var(--tile); border-color: transparent; }
.buybox.gone p { margin: 0; font-size: 1rem; color: var(--ink-2); }
