:root {
  /* Purple palette — deep to light */
  --bg-0: #0b0613;
  --bg-1: #140926;
  --bg-2: #1c0f33;
  --ink: #f5eefb;
  --ink-soft: #d8cae6;
  --ink-mute: #a290b8;
  --border: rgba(183, 148, 244, 0.18);
  --border-strong: rgba(183, 148, 244, 0.35);

  /* Tile shades — 10 distinct purples / lavenders */
  --p1: #2a0f4a; /* deep indigo violet */
  --p2: #3d1466; /* royal violet */
  --p3: #5b21b6; /* electric purple */
  --p4: #6d28d9; /* vivid violet */
  --p5: #7c3aed; /* iris */
  --p6: #8b5cf6; /* amethyst */
  --p7: #a78bfa; /* light orchid */
  --p8: #b794f4; /* lavender */
  --p9: #c4b5fd; /* soft lavender */
  --p10: #d8b4fe; /* pale wisteria */

  --shadow-purple: 0 18px 50px -20px rgba(124, 58, 237, 0.55);
  --shadow-purple-hover: 0 28px 70px -18px rgba(167, 139, 250, 0.7);

  --font-display: 'Cabinet Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(
      ellipse at 20% 0%,
      rgba(124, 58, 237, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(ellipse at 85% 35%, rgba(91, 33, 182, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 60%, var(--bg-0) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* Subtle resistance grid */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(183, 148, 244, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 148, 244, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    600px circle at 50% 110%,
    rgba(167, 139, 250, 0.12),
    transparent 60%
  );
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 48px) 64px;
}

/* HERO */
.hero {
  text-align: center;
  padding: clamp(24px, 6vw, 64px) 0 clamp(28px, 5vw, 48px);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--p8);
}
.brand-tag {
  font-weight: 500;
}

.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #d8b4fe 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(167, 139, 250, 0.18);
}

.byline {
  margin: 18px 0 0;
  color: var(--ink-mute);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.byline .sep {
  margin: 0 10px;
  opacity: 0.5;
}
.byline a {
  color: var(--p9);
  text-decoration: none;
  border-bottom: 1px dashed rgba(196, 181, 253, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.byline a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.quote {
  margin: clamp(28px, 5vw, 44px) auto 0;
  max-width: 680px;
  padding: 0 16px;
  font-style: italic;
  color: var(--ink-soft);
}
.quote p {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
  margin: 0;
}
.quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: clamp(28px, 5vw, 48px);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 220px;
  padding: 20px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--tile-color, var(--p4));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-purple);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s;
}

.tile::before {
  /* glossy highlight */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
      120% 80% at 0% 0%,
      rgba(255, 255, 255, 0.18),
      transparent 55%
    ),
    radial-gradient(80% 60% at 100% 100%, rgba(0, 0, 0, 0.35), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.tile::after {
  /* subtle grain / scanline */
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0 1px,
    transparent 1px 4px
  );
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-purple-hover);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.tile .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  opacity: 0.75;
}
.tile .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 36px 0 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.tile .arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s;
}
.tile:hover .arrow {
  transform: rotate(-45deg);
  background: rgba(255, 255, 255, 0.2);
}
.tile .arrow svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.tile .desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  /* Hidden by default — revealed on hover/focus */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease 0.05s, margin-top 0.3s;
}
.tile:hover .desc,
.tile:focus-visible .desc {
  max-height: 260px;
  opacity: 1;
  margin-top: 14px;
}

/* Light-shade tiles need dark text */
.tile.light {
  color: #1a0b2e;
}
.tile.light .desc {
  color: rgba(26, 11, 46, 0.78);
}
.tile.light .arrow {
  background: rgba(26, 11, 46, 0.15);
}
.tile.light .arrow svg {
  color: #1a0b2e;
}
.tile.light:hover .arrow {
  background: rgba(26, 11, 46, 0.28);
}

/* FOOTER */
.footer {
  margin-top: clamp(48px, 8vw, 80px);
  text-align: center;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.quote--dez p {
  font-size: clamp(18px, 2.2vw, 24px);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(90deg, #c4b5fd, #f5eefb, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footnote {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}

/* Mobile tweaks: show descriptions inline since hover doesn't exist */
/* Touch devices: no hover — show descriptions inline */
@media (hover: none), (pointer: coarse) {
  .tile .desc {
    max-height: 240px;
    opacity: 0.94;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tile {
    padding: 16px;
    min-height: 200px;
  }
  .tile .name {
    font-size: 15px;
    margin-top: 28px;
  }
  .tile .desc {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
