/* ====================================================================== */
/* WORD BABEL — V2 STYLESHEET                                              */
/* Slimmed-down core: ribbon, page shell, three-tile home, data-vis pages. */
/* ====================================================================== */

/* ---------------------------------------------------------------------- */
/* FONTS                                                                  */
/* ---------------------------------------------------------------------- */

/* Winky Rough */
@font-face {
  font-family: 'Winky Rough';
  src: url('/static/fonts/Winky_Rough/WinkyRough-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Felix Titling */
@font-face {
  font-family: 'Felix Titling';
  src: url('/static/fonts/FELIXTI.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Cinzel */
@font-face {
  font-family: 'Cinzel';
  src: url('/static/fonts/Cinzel/static/Cinzel-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------- */
/* BASE / SHELL                                                           */
/* ---------------------------------------------------------------------- */

body {
  margin: 0;
  min-height: 100vh;
  background-color: #bda26d;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-shell {
  position: relative;
  min-height: 100%;
  display: flex;
  justify-content: center;
  width: 100%;
}

.content_wrapper {
  width: 85%;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  min-height: 100vh;
  background: #feefc6;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 30px #d5ce73;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .content_wrapper { padding: 10px; }
}

/* ---------------------------------------------------------------------- */
/* NAVIGATION RIBBON                                                      */
/* ---------------------------------------------------------------------- */

.navbar {
  background: #5585ae;
  border-bottom: 5px solid #d5ce73;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  top: 0;
  z-index: 1000;
}

/* Two links + centred logo: 1fr | auto | 1fr.
   The two link cells fill their 1fr space; their content is anchored to
   the side closest to the logo so the link-to-logo gap stays equal on
   both sides regardless of how long the link text is. */
.nav-list {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-logo {
  justify-self: center;
}

/* Each side <li> is a flex row holding [ornament][link][ornament] with
   even gaps — that gives equal spacing on either side of the link text.
   Anchoring the row to the logo-side edge of the cell (flex-end on the
   left cell, flex-start on the right cell) keeps the link-to-logo gap
   in step on both sides as the viewport widens or narrows. */
.nav-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-list li.nav-left {
  justify-content: flex-end;
  padding-right: 40px;       /* breathing room between link and logo */
}

.nav-list li.nav-right {
  justify-content: flex-start;
  padding-left: 40px;
}

.nav-list a {
  position: relative;
  text-decoration: none;
  font-family: 'Felix Titling', serif;
  font-size: 32px;
  font-weight: bold;
  color: #ccbda6;
  padding: 10px 18px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

/* Faint gold glow sitting behind each link. Driven by ::before so the
   actual <a> retains its own colour and pointer events untouched. */
.nav-list a::before {
  content: "";
  position: absolute;
  inset: -8px -14px;
  background: radial-gradient(ellipse at center,
                              rgba(236, 226, 126, 0.22) 0%,
                              rgba(236, 226, 126, 0.10) 45%,
                              transparent 75%);
  z-index: -1;
  pointer-events: none;
  filter: blur(2px);
  transition: opacity 0.3s ease;
}

.nav-list a:hover {
  color: #ece27e;
  text-shadow: 0 0 10px rgba(236, 226, 126, 0.6);
}

.nav-list a:hover::before {
  background: radial-gradient(ellipse at center,
                              rgba(236, 226, 126, 0.45) 0%,
                              rgba(236, 226, 126, 0.18) 45%,
                              transparent 75%);
}

/* Decorative ornament: thin white stripe with a gold outline above and
   below — sits flanking each nav link. */
.nav-ornament {
  display: inline-block;
  width: 50px;
  height: 1px;
  background: #ffffff;
  box-shadow:
    0 -1px 0 0 #d5ce73,
    0  1px 0 0 #d5ce73;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-list img {
  max-width: 350px;
  height: auto;
  display: block;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------------- */
/* HOME (VISUALISATIONS) PAGE — TILE GRID                                 */
/* ---------------------------------------------------------------------- */

.vis-home-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 20px;
  box-sizing: border-box;
}

.vis-home-title {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: bold;
  color: #6E1D1D;
  text-align: center;
  margin: 10px 0 30px 0;
}

.vis-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* Each tile is an <a> wrapper to keep the whole card clickable. */
.vis-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;        /* centre title + subtitle vertically */
  align-items: center;
  aspect-ratio: 1 / 1;            /* square tiles for now */
  background: #f5efd2;            /* shows through transparent images */
  border: 2px solid #d5ce73;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #0c0301;
  overflow: hidden;
  padding: 18px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.vis-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  background-color: #fbf3d8;
}

/* Image layer — sits behind the title.
   Designed for both transparent PNG/SVG drop-ins AND full-bleed photos. */
.vis-tile-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

/* Photographs fill the whole tile at low opacity so they read as a faint
   backdrop rather than competing with the title. */
.vis-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.vis-tile:hover .vis-tile-image img {
  opacity: 0.5;
  transform: scale(1.04);
}

/* Title sits in the centre of the tile. A soft cream pill behind it
   keeps it readable over the backdrop image. */
.vis-tile-title {
  position: relative;
  z-index: 1;
  font-family: 'Felix Titling', serif;
  font-size: 22px;
  font-weight: bold;
  color: #6E1D1D;
  text-align: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(213, 206, 115, 0.55);
  transition: padding 0.25s ease, background 0.25s ease;
}

/* Subtitle reveals just below the centred title on hover. Slides open
   from zero height so the title stays anchored in place. */
.vis-tile-subtitle {
  position: relative;
  z-index: 1;
  font-family: 'Winky Rough', sans-serif;
  font-size: 13px;
  font-style: italic;
  color: #423c07;
  text-align: center;
  padding: 0 14px;
  max-width: 90%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.vis-tile:hover .vis-tile-subtitle {
  max-height: 80px;
  opacity: 1;
  padding: 6px 14px;
  margin-top: 10px;
}

/* Responsive: 2 across on tablets, 1 across on phones. */
@media (max-width: 900px) {
  .vis-tile-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .vis-tile-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* MOBILE — navbar shrink + home page tweaks                              */
/* ---------------------------------------------------------------------- */

/* Tablet / large phone */
@media (max-width: 768px) {
  .navbar {
    height: 110px;
    border-bottom-width: 4px;
  }

  .nav-list {
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-list a {
    font-size: 18px;
    padding: 6px 10px;
  }

  .nav-list li {
    gap: 8px;
  }

  .nav-list li.nav-left {
    padding-right: 14px;
  }

  .nav-list li.nav-right {
    padding-left: 14px;
  }

  .nav-ornament {
    width: 22px;
  }

  .nav-list img {
    max-width: 180px;
  }

  .vis-home-container {
    padding: 18px 14px;
  }

  .vis-home-title {
    font-size: 26px;
    margin: 6px 0 18px 0;
  }

  .vis-tile-grid {
    gap: 16px;
  }

  .vis-tile-title {
    font-size: 19px;
    padding: 8px 14px;
  }

  .vis-tile-subtitle {
    font-size: 12px;
  }

  /* Subtitles always-visible on touch (no hover available). */
  .vis-tile-subtitle {
    max-height: 80px;
    opacity: 1;
    padding: 6px 14px;
    margin-top: 8px;
  }
}

/* Small phone */
@media (max-width: 480px) {
  .navbar {
    height: 92px;
  }

  .nav-list a {
    font-size: 15px;
    padding: 4px 6px;
  }

  .nav-list li.nav-left {
    padding-right: 8px;
  }

  .nav-list li.nav-right {
    padding-left: 8px;
  }

  /* Drop the ornaments altogether — not enough room. */
  .nav-ornament {
    display: none;
  }

  .nav-list img {
    max-width: 140px;
  }

  .vis-home-title {
    font-size: 22px;
  }

  .vis-tile-title {
    font-size: 17px;
    padding: 7px 12px;
  }
}

/* ---------------------------------------------------------------------- */
/* MOBILE — DATA-VIS PAGE HEADER + LANG FAM MAP                           */
/* ---------------------------------------------------------------------- */

@media (max-width: 768px) {
  .dv-page-header-row {
    width: 92%;
    margin: 14px auto 8px auto;
  }

  .dv-page-word {
    font-size: 28px;
    line-height: 1.2;
  }

  /* Globe canvas/SVG stage — height is set by JS on mobile (it sizes
     itself to fit the dynamic bottom legend), so no fixed CSS height here. */

  .dv-page-source {
    width: 92%;
    font-size: 13px;
    margin: 8px auto 16px auto;
  }
}

@media (max-width: 480px) {
  .dv-page-word {
    font-size: 24px;
  }
}

/* Mobile speakers-page rules live AFTER the desktop ones (further down
   in the file) so the cascade resolves in the mobile direction inside
   the @media block. Keeping them separated avoids fragile specificity
   gymnastics. */

/* ---------------------------------------------------------------------- */
/* GENERIC PAGE FORMATS (carried over from v1 — used by data-vis pages)   */
/* ---------------------------------------------------------------------- */

.general-topline {
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: bold;
  color: #6E1D1D;
  padding: 2px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* DATA-VIS PAGE HEADER + INFO BOXES                                      */
/* ---------------------------------------------------------------------- */

/* Page-title row is now just a centred wrapper for the <h1>.
   The old top-right info box has moved to a small caption below the viz. */
.dv-page-header-row {
  width: 95%;
  margin: 20px auto 10px auto;
  text-align: center;
}

.dv-page-word {
  margin: 0;
  /* Fluid scale: 28px on small desktop / tablet, up to 42px on wide screens. */
  font-size: clamp(28px, 3.5vw, 42px);
  font-family: 'Felix Titling', serif;
  font-weight: bold;
  line-height: 1.15;
}

/* Small source caption that lives directly below the visualisation.
   Replaces the old top-right info box AND the long bottom-box prose. */
.dv-page-source {
  width: 95%;
  margin: 10px auto 24px auto;
  text-align: center;
  font-family: 'Winky Rough', sans-serif;
  font-size: 14px;
  color: #423c07;
  font-style: italic;
}

.dv-page-source a {
  color: #6E1D1D;
  font-weight: bold;
  font-style: normal;
  text-decoration: none;
  border-bottom: 1px solid #d5ce73;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.dv-page-source a:hover {
  color: #d5ce73;
  border-bottom-color: #6E1D1D;
}

/* ---------------------------------------------------------------------- */
/* DATA-VIS PAGE INFO ROW (below visualisation)                          */
/* ---------------------------------------------------------------------- */
/* Two-column layout:
     • LEFT  — explainer prose box, framed in gold like the viz container.
     • RIGHT — stats stack (data source / data quality / data coverage),
               styled like the v1 right-aligned column. */

.dv-page-info-row {
  display: flex;
  width: 95%;
  margin: 16px auto 28px auto;
  gap: 24px;
  align-items: stretch;
  box-sizing: border-box;
}

.dv-page-info-text {
  flex: 1;
  background: #f5efd2;
  border: 1px solid #d5ce73;
  border-radius: 6px;
  padding: 14px 18px;
  font-family: 'Winky Rough', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: #423c07;
}

.dv-page-info-text p {
  margin: 0;
}

.dv-page-stats-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  justify-content: center;
  min-width: 220px;
  padding: 8px 4px 8px 8px;
  text-align: right;
}

.dv-page-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: flex-end;
}

.dv-page-stat-label {
  font-family: 'Winky Rough', sans-serif;
  font-size: 13px;
  font-style: italic;
  color: #6b5a18;
  letter-spacing: 0.2px;
}

.dv-page-stat-value {
  font-family: 'Felix Titling', serif;
  font-weight: bold;
  font-size: 18px;
  color: #6E1D1D;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

/* The data-source value is an <a>; underline on hover so it reads as a
   link without doing so by default. */
a.dv-page-stat-value {
  border-bottom-color: #d5ce73;
}
a.dv-page-stat-value:hover {
  color: #d5ce73;
  border-bottom-color: #6E1D1D;
}

/* Mobile: stack vertically and left-align the stats so they don't get
   squashed into the right edge. */
@media (max-width: 768px) {
  .dv-page-info-row {
    flex-direction: column;
    width: 92%;
    gap: 12px;
    margin: 12px auto 20px auto;
  }
  .dv-page-info-text {
    font-size: 13px;
    padding: 12px 14px;
  }
  .dv-page-stats-column {
    align-items: flex-start;
    min-width: 0;
    padding: 4px 0;
    text-align: left;
  }
  .dv-page-stat {
    justify-content: flex-start;
  }
  .dv-page-stat-value {
    font-size: 16px;
  }
}

.dv-page-bottom-box {
  width: 95%;
  min-height: 100px;
  height: auto;
  margin: 5px auto;
  padding: 5px;
  border: 2px solid #d5ce73;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.dv-page-substitle {
  margin: 0;
  font-size: 20px;
  font-family: 'Felix Titling', serif;
  font-weight: bold;
  line-height: 2;
}

.dv-page-text {
  margin: 0;
  font-size: 14px;
  font-family: 'Winky Rough', sans-serif;
}

/* ---------------------------------------------------------------------- */
/* DATA-VIS — LANG FAM MAP (SVG + canvas hybrid)                          */
/* ---------------------------------------------------------------------- */

/* Wraps the SVG (sphere/land/chrome) and the canvas (arcs/points).
   Canvas is overlaid on top with pointer-events:none, so drag/click/hover
   pass through to the SVG layer underneath. */
.dv_langfammap-stage {
  position: relative;
  width: 100%;
}

.dv_langfammap-stage svg {
  display: block;
  width: 100%;
  /* Was 800px — left a long empty stretch under the globe + side legends.
     660px is enough for the side-panel legend rows (≈15 × 20 = 300px)
     plus generous chrome and gives the globe ~600px square to play
     with. JS sets the height dynamically on mobile (legend strip + globe). */
  height: 660px;
}

.dv_langfammap-stage canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Floating tooltip that follows the cursor when it's over an arc or
   language point. The JS toggles `display` and writes `left` / `top`
   in SVG-frame coordinates. Translated above-and-centred so the
   pointer's tip "anchors" the bottom of the bubble. */
.lang-fam-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  z-index: 4;
  padding: 4px 9px;
  background: #f5efd2;
  color: #423c07;
  border: 1px solid #d5ce73;
  border-radius: 4px;
  font-family: 'Winky Rough', sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ---------------------------------------------------------------------- */
/* DATA-VIS — LANG FAM BY SPEAKERS (pie + bar)                            */
/* ---------------------------------------------------------------------- */

.dv_langfampie-chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#langfambar {
  position: absolute;
  left: 0;
  top: 10;
  z-index: 1;
}

#langfampie {
  position: absolute;
  right: 30px;
  top: 120px;
  z-index: 2;
}

.dv_langfampie-viz-container {
  width: 95%;
  min-height: 1000px;
  height: auto;
  margin: 5px auto;
  padding: 5px;
  border: 2px solid #d5ce73;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

/* Map variant — the lang-fam-map only needs to fit the globe SVG plus
   its rendered legend strip, both of which are sized by the JS. The
   default 1000px min-height was inherited from the speakers page (where
   absolutely-positioned bar + sunburst need that much room) and left a
   long empty stretch underneath the map. Drop the min-height and let
   the inner stage drive the height. */
.dv_langfampie-viz-container--map {
  min-height: 0;
  padding: 8px;
}

.dv_langfampie-toggle-container {
  position: absolute;
  top: 15px;
  right: 50px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

/* Second row of toggles (group variants) sits just below the first. */
.dv_langfampie-toggle-container.dv_langfampie-toggle-container--groups {
  top: 60px;
}

/* Toggle tiles: cream + dark-red when off, blue + cream when on.
   Right-padding is bumped to leave room for the on/off badge in the corner. */
.dv_langfampie-tile {
  position: relative;
  padding: 7px 30px 7px 14px;
  border: 2px solid #d5ce73;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Felix Titling', serif;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: #6E1D1D;
  background: #ffffff;
  user-select: none;
  transition: background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.15s ease;
}

.dv_langfampie-tile:hover {
  background: #feefc6;
}

/* Group-toggle variant — slightly different active colour to read as a
   different *kind* of switch from the value toggle above it. */
.dv_langfampie-tile.dv_langfampie-group-tile.active {
  background: #6E1D1D;
  color: #feefc6;
  border-color: #6E1D1D;
  box-shadow: 0 2px 6px rgba(110,29,29,0.25);
}

.dv_langfampie-tile.active {
  background: #5585ae;
  color: #ffffff;
  border-color: #5585ae;
  box-shadow: 0 2px 6px rgba(85,133,174,0.3);
}

.dv_langfampie-tile.active:hover {
  filter: brightness(0.95);
}

/* Small italic on/off badge in the top-right corner.
   Driven entirely by the .active class so it stays in sync with the JS. */
.dv_langfampie-tile::after {
  content: 'off';
  position: absolute;
  top: 3px;
  right: 7px;
  font-family: 'Winky Rough', sans-serif;
  font-size: 9px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  opacity: 0.55;
}

.dv_langfampie-tile.active::after {
  content: 'on';
  opacity: 0.95;
}

.dv_langfampie-tile.is-busy {
  pointer-events: none;
  opacity: 0.6;
}

/* ---------------------------------------------------------------------- */
/* MOBILE — LANGUAGES BY SPEAKERS (bar + sunburst stack vertically)       */
/* These rules live AFTER the desktop ones so the cascade picks them up   */
/* without needing higher-specificity selectors.                          */
/* ---------------------------------------------------------------------- */

@media (max-width: 768px) {
  /* Container: drop the desktop 1000px min-height so the page can fit
     itself to the natural stacked-layout height. */
  .dv_langfampie-viz-container {
    min-height: auto;
    padding: 8px;
  }

  /* Chart container becomes a normal block flow rather than an
     absolute-positioning stage. We use CSS `order` on flex children to
     show the sunburst pie ABOVE the bar chart on mobile, since the pie
     is more striking and gives a quick "shape of the data" hit at the
     top of the page. */
  .dv_langfampie-chart-container {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  /* Both rows of toggles flow inline at the top, centred and wrappable.
     `order: 0` keeps them at the very top above both charts. */
  .dv_langfampie-toggle-container {
    position: static;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 0 0;
    right: auto;
    top: auto;
    order: 0;
    text-align: center;
  }

  .dv_langfampie-toggle-container.dv_langfampie-toggle-container--groups {
    top: auto;
    margin-top: 2px;
    order: 1;
  }

  /* Slightly smaller toggles to fit two rows comfortably on a phone. */
  .dv_langfampie-tile {
    padding: 6px 26px 6px 12px;
    font-size: 13px;
  }

  /* Sunburst pie: rendered first below the toggles. Full-width but
     capped, kept square via aspect-ratio. We override the desktop
     `position: absolute` so the SVG actually participates in the flex
     order on mobile. */
  #langfampie {
    position: static;
    display: block;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 6px auto 4px auto;
    right: auto;
    top: auto;
    order: 2;
  }

  /* Bar chart: rendered after the pie. Full-width, scroll-friendly
     height for ~30 bars. */
  #langfambar {
    position: static;
    display: block;
    width: 100%;
    height: 720px;
    margin: 8px 0 4px 0;
    left: auto;
    top: auto;
    order: 3;
  }
}

@media (max-width: 480px) {
  #langfambar {
    height: 640px;
  }

  .dv_langfampie-tile {
    padding: 6px 22px 6px 10px;
    font-size: 12px;
  }
}

/* ---------------------------------------------------------------------- */
/* SUPPORT BUTTON (Ko-fi CTA)                                              */
/* Reusable component, included via templates/_support_button.html.       */
/* ---------------------------------------------------------------------- */

.support-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 95%;
  max-width: 720px;
  margin: 28px auto;
  padding: 22px 28px;
  background: #f0a000;
  border: 2px solid #f0a000;
  border-radius: 12px;
  color: #1a1a1a;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 18px rgba(240, 160, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background 0.15s ease, border-color 0.15s ease;
}

.support-btn:hover {
  background: #ffb820;
  border-color: #ffb820;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(240, 160, 0, 0.40);
}

.support-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(240, 160, 0, 0.30);
}

.support-btn-main {
  font-family: 'Felix Titling', serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #1a1a1a;
}

/* Soft glow behind "Buy Me a Beer !" — layered cream-tinted text
   shadows give a faint halo around each letter without a hard box.
   Three stops (close, medium, far) shape the falloff so the glow
   reads as ambient light rather than a flat blur. */
.support-btn-highlight {
  text-shadow:
    0 0 6px  rgba(255, 247, 216, 0.95),
    0 0 14px rgba(255, 247, 216, 0.65),
    0 0 24px rgba(255, 240, 190, 0.40);
}

.support-btn-sub {
  font-family: 'Winky Rough', sans-serif;
  font-size: 15px;
  font-style: italic;
  color: #423c07;
  max-width: 540px;
  line-height: 1.45;
}

.support-btn-sub strong {
  font-weight: 700;
  font-style: normal;
  color: #6E1D1D;
}

@media (max-width: 768px) {
  .support-btn {
    width: 92%;
    padding: 18px 18px;
    margin: 18px auto;
  }
  .support-btn-main      { font-size: 18px; }
  .support-btn-sub       { font-size: 13.5px; }
  /* Tighten the glow on mobile so it doesn't bleed into the
     button's edges at smaller widths. */
  .support-btn-highlight {
    text-shadow:
      0 0 4px  rgba(255, 247, 216, 0.95),
      0 0 10px rgba(255, 247, 216, 0.55),
      0 0 18px rgba(255, 240, 190, 0.35);
  }
}

/* ---------------------------------------------------------------------- */
/* ABOUT PAGE                                                              */
/* ---------------------------------------------------------------------- */

.about-page {
  width: 95%;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.about-page .vis-home-title {
  margin-bottom: 12px;
  text-align: center;
}

.about-text {
  width: 95%;
  max-width: 720px;
  margin: 8px auto;
  padding: 4px 12px;
  font-family: 'Winky Rough', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #423c07;
}

.about-text p {
  margin: 0 0 18px 0;
}

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

@media (max-width: 768px) {
  .about-text {
    font-size: 15px;
    line-height: 1.6;
    padding: 4px 8px;
  }
}

/* ====================================================================== */
/* COOKIE CONSENT BANNER                                                  */
/* Slides up from the bottom of the viewport on first visit. Subtle       */
/* enough not to dominate the page; clear enough that it can't be missed. */
/* ====================================================================== */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(140%);   /* off-screen until shown */
  width: min(92%, 720px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: #f5efd2;
  border: 1.5px solid #6E1D1D;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  font-family: 'Winky Rough', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #423c07;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

/* Toggled by the JS once it's decided the banner needs to be shown. */
.cookie-banner.cookie-banner-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cookie-banner-text strong {
  font-weight: 700;
  color: #6E1D1D;
}

.cookie-banner-text a {
  color: #6E1D1D;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #d5ce73;
}

.cookie-banner-text a:hover {
  color: #d5ce73;
  border-bottom-color: #6E1D1D;
}

.cookie-banner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-btn {
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: 'Felix Titling', serif;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.4px;
  border: 1.5px solid #6E1D1D;
  transition: background 0.12s ease, color 0.12s ease,
              transform 0.12s ease, box-shadow 0.12s ease;
}

.cookie-btn-accept {
  background: #6E1D1D;
  color: #f5efd2;
}
.cookie-btn-accept:hover {
  background: #8a2727;
  border-color: #8a2727;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(110, 29, 29, 0.30);
}

.cookie-btn-decline {
  background: transparent;
  color: #6E1D1D;
}
.cookie-btn-decline:hover {
  background: #ece27e;
}

/* "Reset cookie preferences" link in the About page footer. */
.cookie-reset-link {
  color: #6E1D1D;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #d5ce73;
  cursor: pointer;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.cookie-reset-link:hover {
  color: #d5ce73;
  border-bottom-color: #6E1D1D;
}

@media (max-width: 560px) {
  .cookie-banner {
    width: calc(100% - 16px);
    bottom: 8px;
    padding: 14px 14px;
    font-size: 13px;
  }
  .cookie-banner-actions {
    justify-content: center;
  }
  .cookie-btn {
    flex: 1;
    padding: 10px 14px;
  }
}
