/* Fun hub (/fun/, src/pages/fun.mjs, owner 2026-11-25): a short title, SB, Unfiltered as one big photo card, then
   Quizzes, Games and Maps & history as photo cards with the words on the photo (the /outdoors/ bento look).
   Class prefix fn-. */
body.fn-page { position: relative; }
body.fn-page::after { position: absolute; } /* the paper grain covers the whole page, as on /outdoors/ */
.ph.fn-head { padding-bottom: var(--sp-24); background: var(--paper); }
.ph.fn-head h1 { margin-bottom: var(--sp-12); max-width: none; }
.ph.fn-head .lede { margin: 0; }

/* The lead: the South Coast from the air, the five towns of the map on it, and the way in */
.fn-top { padding: 0 0 var(--sp-8); }
.fn-lead { position: relative; }
.fn-lead > a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(380px, 36vw, 460px); overflow: hidden; border-radius: var(--radius); background: var(--night-2); color: #fff; text-decoration: none; isolation: isolate; box-shadow: 0 1px 2px rgba(24, 34, 46, .08); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.fn-lead > a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.fn-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.fn-lead > a:hover img { transform: scale(1.02); }
.fn-lead > a::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to right, rgba(8, 14, 24, .88) 0%, rgba(8, 14, 24, .66) 38%, rgba(8, 14, 24, .1) 70%, rgba(8, 14, 24, 0) 100%); }
.fn-lt { display: grid; justify-items: start; gap: var(--sp-12); max-width: 31em; padding: var(--sp-32); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.fn-lh { font: 400 var(--h2-page)/1.05 var(--serif); letter-spacing: -.005em; }
.fn-ll { font-size: 1.12rem; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.fn-lt .btn { margin-top: var(--sp-4); text-shadow: none; }
.fn-towns { position: absolute; top: var(--sp-24); right: var(--sp-24); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-8); max-width: 46%; }
.fn-towns i { font: 400 1rem/1.1 var(--serif); font-style: normal; padding: var(--sp-4) var(--sp-8); border-radius: var(--r-tag); color: var(--ti); background: color-mix(in srgb, var(--tf) 38%, #fff); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); text-shadow: none; }
.fn-towns i:nth-child(2n) { transform: rotate(-2deg); }
.fn-towns i:nth-child(3n) { transform: rotate(2deg); }
.fn-lead .pcred { top: auto; bottom: var(--sp-12); right: var(--sp-12); left: auto; z-index: 2; }
.fn-lead .pcred-t { top: auto; bottom: 34px; }

/* The groups */
.fn-sec { padding: var(--sp-32) 0 0; }
.fn-h { font-size: var(--h2-sec); line-height: 1.1; margin: 0 0 var(--sp-16); }
.fn-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-16); grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.fn-card { position: relative; min-width: 0; display: flex; }
.fn-card > a { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--night-2); color: #fff; text-decoration: none; isolation: isolate; box-shadow: 0 1px 2px rgba(24, 34, 46, .08); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.fn-card > a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.fn-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.fn-card > a:hover img { transform: scale(1.03); }
.fn-card > a::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 14, 24, .9) 0%, rgba(8, 14, 24, .62) 34%, rgba(8, 14, 24, .12) 62%, rgba(8, 14, 24, 0) 78%); }
.fn-card .fn-old { filter: sepia(.15); }
/* a card with no photo (Giveaways) keeps its words on the dark ground with a warm glow */
.fn-card.no-ph > a { background: radial-gradient(90% 80% at 85% 10%, rgba(239, 161, 58, .45), transparent 70%), var(--night-2); }
.fn-t { display: grid; gap: var(--sp-4); padding: var(--sp-20); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.fn-t b { font: 400 var(--h3-card)/1.1 var(--serif); }
.fn-t small { font-size: .9rem; line-height: 1.35; color: rgba(255, 255, 255, .88); }
.fn-quiz .fn-card > a { aspect-ratio: 16 / 9; }
.fn-quiz .fn-t b { font-size: var(--h2-sec); }
.fn-quiz .fn-t small { font-size: 1rem; }
.fn-games .fn-card > a { aspect-ratio: 4 / 5; }
.fn-card .pcred { top: var(--sp-12); right: var(--sp-12); bottom: auto; left: auto; z-index: 2; }
.fn-card .pcred-t { top: 34px; bottom: auto; }

.fn-end { padding-top: var(--sp-32); }
.fn-more { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.fn-more a { font-weight: 600; color: var(--tile); text-decoration: none; white-space: nowrap; }
.fn-more a:hover { text-decoration: underline; }
.fn-end details.fine-print { margin-top: var(--sp-24); }

@media (min-width: 900px) {
  .fn-sec { padding-top: var(--sp-48); }
  .fn-h { margin-bottom: var(--sp-24); }
  .fn-end { padding-top: var(--sp-48); }
  .fn-lt { padding: var(--sp-48); }
}
@media (max-width: 899px) {
  .fn-games .fn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-games .fn-card > a { aspect-ratio: 4 / 3; }
}
@media (max-width: 699px) {
  .ph.fn-head { padding-bottom: var(--sp-16); }
  .ph.fn-head .lede { font-size: 1rem; }
  /* phones: the lead's words sit at the foot under an upward scrim, the towns across the top of the photo */
  .fn-lead > a { min-height: 440px; } /* sp-ok: the lead card's phone height */
  .fn-lead > a::after { background: linear-gradient(to top, rgba(8, 14, 24, .92) 0%, rgba(8, 14, 24, .78) 40%, rgba(8, 14, 24, .2) 70%, rgba(8, 14, 24, .05) 100%); }
  .fn-lt { padding: var(--sp-20); gap: var(--sp-8); }
  .fn-lh { font-size: var(--h2-sec); }
  .fn-ll { font-size: 1rem; }
  .fn-towns { top: var(--sp-16); left: var(--sp-16); right: var(--sp-16); max-width: none; justify-content: flex-start; gap: var(--sp-4); }
  .fn-towns i { font-size: .82rem; }
  .fn-lead .pcred { top: var(--sp-12); bottom: auto; }
  .fn-lead .pcred-t { top: 34px; bottom: auto; }
  .fn-towns { right: 48px; } /* sp-ok: clear of the credit button */
  /* two across; an odd count lets the first card run the full width */
  .fn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-12); }
  .fn-quiz .fn-grid { grid-template-columns: 1fr; }
  .fn-grid > li:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .fn-card > a, .fn-games .fn-card > a { aspect-ratio: 4 / 5; }
  .fn-quiz .fn-card > a, .fn-grid > li:first-child:nth-last-child(odd) > a { aspect-ratio: 16 / 9; }
  .fn-t { padding: var(--sp-12); gap: 2px; }
  .fn-t b, .fn-quiz .fn-t b { font-size: 1.12rem; }
  .fn-quiz .fn-t b, .fn-grid > li:first-child:nth-last-child(odd) .fn-t b { font-size: 1.3rem; }
  .fn-t small, .fn-quiz .fn-t small { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fn-lead > a, .fn-card > a, .fn-lead img, .fn-card img { transition: none; }
}
/* A page with no picture of its own (Giveaways): one ruled line under its group's cards */
.fn-also { margin: var(--sp-16) 0 0; max-width: none; }
.fn-also a { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-4) var(--sp-12); padding: var(--sp-12) 0; border-block: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.fn-also b { font: 400 var(--h2-card)/1.2 var(--serif); }
.fn-also span { font-size: .9rem; line-height: 1.4; color: var(--ink-3); }
.fn-also .fn-go { margin-left: auto; color: var(--tile); transition: transform .2s; }
.fn-also a:hover b { color: var(--tile); }
.fn-also a:hover .fn-go { transform: translateX(3px); }
/* Credit notes on phones: the button keeps its corner and the note opens across the card's own width, so a left-column
   card never pushes it off the screen (the /local/ cards' fix; Neon review 2026-11-25) */
@media (max-width: 699px) {
  .fn-card .pcred, .fn-lead .pcred { top: var(--sp-12); left: var(--sp-12); right: var(--sp-12); bottom: auto; pointer-events: none; }
  .fn-card .pcred summary, .fn-lead .pcred summary { margin-left: auto; pointer-events: auto; }
  .fn-card .pcred-t, .fn-lead .pcred-t { top: 34px; bottom: auto; left: 0; right: 0; width: auto; max-width: none; pointer-events: auto; }
}
