/* CherryBytes · All apps page (loaded after app.css, pages.css and blog.css for .filters)
   Type follows the site: global h1, .label for mono labels, Bricolage headings, DM Sans body. */

/* Hero */
.apps-hero { position: relative; overflow: hidden; background-color: var(--navy); background-image: radial-gradient(640px 480px at 82% 30%, rgba(215, 38, 77, .22), rgba(215, 38, 77, 0) 70%); padding-bottom: clamp(48px, 6vw, 80px); }
.apps-hero .idx b { color: var(--red); }
.apps-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: center; margin-top: clamp(24px, 3.5vw, 44px); }
.apps-hero .eyebrow { display: block; color: var(--red); margin-bottom: 18px; }
.apps-hero h1 { max-width: 12ch; margin-bottom: 22px; }
.apps-hero .lede { max-width: 33em; }
.apps-hero-ctas { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; }
.hero-link { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hero-link:hover { color: #fff; text-decoration-color: #fff; }
.apps-hero-stats { list-style: none; margin: 40px 0 0; padding: 0; max-width: 560px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, .12); }
.apps-hero-stats li { padding: 20px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.apps-hero-stats li:first-child { padding-left: 0; }
.apps-hero-stats li + li { border-left: 1px solid rgba(255, 255, 255, .12); }
.apps-hero-stats b { font: 800 clamp(30px, 3vw, 40px)/1 var(--display); letter-spacing: -0.04em; color: #fff; }
.apps-hero-stats span { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #9AA3B8; }

.apps-hero-art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 14px); width: 100%; max-width: 440px; justify-self: center; transform: rotate(-5deg); }
.apps-hero-art .tile { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; animation: tile-float 6s ease-in-out infinite; }
.apps-hero-art .tile:nth-child(even) { animation-delay: -3s; }
.apps-hero-art .tile img { width: 50%; height: auto; border-radius: 12px; }
.apps-hero-art .tile .mono { width: 50%; aspect-ratio: 1; display: grid; place-items: center; background: var(--red); color: #fff; border-radius: 12px; font: 800 clamp(15px, 1.5vw, 20px)/1 var(--display); }
.apps-hero-art .tile i { font: 500 10px/1 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #9AA3B8; }
.apps-hero-art .tile em { position: absolute; top: 9px; right: 9px; font: 600 10px/1 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; background: var(--red); color: #fff; padding: 3px 6px; border-radius: 2px; }
.apps-hero-art .tile.center { background: var(--red); border-color: var(--red); box-shadow: 0 24px 48px rgba(215, 38, 77, .35); gap: 4px; }
.apps-hero-art .tile.center b { font: 800 clamp(44px, 4.6vw, 64px)/.9 var(--display); letter-spacing: -0.05em; color: #fff; }
.apps-hero-art .tile.center small { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
@keyframes tile-float { 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .apps-hero-art .tile { animation: none; } }

/* Filters: category tabs, then platform switch + count */
.apps-all { padding: 40px 0 0; }
.apps-filterbar { display: flex; flex-direction: column; gap: 12px; }
.apps-filterbar .filters { padding: 0; }
.apps-filterbar .filters button { min-height: 44px; }
.filters .count:empty { display: none; }
.apps-filterbar-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.platform-switch { display: inline-flex; border: 1.5px solid var(--navy); }
.platform-switch button { font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 0 14px; min-height: 40px; border: 0; background: #fff; color: var(--navy); cursor: pointer; }
.platform-switch button + button { border-left: 1.5px solid var(--navy); }
.platform-switch button[aria-pressed="true"] { background: var(--red); color: #fff; }
.apps-showing { color: var(--muted); }

/* Cards */
.app-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.app-grid > li[hidden] { display: none; }
.apps-card { position: relative; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 24px; background: #fff; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.apps-card:hover { border-color: var(--navy); box-shadow: 0 10px 30px rgba(18, 26, 43, .08); }
.apps-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.app-icon { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.app-icon-mono { display: grid; place-items: center; background: var(--navy); color: #fff; font: 800 18px/1 var(--display); }
.app-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.app-tags span { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; white-space: nowrap; }
.app-tags .t-ai { background: var(--red); color: #fff; }
.app-tags .t-live { background: var(--navy); color: #fff; }
.app-tags .t-soon { border: 1px solid var(--line); color: var(--muted); padding: 3px 6px; }
.app-meta { color: var(--muted); }
.apps-card h2 { font: 700 clamp(20px, 2vw, 26px)/1.15 var(--display); letter-spacing: -0.02em; color: var(--navy); margin: 4px 0 0; }
.apps-card h2 a { color: inherit; text-decoration: none; }
.apps-card h2 a::after { content: ""; position: absolute; inset: 0; }
.app-fix-label { color: var(--red); font-size: 11px; }
.apps-card p { margin: 0; }
.app-fix { color: var(--navy); font-size: 16px; font-weight: 500; line-height: 1.45; }
.app-desc { color: var(--muted); font-size: 15px; line-height: 1.55; flex-grow: 1; }
.app-ctas { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 14px; min-height: 44px; }
.app-ctas a { position: relative; z-index: 1; }
.app-ctas .btn { padding: 12px 20px; }
.app-ctas .link, .apps-banner .link, .apps-empty .link { font-weight: 600; color: var(--navy); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

/* Empty state */
.apps-empty { margin-top: 20px; border: 1px dashed #C9CFDC; padding: 56px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.apps-empty[hidden] { display: none; }
.apps-empty .label { color: var(--red); }
.apps-empty h2 { font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.apps-empty p { margin: 0; color: var(--muted); }

/* Two banners */
.apps-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.apps-banner { padding: 32px; display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); }
.apps-banner .label { color: var(--red); }
.apps-banner h2 { font: 700 clamp(24px, 2.2vw, 28px)/1.1 var(--display); letter-spacing: -0.02em; color: var(--navy); }
.apps-banner p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.apps-banner .link { margin-top: 8px; align-self: flex-start; }
.apps-banner.dark { background: var(--navy); border-color: var(--navy); }
.apps-banner.dark h2, .apps-banner.dark .link { color: #fff; }
.apps-banner.dark p { color: #C9CEDA; }

@media (max-width: 900px) {
  .apps-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .apps-hero-art { justify-self: start; max-width: 360px; margin: 8px 0 0 8px; }
  .apps-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .apps-hero-stats li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .apps-hero-art { max-width: 280px; gap: 8px; }
  .apps-hero-art .tile i { font-size: 8px; }
  .apps-hero-art .tile em { font-size: 8px; top: 5px; right: 5px; }
  .apps-card, .apps-banner { padding: 20px; }
}
