/*
 * Around the Club  -  page-scoped styles. Loaded only on /around-the-club/
 * (post 51295) via the conditional enqueue in inc/around-the-club.php.
 * All design tokens are declared on .atc-page so they cannot leak into the
 * sitewide cascade.
 *
 * V3 redesign (2026-08-20), sourced from a user-supplied HTML mockup:
 * editorial directory instead of a card wall. Numbered sections with a rule,
 * a featured pick beside a numbered restaurant list, and a bordered museum
 * grid. Hero styles moved to dist/css/page-hero.css (the reusable
 * acf/page-hero block). All icons are inline SVG  -  no emoji anywhere.
 *
 * Sitewide non-negotiable honoured: any element with the burgundy background
 * uses white text.
 */

/* -------------------------------------------------------------------------- */
/*  Design tokens                                                             */
/* -------------------------------------------------------------------------- */

.atc-page {
  --atc-burgundy: #820d13;
  --atc-burgundy-dark: #65070c;
  --atc-cream: #f5f0e8;
  --atc-card: #fffaf2;
  --atc-card-tint: #efe5d8;
  --atc-gold: #d7b46a;
  --atc-text: #241716;
  --atc-muted: #5f5250;
  --atc-line: #d9cbbd;
  --atc-line-strong: #bda893;
  --atc-sans: "Quattrocento Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --atc-shadow-soft: 0 8px 20px rgba(50, 30, 18, 0.08);
  --atc-shadow-lift: 0 16px 34px rgba(60, 32, 18, 0.14);

  background:
    linear-gradient(rgba(130, 13, 19, 0.025) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--atc-cream);
  color: var(--atc-text);
  padding-bottom: 56px;
  /* Body copy inherits the Cosmos sitewide font (Quattrocento); headings keep
     Sorts Mill Goudy from the sitewide theme.json registration. */
}

/* Inline SVG icon sizing. Icons inherit currentColor. */
.atc-page .atc-ic {
  display: inline-flex;
  flex: none;
}
.atc-page .atc-ic svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* JS filter hook: rows/cards/sections hidden by the toolbar filters. */
.atc-page [data-atc-hidden] {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/*  TOOLBAR  -  filter pills + result count                                    */
/* -------------------------------------------------------------------------- */

.atc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* The standard hero (acf/page-hero) carries no bottom margin, matching the
     Bulletin; the toolbar provides the breathing room below it instead. */
  margin: 32px 0 10px;
}

.atc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The pills are <button>s, and Neve paints EVERY button:hover/:focus with
   its primary maroon background + white ink at (0,1,1) specificity, which
   beats a single class. That is what made a hovered inactive pill turn
   solid maroon under our maroon ink (invisible text). Per the standing
   feedback_neve_button_cascade lesson, every property is pinned with
   !important in EVERY state so the Neve cascade can never repaint a pill. */
.atc-filter {
  background: transparent !important;
  color: var(--atc-text) !important;
  border: 1px solid var(--atc-line-strong) !important;
  padding: 9px 13px 8px !important;
  border-radius: 2px !important;
  font-family: var(--atc-sans);
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.04em;
  cursor: pointer;
}
/* Inactive pills: background STAYS light in every state; ink goes maroon.
   The active pill is excluded so this can never paint maroon-on-maroon. */
.atc-filter:not(.is-active):hover,
.atc-filter:not(.is-active):focus,
.atc-filter:not(.is-active):focus-visible,
.atc-filter:not(.is-active):active {
  background: transparent !important;
  border-color: var(--atc-burgundy) !important;
  color: var(--atc-burgundy) !important;
}
/* Active pill: burgundy background = white text (sitewide NON-NEGOTIABLE
   contrast rule) in EVERY state. Hover darkens the background instead of
   ever touching the ink. */
.atc-filter.is-active {
  border-color: var(--atc-burgundy) !important;
  background: var(--atc-burgundy) !important;
  color: #ffffff !important;
}
.atc-filter.is-active:hover,
.atc-filter.is-active:focus,
.atc-filter.is-active:focus-visible,
.atc-filter.is-active:active {
  border-color: var(--atc-burgundy-dark) !important;
  background: var(--atc-burgundy-dark) !important;
  color: #ffffff !important;
}

.atc-count {
  font-family: var(--atc-sans);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--atc-muted);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/*  SECTION HEAD  -  index, icon circle, heading, rule, note                   */
/* -------------------------------------------------------------------------- */

.atc-section {
  margin: 40px 0 0;
}

.atc-sec-head {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
}

.atc-sec-index {
  font-family: var(--atc-sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--atc-burgundy);
  font-weight: 700;
}

.atc-sec-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--atc-card-tint);
  color: var(--atc-burgundy);
  flex: none;
}

.atc-sec-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
  color: var(--atc-text);
  white-space: nowrap;
}

.atc-sec-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--atc-gold), var(--atc-line) 60%, transparent);
}

.atc-sec-note {
  font-family: var(--atc-sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--atc-muted);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/*  RESTAURANTS  -  featured pick beside a numbered editorial list             */
/* -------------------------------------------------------------------------- */

.atc-rest-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.9fr);
  border-top: 1px solid var(--atc-line-strong);
  border-bottom: 1px solid var(--atc-line-strong);
  background: rgba(255, 250, 243, 0.42);
}

.atc-feature {
  min-height: 410px;
  padding: 38px;
  border-right: 1px solid var(--atc-line-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: atc-fadeIn 0.65s ease both;
}

.atc-kicker {
  display: block;
  font-family: var(--atc-sans);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--atc-burgundy);
  font-weight: 700;
}

.atc-feature-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--atc-card-tint);
  color: var(--atc-burgundy);
}
.atc-feature-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

.atc-feature h3 {
  margin: 12px 0;
  max-width: 520px;
  font-size: 40px;
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--atc-text);
}

.atc-feature > div > p {
  margin: 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.62;
  color: var(--atc-muted);
}

.atc-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-family: var(--atc-sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--atc-muted);
}
.atc-meta b {
  color: var(--atc-text);
  font-weight: 700;
}

.atc-feature-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Buttons. Plain anchors (not Gutenberg buttons), so no Neve/Kadence button
   cascade applies. Burgundy background = white text, rest AND hover. */
.atc-btn-primary,
.atc-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 2px;
  font-family: var(--atc-sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.atc-btn-primary,
.atc-btn-primary:link,
.atc-btn-primary:visited {
  background: var(--atc-burgundy);
  color: #ffffff !important;
  border: 1px solid var(--atc-burgundy);
}
.atc-btn-primary:hover,
.atc-btn-primary:focus-visible {
  background: var(--atc-burgundy-dark);
  color: #ffffff !important;
  transform: translateY(-1px);
}
.atc-btn-ghost,
.atc-btn-ghost:link,
.atc-btn-ghost:visited {
  border: 1px solid var(--atc-line-strong);
  background: transparent;
  color: var(--atc-text) !important;
}
.atc-btn-ghost:hover,
.atc-btn-ghost:focus-visible {
  border-color: var(--atc-burgundy);
  color: var(--atc-burgundy) !important;
}
.atc-btn-primary .atc-ic svg,
.atc-btn-ghost .atc-ic svg {
  width: 14px;
  height: 14px;
}

/* Numbered list rows */
.atc-rows {
  display: flex;
  flex-direction: column;
}

.atc-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 19px 22px;
  min-height: 82px;
  border-bottom: 1px solid var(--atc-line);
  text-decoration: none !important;
  animation: atc-fadeIn 0.65s ease both;
  transition: background-color 0.16s ease;
}
.atc-row:last-child {
  border-bottom: 0;
}
.atc-row:hover,
.atc-row:focus-visible {
  background: var(--atc-card);
}

.atc-ordinal {
  font-family: var(--atc-sans);
  font-size: 11px;
  line-height: 1.4;
  color: var(--atc-muted);
  padding-top: 3px;
}

.atc-row h4 {
  margin: 4px 0;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--atc-text);
}
.atc-row:hover h4 {
  color: var(--atc-burgundy);
}

.atc-row p {
  margin: 0;
  color: var(--atc-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.atc-arrow {
  color: var(--atc-burgundy);
  padding-top: 10px;
}
.atc-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Staggered arrival for the first rows. */
.atc-rows .atc-row:nth-child(1) { animation-delay: 0.05s; }
.atc-rows .atc-row:nth-child(2) { animation-delay: 0.10s; }
.atc-rows .atc-row:nth-child(3) { animation-delay: 0.15s; }
.atc-rows .atc-row:nth-child(4) { animation-delay: 0.20s; }
.atc-rows .atc-row:nth-child(5) { animation-delay: 0.25s; }
.atc-rows .atc-row:nth-child(6) { animation-delay: 0.30s; }
.atc-rows .atc-row:nth-child(7) { animation-delay: 0.35s; }
.atc-rows .atc-row:nth-child(8) { animation-delay: 0.40s; }
.atc-rows .atc-row:nth-child(9) { animation-delay: 0.45s; }

/* -------------------------------------------------------------------------- */
/*  MUSEUMS & ATTRACTIONS  -  bordered grid                                    */
/* -------------------------------------------------------------------------- */

.atc-museums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--atc-line-strong);
  border-left: 1px solid var(--atc-line-strong);
}

.atc-museum {
  min-height: 178px;
  padding: 24px 26px 22px;
  border-right: 1px solid var(--atc-line-strong);
  border-bottom: 1px solid var(--atc-line-strong);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  text-decoration: none !important;
  background: rgba(255, 250, 243, 0.28);
  animation: atc-fadeIn 0.65s ease both;
  transition: background-color 0.16s ease;
}
a.atc-museum:hover,
a.atc-museum:focus-visible {
  background: var(--atc-card);
}

.atc-museum h3 {
  margin: 10px 0 9px;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 500;
  color: var(--atc-text);
}
a.atc-museum:hover h3 {
  color: var(--atc-burgundy);
}

.atc-museum p {
  margin: 0;
  color: var(--atc-muted);
  line-height: 1.52;
  font-size: 14px;
  max-width: 430px;
}

.atc-distance {
  text-align: right;
  font-family: var(--atc-sans);
  font-size: 11px;
  line-height: 1.35;
  color: var(--atc-muted);
  white-space: nowrap;
}
.atc-distance .atc-ic {
  color: var(--atc-burgundy);
  justify-content: flex-end;
  margin-top: 6px;
}
.atc-distance .atc-ic svg {
  width: 14px;
  height: 14px;
}

/* -------------------------------------------------------------------------- */
/*  FOOTNOTE                                                                   */
/* -------------------------------------------------------------------------- */

.atc-footnote {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--atc-line);
  color: var(--atc-muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}
.atc-footnote a {
  color: var(--atc-burgundy);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/*  ANIMATIONS                                                                 */
/* -------------------------------------------------------------------------- */

@keyframes atc-fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------------- */
/*  RESPONSIVE                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .atc-rest-layout {
    grid-template-columns: 1fr;
  }
  .atc-feature {
    border-right: 0;
    border-bottom: 1px solid var(--atc-line-strong);
    min-height: unset;
  }
  .atc-museums {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .atc-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .atc-sec-head {
    grid-template-columns: auto auto 1fr;
  }
  .atc-sec-rule {
    display: none;
  }
  .atc-sec-note {
    grid-column: 1 / -1;
    white-space: normal;
  }
  .atc-sec-head h2 {
    font-size: 24px;
    white-space: normal;
  }
  .atc-feature {
    padding: 26px 20px;
  }
  .atc-feature h3 {
    font-size: 32px;
  }
  .atc-row {
    padding: 17px 16px;
    grid-template-columns: 28px 1fr auto;
  }
  .atc-museum {
    padding: 22px 18px;
  }
  .atc-footnote {
    flex-direction: column;
  }
}

/* -------------------------------------------------------------------------- */
/*  ACCESSIBILITY  -  honour user motion preferences                           */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .atc-feature,
  .atc-row,
  .atc-museum {
    animation: none !important;
  }
  .atc-row,
  .atc-museum,
  .atc-filter,
  .atc-btn-primary,
  .atc-btn-ghost {
    transition: none !important;
  }
  .atc-btn-primary:hover {
    transform: none;
  }
}
