/* RushMind Apps — light-to-dark app store (rushmind.co.uk/apps) */
:root {
  --color-bg-light: #ffffff;
  --color-bg-mid: #eef2f5;
  --color-bg-dark: #111013;
  --color-text: #111013;
  --color-text-muted: #475569;
  --color-text-soft: #64748b;
  --color-text-on-dark: #ffffff;
  --color-text-muted-on-dark: #c8d5dc;
  --color-text-soft-on-dark: #94a3b8;
  --color-accent: #3c3474;
  --color-accent-bright: #38bdf8;
  --color-accent-hover: #2a2358;
  --color-highlight: #1e3f48;
  --color-highlight-alt: #3c3474;
  --color-border: rgba(15, 23, 42, 0.08);
  --color-border-strong: rgba(15, 23, 42, 0.12);
  --color-border-on-dark: rgba(255, 255, 255, 0.1);
  --color-footer-bar: #3c3474;
  --font-heading: 'Sora', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-tag: 'Red Hat Text', sans-serif;
  --max-width: 1240px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.06);
  --shadow-tile: 0 8px 28px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 22px 50px rgba(15, 23, 42, 0.12);
  --shadow-card-dark: 0 14px 40px rgba(0, 0, 0, 0.28);
  --page-gradient: linear-gradient(
    180deg,
    #ffffff 0%,
    #f6f8fa 10%,
    #e4eaef 22%,
    #b8c5ce 36%,
    #6d858f 48%,
    #3d5560 56%,
    #1e3f48 64%,
    #162830 74%,
    #111013 84%,
    #0d0b0f 100%
  );
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--page-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-bright);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1001;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #111;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 max(5%, env(safe-area-inset-right)) 0 max(5%, env(safe-area-inset-left));
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-img {
  height: 36px;
  width: auto;
}

.site-header__back {
  font-family: var(--font-tag);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.site-header__back:hover {
  color: var(--color-accent);
}

/* Hero — light top of gradient */
.apps-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) max(1.5rem, 5%) clamp(1.5rem, 4vw, 2.5rem);
  background: transparent;
}

.apps-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .apps-hero__inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.5rem 3rem;
    min-height: clamp(380px, 42vw, 520px);
  }
}

.apps-hero__copy {
  position: relative;
  z-index: 2;
}

.apps-hero__mark {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  color: var(--color-highlight);
}

.apps-hero__mark svg {
  width: 100%;
  height: 100%;
}

.hero-display {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.hero-display__line {
  display: block;
}

.hero-display__highlight {
  display: inline-block;
  margin: 0.12em 0;
  padding: 0.06em 0.28em 0.12em;
  background: var(--color-highlight);
  color: #fff;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-display__highlight--alt {
  background: var(--color-highlight-alt);
  color: #fff;
}

.apps-hero__lead {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* Isometric grid */
.hero-isometric {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  overflow: hidden;
}

@media (min-width: 900px) {
  .hero-isometric {
    justify-content: flex-end;
    min-height: 420px;
    overflow: visible;
  }
}

.hero-isometric__stage {
  position: relative;
  width: min(100%, 560px);
  height: min(72vw, 420px);
  perspective: 900px;
  perspective-origin: 42% 48%;
}

@media (min-width: 900px) {
  .hero-isometric__stage {
    width: 620px;
    height: 480px;
    perspective-origin: 38% 45%;
  }
}

.hero-isometric__grid {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(6, 72px);
  gap: 14px;
  transform: translate(-42%, -48%) rotateX(58deg) rotateZ(-38deg);
  transform-style: preserve-3d;
}

@media (min-width: 900px) {
  .hero-isometric__grid {
    grid-template-columns: repeat(7, 78px);
    gap: 16px;
    transform: translate(-38%, -50%) rotateX(58deg) rotateZ(-38deg);
  }
}

.hero-tile {
  width: 72px;
  height: 72px;
  padding: 11px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-tile);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 900px) {
  .hero-tile {
    width: 78px;
    height: 78px;
    padding: 12px;
    border-radius: 18px;
  }
}

.hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.hero-tile--soon {
  opacity: 0.55;
  background: #f8fafc;
  border: 1px dashed var(--color-border-strong);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.hero-tile--soon img {
  opacity: 0.45;
}

.hero-tile--accent {
  background: linear-gradient(145deg, #fff, #f0f4ff);
}

a.hero-tile {
  cursor: pointer;
}

a.hero-tile:hover {
  transform: translateZ(18px) scale(1.04);
  box-shadow: var(--shadow-card-hover);
}

.hero-tile__glyph {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}

.hero-tile__glyph--teal { background: linear-gradient(145deg, #1e3f48, #132e36); }
.hero-tile__glyph--purple { background: linear-gradient(145deg, #3c3474, #2a2358); }
.hero-tile__glyph--sky { background: linear-gradient(145deg, #38bdf8, #0ea5e9); }
.hero-tile__glyph--violet { background: linear-gradient(145deg, #a78bfa, #7c3aed); }
.hero-tile__glyph--slate { background: linear-gradient(145deg, #94a3b8, #64748b); }

@media (prefers-reduced-motion: reduce) {
  a.hero-tile:hover {
    transform: none;
  }
}

/* Lower section — light/mid gradient: dark readable text */
.apps-lower {
  color: var(--color-text);
}

.apps-toolbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem 0.25rem;
}

.apps-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  appearance: none;
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-text-muted);
  font-family: var(--font-tag);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: rgba(30, 63, 72, 0.45);
  background: #fff;
  color: var(--color-highlight);
  box-shadow: var(--shadow-soft);
}

.apps-toolbar__count {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* App listing */
.apps-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
  min-height: 100%;
}

.app-card[hidden] {
  display: none !important;
}

a.app-card {
  color: inherit;
  text-decoration: none;
}

a.app-card:hover {
  color: inherit;
  transform: translateY(-4px);
  border-color: rgba(30, 63, 72, 0.25);
  box-shadow: var(--shadow-card-hover);
}

.app-card--soon {
  background: rgba(255, 255, 255, 0.78);
  border-style: dashed;
  border-color: var(--color-border-strong);
}

.app-card--soon:hover {
  transform: none;
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-soft);
}

.app-card__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.app-card__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.app-card__meta {
  min-width: 0;
  flex: 1;
}

.app-card__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

.app-card__publisher {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-soft);
}

.app-card__badge {
  display: inline-flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-tag);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-card__badge--live {
  background: rgba(30, 63, 72, 0.1);
  color: var(--color-highlight);
  border: 1px solid rgba(30, 63, 72, 0.22);
}

.app-card__badge--soon {
  background: #f1f5f9;
  color: var(--color-text-soft);
  border: 1px solid var(--color-border-strong);
}

.app-card__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  flex: 1;
}

.app-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-card__tag {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  font-family: var(--font-tag);
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

.app-card__cta {
  margin-top: auto;
  padding-top: 0.35rem;
  font-family: var(--font-tag);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}

a.app-card:hover .app-card__cta {
  color: var(--color-highlight);
}

.app-card--soon .app-card__cta {
  color: var(--color-text-soft);
}

/* Footer — blends into dark base */
.site-footer {
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-body);
  margin-top: auto;
}

.footer-top {
  background: transparent;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--color-border-on-dark);
  color: var(--color-text-muted-on-dark);
}

.footer-top .footer-logo {
  display: inline-block;
  color: inherit;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
}

.footer-legal a {
  color: var(--color-text-muted-on-dark);
  font-size: 0.9375rem;
}

.footer-legal a:hover {
  color: var(--color-accent-bright);
}

.footer-company {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-soft-on-dark);
}

.footer-company p {
  margin: 0.35rem 0;
}

.footer-company a {
  color: var(--color-text-muted-on-dark);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.35);
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #c8d5dc;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: #c8d5dc;
}

.footer-bottom a:hover {
  color: var(--color-accent-bright);
}

/* App detail subpages */
.app-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  color: var(--color-text-on-dark);
}

.app-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-tag);
  font-size: 0.875rem;
  color: var(--color-text-soft-on-dark);
}

.app-detail__back:hover {
  color: var(--color-accent-bright);
}

.app-detail__hero {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.app-detail__icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card-dark);
  flex-shrink: 0;
}

.app-detail__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text-on-dark);
}

.app-detail__subtitle {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted-on-dark);
}

.app-detail__panel {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-on-dark);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card-dark);
}

.app-detail__panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--color-text-on-dark);
}

.app-detail__panel p {
  margin: 0 0 1rem;
  color: var(--color-text-muted-on-dark);
}

.app-detail__panel p:last-child {
  margin-bottom: 0;
}

.app-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-tag);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--color-highlight-alt);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border-on-dark);
}

.btn--ghost:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--color-accent-bright);
}

.app-detail__note {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  font-size: 0.875rem;
  color: var(--color-text-muted-on-dark);
}

.app-detail--hub,
.app-detail--reconnect {
  background: transparent;
}
