/* Homepage only: dark hero, demo, sections. Shared styles live in site.css. */

/* ============ HERO ============ */
.hero-band {
  position: relative; overflow: hidden; color: var(--hero-ink); isolation: isolate;
  background: var(--hero-1);
}
/* faint dot grid, fading out toward the edges so the middle stays calm */
.hero-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  display: none;
}
/* soft light pooled behind the format picker */
.hero-band::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 52%; width: min(820px, 90%); height: 260px; transform: translate(-50%, -50%);
  display: none;
}

.hero-main { position: relative; z-index: 1; text-align: center; padding-block: 56px 88px; display: grid; justify-items: center; gap: 24px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #E0E7FF;
}
.hero-tag i { width: 6px; height: 6px; border-radius: 50%; background: #A5B4FC; }
.hero-main h1 { font-size: clamp(32px, 5.4vw, 58px); line-height: 1.18; letter-spacing: -0.02em; font-weight: 800; color: #fff; }
.grad { color: #A5B4FC; }
.hero-sub { margin: 0; max-width: 56ch; color: var(--hero-muted); font-size: 17px; line-height: 1.8; }

.convert-bar {
  margin-top: 16px; width: min(700px, 100%); display: flex; align-items: center; gap: 12px;
  background: #fff; color: #334155; border-radius: 999px; padding: 10px 10px 10px 24px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .45);
}
.convert-bar:focus-within { box-shadow: 0 0 0 3px #A5B4FC, 0 12px 30px -14px rgba(0, 0, 0, .45); }
.ub-icon { width: 22px; height: 22px; color: #4F46E5; flex: none; }
.cb-lbl { font-size: 15px; font-weight: 500; color: #64748B; }
.convert-bar select {
  appearance: none; -webkit-appearance: none; cursor: pointer; flex: 1; min-width: 0;
  font: 700 16px/1.2 var(--font-display); color: #0F172A; color-scheme: light;
  background: #F1F5F9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px 36px 12px 14px;
}
.convert-bar select:hover { border-color: #4F46E5; }
.convert-bar select:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 1px; }
.cb-swap {
  flex: none; appearance: none; cursor: pointer; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: #EEF2FF; color: #4338CA; border: 1px solid #C7D2FE;
  transition: transform .25s, background .2s;
}
.cb-swap svg { width: 18px; height: 18px; }
.cb-swap:hover:not(:disabled) { background: #4F46E5; color: #fff; transform: rotate(180deg); }
.cb-swap:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 2px; }
.cb-swap:disabled { opacity: .4; cursor: not-allowed; }
.ub-btn {
  flex: none; appearance: none; border: 0; cursor: pointer; font-family: var(--font-body);
  background: #4F46E5; color: #fff; font-weight: 600; font-size: 15px;
  padding: 15px 26px; border-radius: 999px; box-shadow: none;
}
.ub-btn:hover { background: #4338CA; }
.ub-btn:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 3px; }
/* ---- Live conversion demo under the picker ---- */
.e-png { --e: #C7D2FE; } .e-jpg { --e: #C7D2FE; } .e-webp { --e: #C7D2FE; } .e-heic { --e: #C7D2FE; }
.e-svg { --e: #C7D2FE; } .e-avif { --e: #C7D2FE; } .e-gif { --e: #C7D2FE; } .e-ico { --e: #C7D2FE; } .e-bmp { --e: #C7D2FE; }
.demo {
  width: min(560px, 100%); display: grid; grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr); align-items: center; gap: 12px;
  margin-top: 6px;
}
.demo-file {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left;
  padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: opacity .4s, transform .4s;
}
.ext {
  flex: none; width: 44px; height: 50px; border-radius: 8px 14px 8px 8px; display: grid; place-items: end center; padding-bottom: 7px;
  font: 800 10.5px/1 var(--font-display); letter-spacing: .04em; color: #0F172A; background: var(--e, #C7D2FE);
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
  transition: background .3s;
}
.demo-meta { display: grid; gap: 2px; min-width: 0; line-height: 1.35; }
.demo-meta b { font: 600 14px/1.35 var(--font-body); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-meta small { font-size: 12.5px; color: #94A3B8; white-space: nowrap; }
.demo-meta em { font-style: normal; font-weight: 600; color: #34D399; }
.demo-track { position: relative; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: visible; }
.demo-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: #A5B4FC; }
.demo-spark {
  position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; box-shadow: none; opacity: 0;
}
.demo-check {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #10B981; color: #fff; transform: scale(0); transition: transform .35s cubic-bezier(.3,1.6,.5,1);
  box-shadow: none;
}
.demo-check svg { width: 13px; height: 13px; }
.demo-wait {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px;
  font-size: 13px; font-weight: 500; color: #CBD5E1; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .3s;
}
.demo-out .ext, .demo-out .demo-meta { transition: opacity .3s, transform .4s cubic-bezier(.3,1.4,.5,1); }

/* states set by home.js */
.demo.is-working .demo-fill { animation: demo-fill 1.5s cubic-bezier(.4,0,.2,1) forwards; }
.demo.is-working .demo-spark { animation: demo-spark 1.5s cubic-bezier(.4,0,.2,1) forwards; }
.demo.is-working .demo-wait { opacity: 1; }
.demo.is-working .demo-out .ext, .demo.is-working .demo-out .demo-meta { opacity: .15; transform: scale(.92); }
.demo.is-done .demo-fill { width: 100%; }
.demo.is-done .demo-check { transform: scale(1); }
.demo.is-done .demo-out { border-color: rgba(52, 211, 153, .45); box-shadow: 0 0 0 4px rgba(52, 211, 153, .08); }
.demo.is-leaving .demo-file { opacity: 0; transform: translateY(6px); }
@keyframes demo-fill { from { width: 0; } to { width: 100%; } }
@keyframes demo-spark { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* ---- Floating format badges (wide screens only) ---- */
.floaters { display: none !important; }
.fl {
  position: absolute; left: var(--x); top: var(--y);
  font: 800 12px/1 var(--font-display); letter-spacing: .06em; color: var(--e);
  padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--e) 12%, rgba(15,23,42,.5));
  border: 1px solid color-mix(in srgb, var(--e) 40%, transparent);
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--e) 60%, transparent);
  animation: float 7s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
@media (max-width: 1100px) { .floaters { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .fl { animation: none; }
  .demo.is-working .demo-fill, .demo.is-working .demo-spark { animation: none; }
}

.hero-formats { margin: 0; font-size: 13px; color: #94A3B8; letter-spacing: .06em; }

.home .hero-main.wrap { max-width: 1000px; }

/* USP cards */
.hero-feats {
  list-style: none; margin: 44px 0 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left;
}
.hero-feats li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 20px;
  border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: none; transition: transform .2s, border-color .2s, background .2s;
}
.hero-feats li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: rgba(255, 255, 255, .1); }
.hero-feats .fi {
  width: 46px; height: 46px; border-radius: 13px; color: #fff;
  background: var(--accent);
}
.hero-feats .fi svg { width: 22px; height: 22px; }
.hero-feats div { display: grid; gap: 3px; line-height: 1.4; min-width: 0; }
.hero-feats strong { font: 700 15.5px/1.3 var(--font-display); color: #fff; }
.hero-feats span:not(.fi) { font-size: 13px; color: #CBD5E1; }

/* ============ SECTIONS ============ */
.sec { padding-block: 104px 8px; }
.sec-head { display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: 48px; }
.sec-head.left { justify-items: start; text-align: left; }
.sec-head h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.sec-head p { color: var(--muted); max-width: 60ch; }
.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4;
  color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px;
}


/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1180px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-card {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 32px 28px 80px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s;
}
.cat-card .tile { margin-bottom: 14px; }
.cat-card strong { font: 700 17px/1.35 var(--font-display); }
.cat-card > span:not(.tile):not(.go):not(.soon-badge) { color: var(--muted); font-size: 14px; line-height: 1.7; }
a.cat-card:hover { transform: translateY(-3px); border-color: var(--accent); }
a.cat-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.go {
  position: absolute; left: 28px; bottom: 28px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--c);
}
.go svg { width: 16px; height: 16px; }
.t-green-solid { --c: #10B981; }
.soon-badge {
  position: absolute; left: 28px; bottom: 30px; font-size: 12px; font-weight: 500; line-height: 1.4;
  color: var(--muted); background: var(--band); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px;
}
.cat-card.soon { opacity: .85; }

/* Tabs + tool grid */
.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.tabs button {
  appearance: none; cursor: pointer; font: 500 14px/1 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); padding: 11px 22px; border-radius: 999px;
}
.tabs button:hover { border-color: var(--accent); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.more-row { display: flex; justify-content: center; margin-top: 40px; }
.soon-panel {
  display: grid; gap: 6px; justify-items: center; text-align: center; padding: 48px 20px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: 16px;
}
.soon-panel strong { font: 700 18px/1.3 var(--font-display); }
.soon-panel span { color: var(--muted); }

/* Why */
.why-band { background: var(--band); margin-top: 120px; }
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: center; padding-block: 88px; }
.why-intro { display: grid; gap: 18px; justify-items: start; }
.why-intro h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.why-intro p { color: var(--muted); }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.why-list li { display: grid; gap: 8px; align-content: start; }
.fi-sm { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px; }
.fi-sm svg { width: 18px; height: 18px; }
.why-list strong { font: 700 15px/1.4 var(--font-display); }
.why-list span:not(.fi-sm) { font-size: 14px; line-height: 1.7; color: var(--muted); }

/* FAQ */
.faq { padding-bottom: 104px; }
.faq section.content { margin-top: 104px; gap: 20px; }
.faq h2 { font-size: 30px; font-weight: 800; line-height: 1.25; }
.faq details { padding-block: 20px; }
.faq details summary { font: 500 16px/1.5 var(--font-body); }
.faq details p { margin-top: 12px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .convert-bar { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); border-radius: 22px; padding: 16px; gap: 10px; }
  .convert-bar .ub-icon, .convert-bar .cb-lbl[for="h-from"] { display: none; }
  .convert-bar select { width: 100%; }
  .ub-btn { grid-column: 1 / -1; width: 100%; }
  .demo { grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); gap: 8px; }
  .demo-file { padding: 10px; gap: 9px; }
  .ext { width: 34px; height: 40px; font-size: 9px; padding-bottom: 6px; }
  .demo-meta b { font-size: 12.5px; }
  .demo-meta small { font-size: 11.5px; }
  .hero-main { padding-block: 40px 64px; gap: 20px; }
  .hero-feats { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
  .hero-feats li { gap: 10px; padding: 14px; }
  .hero-feats .fi { width: 38px; height: 38px; border-radius: 11px; }
  .hero-feats .fi svg { width: 19px; height: 19px; }
  .hero-feats strong { font-size: 14px; }
  .hero-feats span:not(.fi) { font-size: 12px; }
  .sec { padding-block: 72px 8px; }
  .sec-head { margin-bottom: 32px; }
  .cat-grid { gap: 14px; }
  .cat-card { padding: 22px 18px 66px; }
  .go, .soon-badge { left: 18px; bottom: 20px; }
  .why-band { margin-top: 80px; }
  .why { padding-block: 64px; gap: 36px; }
  .why-list { gap: 28px 20px; }
  .faq section.content { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) { .cat-card, .tool-card, .cb-swap, .hero-feats li { transition: none; } .cb-swap:hover:not(:disabled) { transform: none; } }

/* ============ HERO v2: shorter blue band, two columns, cards on the edge ============ */
.home .hero-main.wrap { max-width: 1160px; }
.hero-main {
  text-align: left; justify-items: stretch; align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px;
  padding-block: 40px 108px;
}
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.hero-main h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.025em; }
.hero-sub { font-size: 16.5px; line-height: 1.75; max-width: 52ch; }
.hero-copy .convert-bar { margin-top: 4px; width: 100%; max-width: 600px; }
.hero-copy .ub-btn { padding-inline: 26px; }
.hero-pop { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--hero-muted); }
.hero-pop span { margin-right: 2px; }
.hero-pop a {
  text-decoration: none; color: #E0E7FF; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); transition: background .15s, border-color .15s;
}
.hero-pop a:hover { background: rgba(255,255,255,.14); border-color: rgba(165,180,252,.6); }

/* right side: the conversion demo inside a small app window */
.hero-visual { position: relative; padding: 18px 8px; }
.win {
  position: relative; border-radius: 20px; padding: 0 0 4px; overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 50px -28px rgba(0,0,0,.6);
}
.win-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.win-bar i:first-child { background: #F87171; } .win-bar i:nth-child(2) { background: #FBBF24; } .win-bar i:nth-child(3) { background: #34D399; }
.win-bar span { margin-left: 8px; font: 600 12px/1 var(--font-body); color: #94A3B8; letter-spacing: .04em; }
.hero-visual .demo { width: 100%; padding: 26px 20px 18px; margin: 0; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); }
.win-foot { display: flex; align-items: center; gap: 8px; margin: 0 20px 18px; padding: 11px 14px; border-radius: 12px; background: rgba(16,185,129,.12); color: #A7F3D0; font-size: 13px; }
.win-ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #10B981; color: #fff; flex: none; }
.win-ok svg { width: 12px; height: 12px; }
/* floating chips removed in the flat theme */
.chip-float { display: none !important; }
.chip-float-old {
  position: absolute; font: 700 12.5px/1 var(--font-display); color: #0F172A; padding: 10px 14px; border-radius: 12px;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); animation: float 7s ease-in-out infinite;
}
.chip-float.c1 { top: -4px; right: 14px; background: #C4B5FD; }
.chip-float.c2 { bottom: -8px; left: -6px; background: #67E8F9; animation-delay: -3s; }

/* USP cards sit on the edge of the blue band */
.feats-wrap { position: relative; z-index: 2; margin-top: -64px; }
.feats-wrap .hero-feats { margin: 0; }
.feats-wrap .hero-feats li {
  flex-direction: row; align-items: center; gap: 14px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: none;
  box-shadow: 0 18px 40px -22px rgba(15,23,42,.35);
}
.feats-wrap .hero-feats li:hover { background: var(--surface); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.feats-wrap .hero-feats strong { color: var(--ink); font-size: 15px; }
.feats-wrap .hero-feats span:not(.fi) { color: var(--muted); }
.feats-wrap + main .sec:first-child { padding-top: 88px; }

@media (max-width: 1100px) { .hero-main { gap: 36px; } }
@media (max-width: 960px) {
  .hero-main { grid-template-columns: 1fr; padding-block: 28px 96px; }
  .hero-copy { justify-items: center; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-pop { justify-content: center; }
  .hero-visual { max-width: 520px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) {
  .hero-main { padding-block: 20px 84px; gap: 26px; }
  .hero-visual { padding: 10px 0; }
  .hero-visual .demo { padding: 18px 12px 12px; grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); }
  .win-foot { margin: 0 12px 12px; font-size: 12px; }
  .chip-float { display: none; }
  .feats-wrap { margin-top: -58px; }
  .feats-wrap .hero-feats li { flex-direction: column; align-items: flex-start; padding: 14px; gap: 10px; }
  .feats-wrap + main .sec:first-child { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { .chip-float { animation: none; } }

/* HERO v2.1: tighter band */
.hero-main { padding-block: 18px 84px; gap: 48px; }
.hero-copy { gap: 16px; }
.hero-main h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.14; }
.hero-sub { font-size: 15.5px; line-height: 1.65; }
.hero-tag { padding-block: 6px; }
.hero-visual { padding: 10px 6px; }
.hero-visual .demo { padding: 20px 18px 14px; }
.win-foot { margin-bottom: 14px; padding-block: 9px; }
.feats-wrap { margin-top: -54px; }
.feats-wrap .hero-feats li { padding: 16px 18px; }
@media (max-width: 960px) {
  .hero-main { padding-block: 14px 76px; }
  .hero-visual { display: none; }
}
@media (max-width: 560px) {
  .hero-main { padding-block: 10px 72px; }
  .hero-copy { gap: 13px; }
  .hero-sub { font-size: 14.5px; }
  .feats-wrap { margin-top: -50px; }
  .feats-wrap .hero-feats li { padding: 12px; }
}

/* HERO v2.2: a little taller than v2.1 (between the old and the tight band) */
.hero-main { padding-block: 44px 112px; gap: 52px; }
.hero-copy { gap: 18px; }
.hero-main h1 { font-size: clamp(26px, 3.1vw, 40px); line-height: 1.16; }
.hero-visual .demo { padding: 24px 20px 16px; }
.feats-wrap { margin-top: -60px; }
@media (max-width: 960px) { .hero-main { padding-block: 32px 96px; } }
@media (max-width: 560px) { .hero-main { padding-block: 22px 84px; } .feats-wrap { margin-top: -54px; } }
/* keep the open language menu above the feature cards */
.hero-band:has(.lang-list:not([hidden])), .hero-band:has(.site-head.open) { position: relative; z-index: 5; overflow: visible; }
/* contrast accent on the homepage */
.grad { color: var(--pop); }
.hero-tag i { background: var(--pop); }
.ub-btn { background: var(--pop); color: var(--pop-ink); }
.ub-btn:hover { background: var(--pop-hover); }
.hero-feats .fi, .go { background: var(--pop); color: var(--pop-ink); }
.demo-fill { background: var(--pop); }

/* ============ CATEGORY CARDS v3: art panel + format tags ============ */
.cat-card { padding: 12px 12px 22px; gap: 8px; overflow: hidden; transition: transform .25s cubic-bezier(.3,1.4,.5,1), border-color .2s, box-shadow .2s; }
.cat-card > strong, .cat-card > span:not(.cat-art):not(.go):not(.soon-badge) { padding-inline: 10px; }
.cat-card > strong { margin-top: 8px; padding-right: 52px; }
.cat-art {
  position: relative; display: block; height: 132px; border-radius: 14px; overflow: hidden;
  background: var(--hero-1); margin-bottom: 4px;
}
.cat-art::before { /* a soft ring behind the icon */
  content: ""; position: absolute; left: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%;
  border: 18px solid rgba(255,255,255,.05);
}
.cat-card .cat-art .tile { position: absolute; left: 16px; bottom: 16px; margin: 0; background: var(--pop); color: var(--pop-ink);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.cat-fmts { position: absolute; inset: 0; }
.cat-fmts i {
  position: absolute; font: 800 11px/1 var(--font-display); font-style: normal; letter-spacing: .05em;
  padding: 7px 9px; border-radius: 7px; background: #fff; color: var(--hero-1);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
.cat-fmts .f1 { right: 16px; top: 18px; transform: rotate(8deg); }
.cat-fmts .f2 { right: 62px; top: 46px; transform: rotate(-7deg); background: #E0E7FF; }
.cat-fmts .f3 { right: 20px; top: 76px; transform: rotate(-3deg); background: var(--pop); }
.cat-fmts .f4 { right: 74px; top: 12px; transform: rotate(-12deg); background: transparent; color: #C7D2FE; box-shadow: none; border: 1.5px dashed rgba(199,210,254,.45); }
a.cat-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 20px 40px -24px rgba(30,27,75,.45); }
a.cat-card:hover .cat-art .tile { transform: rotate(-8deg) scale(1.08); }
a.cat-card:hover .f1 { transform: translate(4px,-4px) rotate(14deg); }
a.cat-card:hover .f2 { transform: translate(-6px,-2px) rotate(-13deg); }
a.cat-card:hover .f3 { transform: translate(3px,4px) rotate(5deg); }
a.cat-card:hover .f4 { transform: translate(-4px,-3px) rotate(-18deg); }
.cat-card .go {
  left: auto; right: 14px; bottom: auto; top: 158px; width: 34px; height: 34px;
  background: var(--pop-soft); color: var(--pop-deep); transition: background .2s, color .2s, transform .25s;
}
a.cat-card:hover .go { background: var(--pop); color: var(--pop-ink); transform: translateX(3px); }
@media (max-width: 560px) {
  .cat-card { padding: 10px 10px 18px; }
  .cat-art { height: 112px; }
  .cat-card > strong, .cat-card > span:not(.cat-art):not(.go):not(.soon-badge) { padding-inline: 6px; }
  .cat-card > strong { padding-right: 6px; }
  .cat-card .go { display: none; }
  .cat-fmts .f4 { display: none; }
  .cat-fmts .f1 { right: 12px; top: 12px; }
  .cat-fmts .f2 { right: 18px; top: 44px; }
  .cat-fmts .f3 { right: 10px; top: 76px; }
}
@media (max-width: 960px) { .cat-grid > .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .cat-card, .cat-fmts i, .cat-card .cat-art .tile { transition: none; } }

/* readable grey on the light band (WCAG AA) */
:root:not([data-theme="dark"]) .why-band { --muted: #526077; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .why-band { --muted: #94A3B8; } }

/* ============ CATEGORY CARDS v4: calm, light art panel ============ */
.cat-art { height: 112px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent); }
.cat-art::before { display: none; }
.cat-card .cat-art .tile {
  left: 16px; top: 16px; bottom: auto; width: 46px; height: 46px; border-radius: 12px;
  background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(15,23,42,.08); border: 1px solid var(--line);
}
.cat-card .cat-art .tile svg { width: 22px; height: 22px; }
.cat-fmts { inset: auto 14px 14px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.cat-fmts i, .cat-fmts .f1, .cat-fmts .f2, .cat-fmts .f3, .cat-fmts .f4 {
  position: static; transform: none; display: inline-block;
  font: 600 10.5px/1 var(--font-body); letter-spacing: .04em; padding: 5px 8px; border-radius: 6px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: none;
}
.cat-fmts .f4 { display: inline-block; }
a.cat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -20px rgba(15,23,42,.35); }
a.cat-card:hover .cat-art .tile { transform: none; background: var(--accent); color: #fff; border-color: var(--accent); }
a.cat-card:hover .cat-fmts i { transform: none; }
.cat-card .go { top: 138px; background: transparent; color: var(--muted); border: 1px solid var(--line); }
a.cat-card:hover .go { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 560px) {
  .cat-art { height: 100px; }
  .cat-fmts .f4 { display: none; }
}
/* v4.1: icon on top, one row of tags at the bottom – nothing overlaps */
.cat-art { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 14px; height: 118px; }
.cat-card .cat-art .tile { position: static; }
.cat-fmts { position: static; inset: auto; flex-wrap: nowrap; overflow: hidden; max-width: 100%; }
.cat-fmts .f4 { display: none; }
.cat-card .go { top: 144px; }
@media (max-width: 560px) { .cat-art { height: 106px; padding: 12px; } .cat-fmts .f3 { display: none; } .cat-grid > .cat-card:last-child .cat-fmts .f3 { display: inline-block; } }

/* ============ CATEGORY BENTO (replaces the 5 small cards) ============ */
.bento { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; }
.bc {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.bc:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 18px 36px -24px rgba(30,27,75,.45); }
.bc-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.bc-ic svg { width: 22px; height: 22px; }
.bc h3 { margin: 4px 0 0; font: 700 18px/1.3 var(--font-display); }
.bc p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.bc-pairs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.bc-pair {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 10px; text-decoration: none;
  background: var(--band); border: 1px solid var(--line); color: var(--ink);
  font: 800 11.5px/1 var(--font-display); letter-spacing: .04em; transition: border-color .15s, transform .15s;
}
.bc-pair:hover { border-color: var(--accent); transform: translateY(-1px); }
.bc-pair b { padding: 5px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.bc-pair b.to { background: var(--accent); border-color: var(--accent); color: #fff; }
.bc-pair svg { width: 13px; height: 13px; color: var(--muted); }
.bc-go {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  background: var(--pop); color: var(--pop-ink); font: 600 14px/1 var(--font-body);
}
.bc-go svg { width: 15px; height: 15px; transition: transform .2s; }
.bc-go:hover { background: var(--pop-hover); }
.bc:hover .bc-go svg { transform: translateX(3px); }
.bc-go:focus-visible, .bc-pair:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the big Image card: same navy as the hero */
.bc-main { grid-row: span 2; padding: 30px; background: #1E1B4B; border-color: #1E1B4B; color: #fff; }
.bc-main:hover { border-color: var(--pop); }
.bc-main .bc-ic { width: 58px; height: 58px; border-radius: 16px; background: var(--pop); color: var(--pop-ink); }
.bc-main .bc-ic svg { width: 28px; height: 28px; }
.bc-main h3 { font-size: 26px; }
.bc-main p { color: #C7CBEA; font-size: 15px; }
.bc-main .bc-pairs { flex-direction: column; flex-wrap: nowrap; gap: 9px; }
.bc-main .bc-pair { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; font-size: 13px; padding: 10px 12px; }
.bc-main .bc-pair:hover { border-color: var(--pop); }
.bc-main .bc-pair b { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.bc-main .bc-pair b.to { background: var(--pop); border-color: var(--pop); color: var(--pop-ink); }
.bc-main .bc-pair svg { color: #A5B4FC; }
.bc-main .bc-go { padding: 12px 20px; font-size: 15px; }

/* dark mode: the big card turns white, the yellow stays */
:root[data-theme="dark"] .bc-main { background: #fff; border-color: #fff; color: #0F172A; }
:root[data-theme="dark"] .bc-main p { color: #475569; }
:root[data-theme="dark"] .bc-main .bc-pair { background: #F1F5F9; border-color: #E2E8F0; color: #0F172A; }
:root[data-theme="dark"] .bc-main .bc-pair b { background: #fff; border-color: #E2E8F0; }
:root[data-theme="dark"] .bc-main .bc-pair svg { color: #64748B; }
:root[data-theme="dark"] .bc-main .bc-pair b.to { background: var(--pop); border-color: var(--pop); color: var(--pop-ink); }
:root[data-theme="dark"] .bc-main:hover { border-color: var(--pop); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bc-main { background: #fff; border-color: #fff; color: #0F172A; }
  :root:not([data-theme="light"]) .bc-main p { color: #475569; }
  :root:not([data-theme="light"]) .bc-main .bc-pair { background: #F1F5F9; border-color: #E2E8F0; color: #0F172A; }
  :root:not([data-theme="light"]) .bc-main .bc-pair b { background: #fff; border-color: #E2E8F0; }
  :root:not([data-theme="light"]) .bc-main .bc-pair svg { color: #64748B; }
  :root:not([data-theme="light"]) .bc-main .bc-pair b.to { background: var(--pop); border-color: var(--pop); color: var(--pop-ink); }
}
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bc-main { grid-row: auto; grid-column: 1 / -1; }
  .bc-main .bc-pairs { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; gap: 14px; }
  .bc, .bc-main { padding: 20px; }
  .bc-main h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .bc, .bc-pair, .bc-go svg { transition: none; } }
@media (max-width: 560px) {
  .bc-main .bc-pair { font-size: 11.5px; padding: 7px 9px; gap: 6px; }
  .bc-main .bc-pair:nth-child(n+5) { display: none; }
  .bc-main .bc-pairs { gap: 8px; }
}

/* ============ PHONE: bento becomes a swipe slider ============ */
.bento-dots { display: none; }
@media (max-width: 760px) {
  .bento {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-inline: -16px; padding: 4px 16px 6px; scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .bento::-webkit-scrollbar { display: none; }
  .bc, .bc-main { flex: 0 0 82%; scroll-snap-align: start; grid-row: auto; grid-column: auto; padding: 22px; min-height: 300px; }
  .bc:hover { transform: none; }
  .bc-main h3 { font-size: 20px; }
  .bc-main .bc-ic { width: 46px; height: 46px; border-radius: 13px; }
  .bc-main .bc-ic svg { width: 22px; height: 22px; }
  .bc-main .bc-pairs { flex-direction: row; flex-wrap: wrap; }
  .bc-main .bc-pair, .bc-main .bc-pair:nth-child(n+5) { font-size: 11.5px; padding: 7px 9px; gap: 7px; }
  .bc-main .bc-pair:nth-child(n+4) { display: none; }
  .bento-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
  .bento-dots button { appearance: none; border: 0; padding: 0; width: 8px; height: 8px; border-radius: 4px; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
  .bento-dots button[aria-current="true"] { width: 24px; background: var(--accent); }
}
/* phone slider: one full card at a time, centred, no peek of the next one */
@media (max-width: 760px) {
  .bento { gap: 32px; scroll-snap-type: x mandatory; }
  .bc, .bc-main { flex: 0 0 calc(100vw - 32px); max-width: calc(100vw - 32px); scroll-snap-align: center; scroll-snap-stop: always; }
}
@media (max-width: 760px) { .bento { margin-inline: -20px; padding-inline: 16px; scroll-padding-inline: 16px; } }

/* ============ CATEGORY SHOWCASE (tabs + panel) ============ */
.sx { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: stretch; }
.sx-tabs { display: flex; flex-direction: column; gap: 8px; }
.sx-tab {
  appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.sx-tab .i { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); transition: background .15s, color .15s; }
.sx-tab .i svg { width: 20px; height: 20px; }
.sx-tab .tx { min-width: 0; }
.sx-tab b { display: block; font: 700 15px/1.3 var(--font-display); }
.sx-tab small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sx-tab .ch { margin-left: auto; display: grid; color: var(--muted); }
.sx-tab .ch svg { width: 16px; height: 16px; }
.sx-tab:hover { border-color: var(--accent); }
.sx-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-tab[aria-selected="true"] { background: #1E1B4B; border-color: #1E1B4B; color: #fff; }
.sx-tab[aria-selected="true"] small { color: #C7CBEA; }
.sx-tab[aria-selected="true"] .i { background: var(--pop); color: var(--pop-ink); }
.sx-tab[aria-selected="true"] .ch { color: var(--pop); }

.sx-panel {
  border-radius: 22px; padding: 30px; background: var(--surface); border: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 26px; animation: sx-in .25s ease;
}
.sx-panel[hidden] { display: none; }
@keyframes sx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sx-body { display: flex; flex-direction: column; min-width: 0; }
.sx-panel h3 { margin: 0; font: 800 26px/1.2 var(--font-display); }
.sx-body > p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 46ch; }
.sx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.sx-t {
  display: flex; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--band); text-decoration: none; color: var(--ink); font: 800 12.5px/1 var(--font-display); letter-spacing: .03em;
  transition: border-color .15s, background .15s, transform .15s;
}
.sx-t span { display: flex; align-items: center; gap: 7px; }
.sx-t svg { width: 13px; height: 13px; color: var(--muted); }
.sx-t em { font-style: normal; color: var(--accent); }
.sx-t:hover { border-color: var(--accent); background: var(--surface); transform: translateY(-1px); }
.sx-t:focus-visible, .sx-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-go {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding: 13px 22px; border-radius: 999px;
  background: var(--pop); color: var(--pop-ink); text-decoration: none; font: 600 15px/1 var(--font-body);
}
.sx-grid + .sx-go { margin-top: 22px; }
.sx-go svg { width: 15px; height: 15px; transition: transform .2s; }
.sx-go:hover { background: var(--pop-hover); }
.sx-go:hover svg { transform: translateX(3px); }

.sx-art { position: relative; min-height: 240px; border-radius: 18px; background: #1E1B4B; overflow: hidden; }
.sx-art .f {
  position: absolute; width: 86px; height: 104px; border-radius: 12px 22px 12px 12px; display: grid; place-items: end center; padding-bottom: 14px;
  font: 800 14px/1 var(--font-display); letter-spacing: .05em; clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%);
}
.sx-art .f1 { left: 24px; top: 30px; background: #E0E7FF; color: #1E1B4B; transform: rotate(-6deg); }
.sx-art .f2 { right: 24px; bottom: 46px; background: var(--pop); color: var(--pop-ink); transform: rotate(5deg); }
.sx-art .ar { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -30px 0 0 -22px; border-radius: 50%; background: #fff; color: #1E1B4B; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); }
.sx-art .ar svg { width: 20px; height: 20px; }
.sx-art .cap { position: absolute; left: 10px; right: 10px; bottom: 14px; text-align: center; color: #C7CBEA; font-size: 12px; line-height: 1.4; }

/* dark mode: the navy pieces turn white, the yellow stays */
:root[data-theme="dark"] .sx-tab[aria-selected="true"] { background: #fff; border-color: #fff; color: #0F172A; }
:root[data-theme="dark"] .sx-tab[aria-selected="true"] small { color: #475569; }
:root[data-theme="dark"] .sx-art { background: #fff; }
:root[data-theme="dark"] .sx-art .f1 { background: #E0E7FF; }
:root[data-theme="dark"] .sx-art .ar { background: #1E1B4B; color: #fff; }
:root[data-theme="dark"] .sx-art .cap { color: #475569; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sx-tab[aria-selected="true"] { background: #fff; border-color: #fff; color: #0F172A; }
  :root:not([data-theme="light"]) .sx-tab[aria-selected="true"] small { color: #475569; }
  :root:not([data-theme="light"]) .sx-art { background: #fff; }
  :root:not([data-theme="light"]) .sx-art .ar { background: #1E1B4B; color: #fff; }
  :root:not([data-theme="light"]) .sx-art .cap { color: #475569; }
}

@media (max-width: 1100px) { .sx { grid-template-columns: 260px minmax(0, 1fr); } .sx-panel { grid-template-columns: 1fr; } .sx-art { display: none; } }
@media (max-width: 860px) {
  .sx { grid-template-columns: 1fr; gap: 16px; }
  .sx-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px; scroll-padding-inline: 20px; }
  .sx-tabs::-webkit-scrollbar { display: none; }
  .sx-tab { flex: none; width: auto; padding: 8px 16px 8px 8px; border-radius: 999px; gap: 10px; }
  .sx-tab small, .sx-tab .ch { display: none; }
  .sx-tab .i { width: 32px; height: 32px; border-radius: 50%; }
  .sx-tab .i svg { width: 16px; height: 16px; }
  .sx-tab b { font-size: 14px; white-space: nowrap; }
  .sx-panel { padding: 22px; }
  .sx-panel h3 { font-size: 22px; }
  .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) { .sx-t { padding: 11px 10px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .sx-panel { animation: none; } .sx-t, .sx-go svg { transition: none; } }
