/* ==========================================================================
   glass.css — glassmorphism: the surface style for tiles and overlays.
   Rule of thumb: ≤ ~8 blurred layers visible at once; text-heavy tiles use
   --glass-bg-text (stronger tint) so contrast stays AA.
   ========================================================================== */
.tile {
  position: relative; border-radius: var(--r-tile); padding: clamp(20px, 3vw, 30px);
  background: var(--glass-bg-text);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  overflow: hidden; min-width: 0;
  transition: transform .45s var(--ease-spring), box-shadow .35s;
}
/* light sheen sweeps across on hover */
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%); transition: transform .9s ease; }
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(15, 61, 46, .22), var(--glass-inner); }
  .tile:hover::after { transform: translateX(120%) skewX(-18deg); }
}
.tile--airy { background: var(--glass-bg); }                 /* decorative tiles with little text */
.tile--dark { background: var(--glass-dark); color: var(--cream); border-color: rgba(255, 255, 255, .22); box-shadow: 0 10px 36px rgba(15, 61, 46, .32), inset 0 1px 0 rgba(255, 255, 255, .18); }
.tile--dark h2, .tile--dark h3, .tile--dark h4 { color: var(--cream); }
.tile--dark p, .tile--dark .lead { color: rgba(255, 255, 255, .9); }
.tile--dark a:not(.btn):not(.btn-liquid) { color: var(--green); }   /* links inside mint tiles; buttons keep their own colours */
.tile--flush { padding: 0; }
.tile h3 { margin-bottom: .3em; }
.tile p:last-child { margin-bottom: 0; }

/* chips inside tiles */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chip { padding: 7px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .55); border: 1px solid rgba(15, 61, 46, .18); font-size: .9rem; font-weight: 500; color: var(--green); }
.tile--dark .chips li { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: var(--cream); }

/* fallbacks ------------------------------------------------------------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tile { background: rgba(255, 255, 255, .96); }
  .tile--dark { background: #EAF4EE; }
}
@media (prefers-reduced-transparency: reduce) {
  .tile, .tile--airy { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tile--dark { background: #EAF4EE; }
}
