/* =============================================================
   bgleuven — Backgammon Club Leuven
   Sober landing page in the spirit of the old WordPress site
   (twentyten theme): light grey page, white content wrapper,
   sans-serif body, blue-ish links. One column, no sidebar.

   See CLAUDE.md for project conventions.
   ============================================================= */


/* === Tokens ================================================= */
:root {
  --page-bg:   #e7e7e7;          /* light grey page, like twentyten */
  --paper:     #ffffff;          /* white content wrapper           */
  --ink:       #222222;          /* body text                       */
  --ink-muted: #666666;          /* meta lines, footer, archive nav */
  --rule:      #d9d9d9;          /* thin separator lines            */

  --link:         #0066cc;       /* twentyten link colors           */
  --link-visited: #743399;
  --link-hover:   #ff4b33;

  --champion:      #8C2C28;      /* backgammon-red, club championship */
  --champion-tint: #FAF1F0;      /* light pink resting bg             */
  --rating:        #964900;      /* bigelo-orange, club ELO           */
  --rating-tint:   #FDF5EC;      /* light warm cream resting bg       */
  --calendar:      #2F6390;      /* calendar-blue, regional BE–NL calendar */
  --calendar-tint: #EBF2F8;      /* light cool-blue resting bg        */

  --season-winter: #E8EEF4;      /* very light cool blue              */
  --season-spring: #E8F1E5;      /* very light green                  */
  --season-autumn: #F4ECDD;      /* very light amber                  */

  --content-width: 760px;
  --gutter: clamp(1.25rem, 4vw, 2rem);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}


/* === Reset & base =========================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { margin: 0 0 1em; }

a:link    { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover,
a:focus   { color: var(--link-hover); }


/* === Wrapper ================================================
   White content card, centered on the grey page, with a tiny
   top margin so the card sits visually distinct from the
   browser chrome — same idea as the twentyten #wrapper.
   ============================================================= */
.wrapper {
  max-width: var(--content-width);
  margin: 1.5rem auto;
  padding: 2.25rem var(--gutter);
  background: var(--paper);
}


/* === Site header ============================================
   Sober banner: site title and italic tagline. On the homepage
   the site title is the page's only h1 (the post title below is
   an h2); on the archive pages it is a plain <p> and the page
   title is the h1. Both look the same: everything is set on the
   .site-title and .entry-title classes, not on the tags.
   ============================================================= */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.site-logo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: block;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

/* The club name links to the homepage on every page, but keeps
   the look of plain banner text: no link colour, no underline. */
.site-title a:link,
.site-title a:visited,
.site-title a:hover,
.site-title a:focus {
  color: inherit;
  text-decoration: none;
}

.site-description {
  font-style: italic;
  color: var(--ink-muted);
  margin: 0.25rem 0 0;
}


/* === Archive nav ============================================
   Small italic, right-aligned. Sits inside the site-header as a
   third flex item; margin-left: auto pushes it to the right end
   of the masthead row. When the header wraps on narrow screens,
   the nav drops to its own line and right-aligns there via
   text-align. Used on the homepage (→ archive/) and, mirrored,
   on archive/index.html (→ back to the club page).
   ============================================================= */
.archive-nav {
  margin: 0;
  margin-left: auto;
  text-align: right;
  font-size: 0.875rem;
  font-style: italic;
}

.archive-nav a:link,
.archive-nav a:visited {
  color: var(--ink-muted);
  text-decoration: none;
}

.archive-nav a:hover,
.archive-nav a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}


/* === Announcement ===========================================
   Optional block under the masthead, shown only while the
   "Leuven Open announcement" is switched on in the CMS: a bold
   title, a short plain text and a link to the flyer. The same
   thin rule as under the masthead closes it off from the post.
   ============================================================= */
.announcement {
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.announcement__title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.4rem;
}

.announcement p {
  margin: 0 0 0.4rem;
  white-space: pre-line;         /* keep line breaks typed in the CMS */
}

.announcement p:last-child {
  margin-bottom: 0;
}


/* === Post =================================================== */
.entry-title {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 1.5rem;
}

.entry-content p {
  margin: 0 0 1.25em;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.lede {
  border-left: 3px solid var(--link);
  padding-left: 0.85rem;
  font-size: 1.1rem;
}


/* === Schedule ===============================================
   Three seasonal columns (Winter / Spring / Autumn). Each column
   has a tinted title bar (season hint colour from the tokens
   above) and a bulletless date list below on white. Below 540px
   the columns stack to a single column.
   ============================================================= */
.schedule {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  margin: 0 0 1.25em;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.season__title {
  margin: 0 0 0.5em;
  padding: 0.4em 0.6em;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.season--winter .season__title { background: var(--season-winter); }
.season--spring .season__title { background: var(--season-spring); }
.season--autumn .season__title { background: var(--season-autumn); }

.season__dates {
  list-style: none;
  margin: 0;
  padding: 0;
}

.season__dates li {
  margin: 0 0 0.2em;
}

.play-off {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

@media (max-width: 540px) {
  .schedule {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}


/* === Event details ==========================================
   Two-column "Venue / Time / Format" definition list. The label
   re-uses the same bold + muted-ink idiom as the season column
   titles, so the page has one shared "label" voice. Below 540px
   the list collapses to stacked label-above-value rows.
   ============================================================= */
.event-details {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  column-gap: 1.5rem;
  row-gap: 1rem;
  margin: 0 0 1.25em;
}

.event-details dt {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
  align-self: start;
}

.event-details dd {
  margin: 0;
}

@media (max-width: 540px) {
  .event-details {
    display: block;
  }
  .event-details dt {
    margin: 1rem 0 0.25rem;
  }
  .event-details dt:first-child {
    margin-top: 0;
  }
}


/* === Destinations ===========================================
   The destination class is a shared pill base used in two
   registers: a sober monochrome look (default — applied to the
   secondary BGFed link in the post-footer), and two rich
   modifier variants (.destination--championship and
   .destination--rating) for the main destinations row, each
   with their own brand colour (backgammon-red and bigelo-
   orange). Inline SVG glyphs inherit the button's text colour
   via currentColor. Visited state is suppressed because these
   are UI affordances, not navigated content.
   ============================================================= */
.destinations {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.destination-with-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.destination-note {
  margin: 0;
  max-width: 18rem;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-muted);
}

.destination {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 150ms ease,
              color 150ms ease,
              background 150ms ease,
              transform 150ms ease,
              box-shadow 150ms ease;
}

.destination:link,
.destination:visited {
  color: var(--link);
}

.destination:hover,
.destination:focus-visible {
  color: var(--link-hover);
  border-color: var(--link-hover);
  text-decoration: underline;
}

.destination__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Rich variant — shared shape */
.destination--championship,
.destination--rating,
.destination--calendar {
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.destination--championship .destination__icon,
.destination--rating .destination__icon,
.destination--calendar .destination__icon {
  width: 22px;
  height: 22px;
}

.destination--championship:hover,
.destination--championship:focus-visible,
.destination--rating:hover,
.destination--rating:focus-visible,
.destination--calendar:hover,
.destination--calendar:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

/* Rich variant — championship colours */
.destination--championship:link,
.destination--championship:visited {
  background: var(--champion-tint);
  border-color: var(--champion);
  color: var(--champion);
}

.destination--championship:hover,
.destination--championship:focus-visible {
  background: #ffffff;
  border-color: var(--champion);
  color: var(--champion);
  box-shadow: 0 4px 12px rgba(140, 44, 40, 0.22);
}

/* Rich variant — rating colours */
.destination--rating:link,
.destination--rating:visited {
  background: var(--rating-tint);
  border-color: var(--rating);
  color: var(--rating);
}

.destination--rating:hover,
.destination--rating:focus-visible {
  background: #ffffff;
  border-color: var(--rating);
  color: var(--rating);
  box-shadow: 0 4px 12px rgba(150, 73, 0, 0.22);
}

/* Bring the rating icon's lighter triangles back to full opacity
   on hover, otherwise they near-vanish into the white background. */
.destination--rating .destination__icon polygon {
  transition: opacity 150ms ease;
}

.destination--rating:hover .destination__icon polygon,
.destination--rating:focus-visible .destination__icon polygon {
  opacity: 1;
}

/* Rich variant — calendar colours (calendar-blue: cool counterpart
   to the warm Leuven buttons, in the same family as the link blue
   and the winter season tint) */
.destination--calendar:link,
.destination--calendar:visited {
  background: var(--calendar-tint);
  border-color: var(--calendar);
  color: var(--calendar);
}

.destination--calendar:hover,
.destination--calendar:focus-visible {
  background: #ffffff;
  border-color: var(--calendar);
  color: var(--calendar);
  box-shadow: 0 4px 12px rgba(47, 99, 144, 0.22);
}

.destination--calendar:focus-visible {
  outline: 2px solid var(--calendar);
  outline-offset: 2px;
}


/* === Regional calendar band =================================
   The BE–NL calendar belongs to a broader set of events than the
   Leuven-specific buttons above, so it gets its own framed band:
   two thin --rule lines (top and bottom) with a small uppercase
   caption and the calendar button between them. The doubled rule
   is what marks this as a separate category; the button itself
   keeps the same rich shape as the Leuven buttons.
   ============================================================= */
.regional {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.regional__caption {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}


/* === Archive extras =========================================
   archive/2006-2015-extras.html: grouped lists of files from the
   old site that no page linked to. Plain lists in the body voice;
   the photo list shows the originals as small CSS-sized thumbnails
   (no separate thumbnail files) that link to the full image.
   ============================================================= */
.extras h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink-muted);
}

.extras ul {
  margin: 0;
  padding-left: 1.25rem;
}

.extras li {
  margin: 0 0 0.4em;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  padding: 0;
}

.thumbs li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 160px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.thumbs img {
  display: block;
  width: 160px;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--rule);
}


/* === WordPress archive (2015–2026) ==========================
   Generated by tools/wp2static.py. The converted posts keep their
   own markup (headings, lists, tables, <pre> result sheets, YouTube
   and calendar iframes, and since v0.6.0 the photos the Wayback
   Machine still had, in WordPress's own alignment classes); these
   rules only keep that markup readable inside the content card.
   .entry-meta is the date + category line, .post-list the
   date-prefixed lists on the index and category pages.
   ============================================================= */
.entry-meta {
  margin: -1rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.wp-content h2,
.wp-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.wp-content table {
  border-collapse: collapse;
  margin: 0 0 1.25em;
  font-size: 0.95rem;
}

.wp-content td,
.wp-content th {
  padding: 0.2em 0.6em;
  border: 1px solid var(--rule);
  vertical-align: top;
}

.wp-content pre {
  overflow-x: auto;
  padding: 0.75em;
  background: var(--page-bg);
  font-size: 0.8rem;
  line-height: 1.4;
}

.wp-content iframe {
  max-width: 100%;
}

/* Restored images: never wider than the column, and the height
   follows the file (a full-size original may stand in for the
   thumbnail a page asked for, so the height attribute is ignored). */
.wp-content img {
  max-width: 100%;
  height: auto;
}

.wp-content figure {
  margin: 0 0 1.25em;
  max-width: 100%;
}

.wp-content figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* WordPress alignment classes, as the twentyten theme floated them */
.wp-content .alignleft {
  float: left;
  margin: 0.25em 1.25em 0.75em 0;
}

.wp-content .alignright {
  float: right;
  margin: 0.25em 0 0.75em 1.25em;
}

.wp-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.wp-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Gutenberg media-text block: picture beside the text */
.wp-content .wp-block-media-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 600px) {
  .wp-content .wp-block-media-text {
    grid-template-columns: 1fr;
  }
}

.wp-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.post-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.post-list li {
  margin: 0 0 0.3em;
}

.post-list__date {
  display: inline-block;
  min-width: 7rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}


/* === Post footer ============================================
   Segregated zone for the BGFed-rating mention. Follows directly
   below the regional band — that band's own border-bottom is the
   separator, so the footer no longer carries its own border-top or
   top margin (those would stack into a redundant double line with
   an empty strip between). Only a little padding-top keeps the
   BGFed text off the line. Muted fine-print + the rating button in
   its regular destination styling; the visual close of the page.
   ============================================================= */
.post-footer {
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.post-footer p {
  margin: 0 0 1rem;
}

.post-footer p:last-child {
  margin-bottom: 0;
}
