/* ==========================================================================
   Why Somerset County — "Set for Life" section
   Loaded after css/styles.css, css/components/page-chrome.css and whichever
   components a page needs. Life is the green section: this file names the
   accent once and the shared chrome takes it from there.
   Design reference: WhySomerset_Website_2026_Life2.pdf, pages 1-5
   ========================================================================== */

:root {
  /* What page-chrome.css paints the hero rule, hero title and current
     breadcrumb with. Fun sets amber in css/fun.css. */
  --ws-section-accent: var(--ws-green-mid);
  /* The current nav item is the brighter #7ac143, not the accent: mid-green
     disappears against the green header. Measured on all five artboards. */
  --ws-section-nav: var(--ws-green);
  --ws-life-tint: #ddead4;             /* Set for Life band */
  --ws-life-btn: linear-gradient(90deg, #6ba442 0%, #e9f0e1 100%);
}

/* Life's "Learn more" is a green-to-pale gradient with dark type, the same
   shape as Fun's amber one. Sampled across the pill in the comp. */
.btn-pill--life {
  background: var(--ws-life-btn);
  color: var(--ws-ink);
  padding: .42em 1.5em;
}
a:hover .btn-pill--life,
a:focus-visible .btn-pill--life { background: var(--ws-life-btn); color: var(--ws-ink); }

/* --------------------------------------------------------------------------
   1. Tinted band — the landing page's tile section
   -------------------------------------------------------------------------- */
.band--life .band__inner {
  background: var(--ws-life-tint);
  /* Bottom padding carries the tiles clear of the footer wave, which pulls
     itself up over the tint by its own height (103px at 1440). */
  padding: clamp(52px, 6.6vw, 95px) 0 clamp(120px, 15.38vw, 221px);
}

/* --------------------------------------------------------------------------
   2. Tile grid — 2 x 2, alternating narrow / wide
   Layout comes from components/experience-tiles.css; these are Life's own
   measurements off its comp — 330 : 685 of the 1015 left after the gap.
   -------------------------------------------------------------------------- */
.life-tiles {
  --tile-gap-x: clamp(16px, 1.73vw, 25px);
  --tile-gap-y: clamp(14px, 1.5vw, 22px);
  --tile-sm: 330;
  --tile-lg: 685;
  --tile-span: 1015;
}

.life-tiles .exp-card {
  min-height: 0;
  height: clamp(180px, 23.63vw, 340px);
  border-radius: 14px;
  --card-title-size: clamp(1.125rem, 1.944vw, 1.75rem);
  --card-pill-size:  clamp(.875rem, 1.25vw, 1.125rem);
}
.life-tiles .exp-card__title { letter-spacing: .02em; }

/* --------------------------------------------------------------------------
   3. Quick info — a green lead-in above a green-bulleted list
   -------------------------------------------------------------------------- */
.quick-info__label {
  margin: 0 0 clamp(8px, .97vw, 14px);
  font-weight: 700;
  color: var(--ws-green-mid);
}

/* --------------------------------------------------------------------------
   4. Section divider
   A 1px rule of the bright green, drawn across the wider 1240 column rather
   than the 1040 the copy sits in.
   -------------------------------------------------------------------------- */
.section-rule {
  width: min(100% - (var(--ws-gutter) * 2), var(--ws-wrap-wide));
  margin: clamp(30px, 4.03vw, 58px) auto;
  border: 0;
  border-top: 1px solid var(--ws-green);
}

/* --------------------------------------------------------------------------
   5. Town tabs — four buttons that swap the gallery beneath them
   Comp: 235.9 x 62.4 pills, radius 11.7, on a 31 gap across the 1040 column.
   The selected tab is the mid green with white type; the rest are a pale green
   with the mid green as type, which is also the hover state's resting colour.
   -------------------------------------------------------------------------- */
/* The tabs and the carousel are both wider than the 1040 column the copy sits
   in — 1236 and 1286 — so their block gets its own wrap rather than breaking
   out of the standard one with negative margins. */
.wrap--town { --ws-wrap: 1286px; }

/* Revised comp: the tabs grew and now span 1235 rather than the 1040 column,
   lining up with the carousel underneath them rather than with the copy above. */
.town-tabs {
  list-style: none;
  width: min(100% - (var(--ws-gutter) * 2), 1236px);
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 4.98vw, 72px);
}

.town-tabs__btn {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(50px, 4.68vw, 67px);
  padding: .3em .8em;
  border: 0;
  border-radius: clamp(8px, .81vw, 12px);
  background: #b5d2a0;
  box-shadow: 5px 5px 14px rgba(0, 0, 0, .3);
  font-family: var(--ws-font-display);
  font-size: clamp(1rem, 1.757vw, 1.58rem);
  line-height: 1.1;
  color: var(--ws-green-mid);
  text-align: center;
  cursor: pointer;
  transition: background .25s var(--ws-ease), color .25s var(--ws-ease),
              transform .25s var(--ws-ease);
}
.town-tabs__btn:hover { transform: translateY(-2px); }
.town-tabs__btn:focus-visible { outline: 3px solid var(--ws-teal); outline-offset: 3px; }

.town-tabs__btn[aria-selected="true"] {
  background: var(--ws-green-mid);
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. Town panels — one gallery each, only the selected one in the page
   -------------------------------------------------------------------------- */
.town-panel[hidden] { display: none; }

/* The revised comp drops the per-region blurb that used to sit under this. */
.town-panel__towns {
  margin: clamp(20px, 2.29vw, 33px) 0 clamp(20px, 2.36vw, 34px);
  font-weight: 700;
  text-align: center;
}

/* The client's one-line description of each region. The revised comp has no
   line here — it dropped the placeholder blurb that used to sit under the town
   names — but this is real copy, so it is back, set lighter than the names. */
.town-panel__blurb {
  margin: clamp(4px, .49vw, 7px) 0 0;
  font-size: clamp(.9375rem, 1.25vw, 1.125rem);
  line-height: 1.4;
  color: #4c5457;
  text-align: center;
}

/* A credit the comp sets over the top-right of the stage photo. */
.gallery__stage { position: relative; }
.gallery__credit {
  position: absolute;
  top: clamp(8px, 1.04vw, 15px);
  right: clamp(12px, 1.8vw, 26px);
  margin: 0;
  font-size: clamp(.75rem, .9vw, .875rem);
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

/* Comp sets this lead-in in bold italic teal, not the body ink. */
.which-town__lead-in { font-style: italic; color: var(--ws-teal-ink); }

/* Comp splits this row 400 copy / 40 gutter / 600 map across the 1040 column —
   not down the middle like the other Life rows. 600 is the map artwork's own
   width, so at 1440 it renders 1:1. */
.which-town {
  grid-template-columns: 38.462% 1fr;
  column-gap: 3.846%;
  align-items: start;
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .life-tiles .exp-card { height: clamp(190px, 52vw, 260px); }
  .town-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* This row sets its own tracks, so it needs naming here too or the map is
     squeezed into a third of a phone screen. */
  .which-town { grid-template-columns: minmax(0, 1fr); }
}
