/* ─────────────────────────────────────────────────────────────
   Bento template — playful rounded card grid.
   Per-site colours: --bg --c1 --c2 --c3 --deep --ink --pop
   ───────────────────────────────────────────────────────────── */
:root {
  --white: #fff;
  --r: clamp(22px, 2.6vw, 34px);
  --gap: clamp(12px, 1.4vw, 18px);
  --display: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --bubble: 'Fredoka', 'Lilita One', system-ui, sans-serif;
  --sans: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--deep); color: #fff; }

.b-shell { max-width: 1280px; margin: 0 auto; padding: clamp(12px, 2vw, 26px); }

/* entrance animation */
[data-in] { opacity: 0; transform: translateY(34px) scale(.97); transition: opacity .8s var(--out), transform .9s var(--spring); transition-delay: calc(var(--d, 0) * 90ms); }
[data-in].is-in { opacity: 1; transform: none; }

/* header */
.b-top { display: flex; align-items: center; gap: 20px; padding: 14px clamp(8px, 2vw, 26px) 22px; }
.b-logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.b-logo-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--c1); color: var(--deep); display: grid; place-items: center; transition: transform .6s var(--spring); }
.b-logo-mark svg { width: 64%; height: auto; }
.b-logo:hover .b-logo-mark { transform: rotate(-18deg) scale(1.1); }
.b-logo-word { font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.b-nav { flex: 1; display: flex; justify-content: center; gap: clamp(10px, 2.4vw, 34px); flex-wrap: wrap; }
.b-nav a { font-size: 14.5px; font-weight: 500; position: relative; padding: 4px 0; }
.b-nav a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: -2px; height: 3px; border-radius: 3px; background: var(--deep); transition: left .35s var(--out), right .35s var(--out); }
.b-nav a:hover::after, .b-nav a.is-on::after { left: 0; right: 0; }
.b-pill { position: relative; border: 0; cursor: pointer; background: var(--deep); color: var(--c1); font-family: var(--display); font-size: 17px; letter-spacing: .03em; padding: 12px 22px; border-radius: 50% / 60%; transform: rotate(-6deg); transition: transform .4s var(--spring); }
.b-pill:hover { transform: rotate(4deg) scale(1.06); }
.b-badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--ink); color: #fff; font-family: var(--sans); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.b-burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.b-burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.b-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.b-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.b-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.b-drawer { display: none; }

/* cards */
.b-card { position: relative; border-radius: var(--r); overflow: hidden; background: var(--white); }
.b-grid { display: grid; grid-template-columns: 1.85fr 1fr; grid-template-areas: "hero cat1" "hero cat2" "picks cat2"; gap: var(--gap); }
.b-head { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 44px); line-height: .95; letter-spacing: .01em; margin: 0; color: var(--ink); }
.b-head.big { font-size: clamp(32px, 4vw, 52px); }
.b-sub { margin: 8px 0 0; font-size: 14px; color: color-mix(in srgb, var(--ink) 80%, transparent); }

/* hero */
.b-hero { grid-area: hero; background: var(--c1); min-height: clamp(420px, 46vw, 560px); padding: clamp(18px, 3vw, 34px); display: flex; flex-direction: column; justify-content: space-between; }
.b-word { font-family: var(--bubble); font-weight: 700; color: var(--white); font-size: clamp(64px, 12.5vw, 170px); line-height: .84; letter-spacing: -.02em; margin: clamp(26px, 4vw, 48px) 0 0; text-align: center; display: flex; flex-direction: column; align-items: center; text-shadow: 0 6px 0 color-mix(in srgb, var(--c1) 70%, #000 30%); }
.b-word.sm { font-size: clamp(40px, 7vw, 92px); align-items: flex-start; text-align: left; margin-top: 10px; }
.b-line { display: block; white-space: nowrap; }
.b-ch { display: inline-block; transform: translateY(60%) scale(.4) rotate(-12deg); opacity: 0; transition: transform .9s var(--spring), opacity .4s; transition-delay: calc(var(--k) * 55ms + .25s); }
.is-in .b-ch, .b-ch.is-in { transform: none; opacity: 1; }
.b-ch:hover { animation: wobble .6s var(--spring); }
@keyframes wobble { 0%,100% { transform: none; } 30% { transform: translateY(-14px) rotate(-8deg) scale(1.08); } 60% { transform: translateY(4px) rotate(5deg); } }
.b-spark { position: absolute; width: 56px; fill: none; stroke: var(--white); stroke-width: 5; stroke-linecap: round; }
.b-spark.s1 { left: 6%; top: 24%; }
.b-spark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 1s .9s var(--out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* hero word: line 1 top-left, line 2 bottom-right, always above the artwork */
.b-hero { container-type: inline-size; }
/* size from letter count: line 1 must stay left of the artwork (~55% width), line 2 may use the full width */
.b-hero .b-word { position: relative; z-index: 4; align-items: stretch; margin-top: clamp(4px, 1.5vw, 18px); pointer-events: none;
  font-size: min(170px, calc(84cqi / var(--l1)), calc(138cqi / var(--l2))); }
.b-hero .b-word .b-line { pointer-events: auto; }
.b-hero .b-word .b-line:first-child { align-self: flex-start; }
.b-hero .b-word .b-line:last-child { align-self: flex-end; margin-top: clamp(4px, 1vw, 12px); }
.b-hero .b-word .b-line:only-child { align-self: center; }
.b-spark.s1 { left: auto; right: 40%; top: 9%; }
/* artwork floats in the free top-right space */
.b-hero-art { position: absolute; right: 4%; top: 5%; width: clamp(170px, 23vw, 300px); aspect-ratio: 1; z-index: 2; }
.b-hero-art img { width: 100%; height: 100%; object-fit: contain; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0,0,0,.18)); transition: transform .5s var(--spring); }
.b-hero-art:hover img { transform: scale(1.06) rotate(-4deg); }
.b-hero-art.is-swap img { animation: swapin .7s var(--spring), float 5s .7s ease-in-out infinite; }
@keyframes swapin { from { transform: scale(.4) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
.b-blob { position: absolute; right: -2%; top: -3%; z-index: 3; min-width: 110px; padding: 14px 18px; border-radius: 50%; background: var(--deep); color: var(--c1); display: flex; flex-direction: column; align-items: center; text-align: center; transform: rotate(-8deg); animation: blobpop .8s 1.1s var(--spring) both; line-height: 1.05; }
.b-blob small { font-size: 11px; color: #fff; font-weight: 500; max-width: 110px; }
.b-blob b { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: .02em; }
.b-blob.sm { right: 2%; top: 14%; min-width: 86px; padding: 10px 14px; }
.b-blob.sm b { font-size: 24px; }
@keyframes blobpop { from { transform: scale(0) rotate(-40deg); } to { transform: rotate(-8deg); } }
.b-hero-foot { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 14px; }
.b-hero-tag { margin: 0; font-size: 14px; font-weight: 500; max-width: 240px; line-height: 1.4; }
.b-hero-stat { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--white); }
.b-hero-stat span { font-size: 40px; font-weight: 300; line-height: 1; }
.b-hero-stat b { font-family: var(--bubble); font-size: 34px; line-height: 1; }
.b-hero-stat small { font-size: 12px; max-width: 80px; line-height: 1.2; }
.b-hero-thumbs { display: flex; gap: 8px; justify-content: flex-end; }
.b-hero-thumbs button { width: 52px; height: 52px; border-radius: 50%; border: 3px solid transparent; background: var(--t); padding: 6px; cursor: pointer; transition: transform .35s var(--spring), border-color .2s; }
.b-hero-thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.b-hero-thumbs button:hover { transform: translateY(-4px) rotate(-6deg); }
.b-hero-thumbs button.is-on { border-color: var(--white); }
.b-hero-title { position: absolute; z-index: 3; left: 50%; bottom: clamp(84px, 9vw, 104px); transform: translateX(-50%); margin: 0; font-weight: 600; font-size: 13px; background: rgba(255,255,255,.8); padding: 6px 14px; border-radius: 99px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }

/* category card 1 */
.b-cat1 { grid-area: cat1; background: var(--c2); padding: clamp(18px, 2.4vw, 28px); text-align: center; min-height: 260px; display: flex; flex-direction: column; align-items: center; }
.b-cat-art { width: 46%; margin-top: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.18)); transition: transform .5s var(--spring); }
.b-cat1:hover .b-cat-art { transform: translateY(-8px) rotate(6deg) scale(1.05); }
.b-note { position: absolute; left: 7%; top: 44%; font-family: var(--display); font-size: 15px; line-height: .95; color: var(--white); transform: rotate(-14deg); text-align: left; }
.b-note svg { display: block; width: 52px; margin: 4px 0 0 18px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; }
.b-cat-cta { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 2; }
.b-btn { background: var(--ink); color: var(--c1); font-family: var(--display); font-size: 16px; letter-spacing: .04em; padding: 12px 26px; border-radius: 99px; transition: transform .35s var(--spring), background .2s; }
.b-btn:hover { transform: scale(1.06); }
.b-round { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--white); font-size: 20px; font-weight: 500; border: 0; cursor: pointer; transition: transform .45s var(--spring), background .2s; }
.b-round.pop { background: var(--c1); color: var(--deep); }
.b-round.dark { background: var(--ink); color: var(--white); }
.b-round:hover, a:hover > .b-round { transform: rotate(90deg) scale(1.08); }

/* category card 2 (tall) */
.b-cat2 { grid-area: cat2; background: var(--c3); padding: clamp(18px, 2.4vw, 28px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.b-cat2-art { position: relative; display: block; width: 78%; margin: 18px auto 8px; flex: 1; }
.b-cat2-art img { width: 100%; animation: float 6s 1s ease-in-out infinite; filter: drop-shadow(0 18px 20px rgba(0,0,0,.2)); }
.b-cat2-txt { margin: 0 0 6px; font-size: 14px; font-weight: 500; max-width: 260px; }
.b-link { font-size: 13px; font-weight: 600; margin-top: 6px; border-bottom: 2px solid currentColor; }

/* picks */
.b-picks { grid-area: picks; padding: clamp(20px, 3vw, 36px); display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 56px); align-items: start; }
.b-rows { display: flex; flex-direction: column; }
.b-row { display: grid; grid-template-columns: 52px minmax(0, 1.1fr) minmax(0, 1.4fr) auto 42px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); transition: padding .35s var(--out); }
.b-row:last-child { border-bottom: 0; }
.b-row:hover { padding-left: 8px; }
.b-thumb { width: 52px; height: 52px; border-radius: 16px; background: var(--t); padding: 5px; transition: transform .4s var(--spring); }
.b-row:hover .b-thumb { transform: rotate(-8deg) scale(1.08); }
.b-thumb img { width: 100%; height: 100%; object-fit: contain; }
.b-row-title { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.b-row-desc { font-size: 13px; line-height: 1.35; color: color-mix(in srgb, var(--ink) 75%, transparent); }
.b-row-cat { font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-rows.compact .b-row { grid-template-columns: 46px 1fr 38px; }
.b-rows.compact .b-row-desc, .b-rows.compact .b-row-cat { display: none; }
.b-empty { color: color-mix(in srgb, var(--ink) 60%, transparent); }

/* category strip */
.b-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-top: var(--gap); }
.b-catchip { background: var(--bgc); padding: 22px; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .45s var(--spring); }
.b-catchip:hover { transform: translateY(-6px) rotate(-1deg); }
.b-catchip-n { position: absolute; top: 16px; left: 22px; font-family: var(--display); font-size: 34px; color: var(--white); }
.b-catchip b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; }
.b-catchip small { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.b-catchip .b-round { position: absolute; top: 16px; right: 16px; }

/* article */
.b-art { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }
.b-art-head { background: var(--c1); padding: clamp(22px, 3.4vw, 44px); min-height: 360px; }
.b-back { display: inline-block; background: var(--white); padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; transition: transform .35s var(--spring); }
.b-back:hover { transform: translateX(-4px); }
.b-art-title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.2vw, 56px); line-height: 1.02; margin: 22px 0 14px; letter-spacing: .005em; }
.b-art-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.b-art-meta span { background: rgba(255,255,255,.6); padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.b-art-lead { font-size: 17px; font-weight: 500; line-height: 1.5; margin: 0; max-width: 620px; }
.b-art-art { margin: 0; background: var(--c2); min-height: 360px; display: grid; place-items: center; padding: 30px; }
.b-art-art img { width: 82%; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 18px 22px rgba(0,0,0,.2)); }
.b-art-art .b-blob { right: 6%; top: 8%; }
.b-art-body { padding: clamp(22px, 4vw, 56px); }
.b-prose { font-size: 17px; line-height: 1.75; max-width: 700px; }
.b-prose p { margin: 0 0 1.1em; }
.b-prose h2 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 1.5em 0 .5em; }
.b-prose blockquote { margin: 1.4em 0; padding: 22px 26px; background: var(--c3); border-radius: 22px; font-family: var(--bubble); font-weight: 600; font-size: 21px; line-height: 1.35; }
.b-prose ul { padding-left: 1.2em; } .b-prose li { margin-bottom: .4em; }
.b-prose a { text-decoration: underline; text-decoration-color: var(--deep); text-decoration-thickness: 2px; }
.b-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 5px 12px; border-radius: 99px; background: var(--bg); font-size: 13px; font-weight: 600; }
.b-art-side { padding: 26px; position: sticky; top: 18px; }
.b-art-side .b-rows { margin-top: 16px; }
.b-preview { position: sticky; top: 0; z-index: 50; background: var(--deep); color: #fff; text-align: center; padding: 8px; font-size: 13px; }
.b-preview a { text-decoration: underline; }

/* list */
.b-list { display: grid; gap: var(--gap); }
.b-list-head { background: var(--c1); padding: clamp(22px, 3.4vw, 44px); min-height: 240px; padding-right: clamp(22px, 30%, 380px); }
.b-list-head .b-word { text-shadow: 0 5px 0 color-mix(in srgb, var(--c1) 70%, #000 30%); }
.b-list-head .b-line { white-space: normal; }
.b-list-art { position: absolute; right: 4%; top: 50%; width: clamp(140px, 22vw, 280px); transform: translateY(-50%); animation: float 5s ease-in-out infinite; filter: drop-shadow(0 18px 22px rgba(0,0,0,.2)); }
.b-picks.wide { grid-area: auto; }

/* search overlay */
.b-search { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--c1) 92%, transparent); display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.b-search.is-open { opacity: 1; pointer-events: auto; }
.b-search-box { display: flex; gap: 8px; align-items: center; width: min(640px, 100%); background: var(--white); border-radius: 99px; padding: 8px 8px 8px 24px; transform: scale(.9); transition: transform .5s var(--spring); }
.b-search.is-open .b-search-box { transform: none; }
.b-search-box input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 18px; background: none; }
.b-search-box.inline { margin-top: 18px; max-width: 460px; transform: none; }
.b-search-close { position: absolute; top: 22px; right: 22px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 26px; cursor: pointer; }

/* footer */
.b-foot { margin-top: var(--gap); background: var(--ink); color: var(--white); border-radius: var(--r); padding: 26px clamp(20px, 3vw, 36px); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.b-foot p { margin: 0; flex: 1; min-width: 200px; font-size: 14px; opacity: .85; }
.b-foot span { font-size: 13px; opacity: .7; }

/* responsive */
@media (max-width: 1020px) {
  .b-nav { display: none; }
  .b-burger { display: flex; }
  .b-top { justify-content: space-between; }
  .b-drawer { display: block; max-height: 0; overflow: hidden; transition: max-height .5s var(--out); }
  .b-drawer.is-open { max-height: 520px; }
  .b-drawer a { display: block; padding: 0 22px; font-family: var(--display); font-size: 24px; line-height: 2; }
  .b-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .b-grid { grid-template-columns: 1fr; grid-template-areas: "hero" "cat1" "cat2" "picks"; }
  .b-picks { grid-template-columns: 1fr; }
  .b-row { grid-template-columns: 48px 1fr 40px; }
  .b-row-desc, .b-row-cat { display: none; }
  .b-hero-foot { grid-template-columns: 1fr auto; }
  .b-hero-tag { grid-column: 1 / -1; }
  .b-hero-title { display: none; }
  .b-hero { min-height: 480px; }
  .b-hero-art { width: clamp(140px, 38vw, 220px); right: 3%; top: 4%; }
  .b-hero .b-word { margin-top: clamp(120px, 34vw, 190px); font-size: min(150px, calc(130cqi / var(--l1)), calc(130cqi / var(--l2))); }
  .b-hero .b-blob { min-width: 84px; padding: 9px 12px; }
  .b-hero .b-blob b { font-size: 22px; }
  .b-art { grid-template-columns: 1fr; }
  .b-art-art { min-height: 260px; order: -1; }
  .b-art-side { position: relative; top: 0; }
  .b-list-head { padding-right: clamp(22px, 3.4vw, 44px); padding-bottom: 180px; }
  .b-list-art { top: auto; bottom: 10px; transform: none; width: 150px; }
  .b-cat2-art { width: 60%; }
}
@media (max-width: 480px) {
  .b-pill { padding: 10px 16px; font-size: 15px; }
  .b-cats { grid-template-columns: 1fr; }
  .b-hero-thumbs button { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  [data-in], .b-ch { opacity: 1; transform: none; }
}
