/* =Base tokens & reset */
:root {
  --pink: #ff229a;
  --yellow: #ffcc00;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =Typography & shared page chrome */
body {
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  margin: 0;
}

header {
  margin: 2em 0 1em 0;
}

h1 {
  font-size: 1.5em;
  font-weight: 100;
  font-style: italic;
  margin: 0;
}

h1 .pink {
  font-weight: bold;
  font-style: normal;
}

.pink {
  color: var(--pink);
}

footer {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  padding: 0.5rem 0 1.5rem;
  text-align: center;
}

/* Decorative double-line rule */
.line-rule {
  --rule-light: #aaa;
  --rule-dark: #555;
  --rule-thickness: 2px;
  --rule-tip: 2px;
  position: relative;
  display: block;
  width: 80%;
  height: calc(var(--rule-thickness) * 2);
  margin: 1.4rem auto;
  border: 0;
  background: transparent;
  padding: 0;
}

.line-rule::before,
.line-rule::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: calc(var(--rule-thickness) * 2);
}

.line-rule::before {
  top: 0;
  background: var(--rule-light);
  clip-path: polygon(
    0 50%,
    var(--rule-tip) 0,
    calc(100% - var(--rule-tip)) 0,
    100% 50%,
    calc(100% - var(--rule-tip)) 50%,
    var(--rule-tip) 50%
  );
}

.line-rule::after {
  top: 0;
  background: var(--rule-dark);
  clip-path: polygon(
    0 50%,
    var(--rule-tip) 50%,
    calc(100% - var(--rule-tip)) 50%,
    100% 50%,
    calc(100% - var(--rule-tip)) 100%,
    var(--rule-tip) 100%
  );
}

/* =Buttons + nav chrome */
.button,
.nav-image {
  border: 3px solid #aaa;
  border-top-color: #555;
  border-left-color: #555;
  border-right-color: #aaa;
  border-bottom-color: #aaa;
  background: white;
}

/* Button sizing for nav grid */
.button {
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  background: none;
  color: black;
  font: inherit;
  padding: 10px;
  text-transform: lowercase;
  cursor: pointer;
}

.button::first-letter {
  text-transform: uppercase;
  font-size: 200%;
  line-height: 0.8;
  vertical-align: -0.1em;
}

.button > span {
  display: block;
  white-space: nowrap;
  line-height: 1.1;
}

.button > span::first-letter {
  text-transform: uppercase;
  font-size: 200%;
  line-height: 0.8;
  vertical-align: -0.1em;
}

.button:hover {
  color: var(--yellow);
}

/* =Homepage shell */
main {
  display: flex;
  justify-content: center;
}

nav {
  border: 15px solid #555;
  border-top-color: #aaa;
  border-left-color: #aaa;
  position: relative;
  padding: 5px;
  background: white;
  box-sizing: border-box;
  display: grid;
  gap: 0;
  width: min(500px, 40vw);
  height: clamp(350px, 45vh, 400px);
  grid-template-columns: 1fr 2.5fr 1fr;
  grid-template-rows: minmax(220px, 1fr) 50px;
  grid-template-areas:
    "bio img shows"
    "awards merch contact";
}

nav > * {
  box-sizing: border-box;
}

nav::after {
  content: none;
}

nav .button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  background: none;
  color: black;
  font: inherit;
  padding: 0;
  text-transform: lowercase;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.bio {
  grid-area: bio;
}

.img {
  grid-area: img;
}

.shows {
  grid-area: shows;
}

.awards {
  grid-area: awards;
}

.merch {
  grid-area: merch;
}

.contact {
  grid-area: contact;
}

.button {
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  object-position: 50% 20%;
  min-width: 0;
  min-height: 0;
}

/* Homepage: counter */
.counter {
  text-align: center;
  margin: 0.5rem auto;
  padding: 1rem 0;
  width: min(500px, 40vw);
}

.counter .stat-number {
  display: inline-flex;
  align-items: center; /* center digits vertically */
  gap: 0.35rem;
  transform: scale(0.75); /* shrink whole unit */
  transform-origin: center;
  vertical-align: middle;
}

.visitor-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0 auto;
  line-height: 1.2;
}

.since {
  display: block;
  margin-top: 0.2rem;
}

/* Counter embed cleanup */
#sfcfgmejhq87an7jfuqlsna7gr78nx7ragx {
  zoom: 0.75;
  line-height: 0;
}

#sfcfgmejhq87an7jfuqlsna7gr78nx7ragx *,
#sfcfgmejhq87an7jfuqlsna7gr78nx7ragx img,
#sfcfgmejhq87an7jfuqlsna7gr78nx7ragx iframe {
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

/* Modal overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 0.3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
}

/* Shared Win98 modal styling (available on all pages) */
#insideInfoDlg {
  padding: 0;
  border: none;
}

#insideInfoDlg::backdrop {
  background: rgba(0, 0, 0, 0.25);
}

#insideInfoDlg button:focus {
  outline: none;
  box-shadow: none;
}

.win98-modal {
  width: min(350px, 88vw);
  background: #c0c0c0;
  border: 3px solid #aaa;
  border-top-color: #555;
  border-left-color: #555;
  border-right-color: #aaa;
  border-bottom-color: #aaa;
  box-shadow: none;
}

.win98-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e0e0e0;
  border-bottom: 2px solid #9a9a9a;
  padding: 6px 8px;
  font-weight: 700;
  color: #000;
}

.win98-close {
  width: 20px;
  height: 20px;
  line-height: 18px;
  font-size: 14px;
  text-align: center;
  background: #e0e0e0;
  color: #000;
  border: 2px solid #dfdfdf;
  border-top-color: #e6e6e6;
  border-left-color: #e6e6e6;
  border-right-color: #808080;
  border-bottom-color: #808080;
  border-radius: 0;
  cursor: pointer;
  padding: 0;
}

.win98-close:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #e6e6e6;
  border-bottom-color: #e6e6e6;
  background: #d9d9d9;
}

.win98-body {
  background: #fff;
  padding: 12px;
  color: #000;
  line-height: 1.35;
}

.win98-body p {
  margin: 0;
}

/* Diagonal ribbon */
.ribbon {
  position: fixed;
  bottom: 20px;
  right: -60px;
  width: 250px;
  background: var(--yellow);
  color: black;
  text-align: center;
  transform: rotate(-45deg);
  font-weight: bold;
  z-index: 9999;
  padding: 4px 0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.ribbon marquee {
  font-size: 0.9rem;
}

/* Error pages */
.error-page {
  min-height: 95vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =Inner pages: layout frame */
.page-main,
.stats {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-main {
  display: block; /* override homepage flex */
  padding-bottom: 3rem;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stats {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.stats-inner {
  padding: 0.2rem 0.5rem;
}

/* Back button */
.back-btn {
  position: absolute;
  left: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px;
  background: #e0e0e0;
  color: #000;
  border: 2px solid #dfdfdf;
  border-top-color: #e6e6e6;
  border-left-color: #e6e6e6;
  border-right-color: #808080;
  border-bottom-color: #808080;
  border-radius: 0;
}

.back-btn:hover {
  background: #f2f2f2;
}

.back-btn:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #e6e6e6;
  border-bottom-color: #e6e6e6;
  background: #d9d9d9;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  background: #e0e0e0;
  color: #000;
  border: 2px solid #dfdfdf;
  border-top-color: #e6e6e6;
  border-left-color: #e6e6e6;
  border-right-color: #808080;
  border-bottom-color: #808080;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  text-align: center;
}

.pill-btn:hover {
  background: #f2f2f2;
}

.pill-btn:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #e6e6e6;
  border-bottom-color: #e6e6e6;
  background: #d9d9d9;
}

.pill-btn:disabled {
  color: #999;
  background: #ccc;
  border-color: #aaa;
  cursor: default;
}

/* Dropcap for lead paragraph */
.dropcap::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 0.8;
  padding: 0.1rem 0.4rem 0 0;
  font-weight: 700;
  color: var(--pink);
}

/* Stats strip + digits */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.75rem;
}

.stats-grid .stat:nth-child(1) .digit {
  background: var(--pink);
}

.stats-grid .stat:nth-child(2) .digit {
  background: #d9d9d9;
  color: black;
}

.stats-grid .stat:nth-child(3) .digit {
  background: var(--yellow);
  color: black;
}

.stats-grid .stat:nth-child(4) .digit {
  background: var(--pink);
}

.stat {
  flex: 0 0 auto;
  width: auto;
  padding: 0.75rem 0.6rem;
  background: white;
  font-size: 0.9rem;
}

.stat-number {
  display: inline-flex;
  gap: 4px;
  align-items: flex-end;
}

.stat-number .digit {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--pink);
  color: white;
  font-weight: bold;
  font-size: 2rem;
  padding: 20px;
  border-radius: 8px;
}

.stat-number .digit[data-char="3"] .digit-char,
.stat-number .digit[data-char="4"] .digit-char,
.stat-number .digit[data-char="5"] .digit-char,
.stat-number .digit[data-char="7"] .digit-char {
  position: relative;
  top: -5px;
}

.stat-number .digit[data-char="2"] .digit-char,
.stat-number .digit[data-char="1"] .digit-char,
.stat-number .digit[data-char="0"] .digit-char {
  font-size: 2.5rem;
  position: relative;
  top: -2px;
}

.stat-number .digit[data-char="k"] {
  width: 28px;
  height: 28px;
  padding: 10px;
}

.stat-number .digit[data-char="k"] .digit-char {
  font-size: 1.4rem;
  position: relative;
  top: 0;
}

.stat-label {
  display: block;
  margin-top: 0.3rem;
}

/* Content grid */
.page-body {
  margin-top: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
}

.content-text,
.content-media {
  text-align: left;
}

.page-body h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.page-body p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

.image-card-inner {
  border: 3px solid #aaa;
  border-top-color: #555;
  border-left-color: #555;
  border-right-color: #aaa;
  border-bottom-color: #aaa;
  padding: 0.5rem;
  background: white;
}

.image-card img {
  display: block;
  width: 100%;
  height: auto;
}

.image-caption {
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

/* Shows list */
.shows-grid {
  display: grid;
  gap: 1rem;
}

.show-card {
  background: white;
  padding: 0;
  border: none;
}

.show-card-inner {
  gap: 1rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: start;
  border: 3px solid #aaa;
  border-top-color: #555;
  border-left-color: #555;
  border-right-color: #aaa;
  border-bottom-color: #aaa;
  background: white;
}

.show-button {
  align-self: center;
  display: flex;
  justify-content: center;
}

.show-image {
  width: 106px;
  height: 150px;
  object-fit: cover;
  border-radius: 0;
}

.show-meta {
  width: 100%;
}

.show-meta p,
.show-meta h3,
.show-meta .show-title {
  margin: 0 0 0.25rem 0;
  text-align: left;
  font-size: 1rem;
  line-height: 1.2;
}

.show-meta .show-venue {
  font-size: 0.85rem;
  margin-top: 0;
  margin-bottom: 0.1rem;
}

.show-meta .show-festival {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  margin: 1rem 0 0 0;
}

.festival-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}

.show-meta .show-datetime {
  margin-top: 1rem;
}

.show-meta .show-price {
  font-size: 0.85rem;
  margin-top: 0.1rem;
  margin-bottom: 0;
}

.show-title em {
  font-style: italic;
}

.show-title {
  padding: 0.6rem 0;
}

.show-location strong {
  font-weight: bold;
}

.show-year-heading {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  color: #000;
}

.pink-btn {
  display: inline-block;
  padding: 6px 12px;
  background: var(--pink);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  width: auto;
}

.post-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.post-main {
  flex: 1;
  display: block;
  padding: 0 16px 48px;
}

.post-inner {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card {
  width: min(520px, 100%);
  margin: 0 auto;
  background: transparent;
  text-align: center;
  border: none;
  padding: 12px 0 18px;
}

.post-message {
  margin: 0.2rem 0 3.3rem;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--pink);
}

.post-small {
  margin: 0 0 0.75rem;
  color: #6b5f72;
  font-size: 0.95rem;
}

.post-link {
  gap: 6px;
  margin-top: 0.5rem;
  position: static;
  left: auto;
}

/* =Responsive */
@media (max-width: 700px) {
  header {
    margin-top: 1.5rem;
    padding: 1em 0;
  }

  .line-rule {
    width: 90%;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-media {
    order: -1;
  }

  .stats-grid {
    gap: 0.8rem 0.9rem;
    justify-content: center;
  }

  .stats-inner {
    padding: 0.25rem 0;
  }

  .stats {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .stat {
    flex: 1 1 30%;
    font-size: 0.85rem;
    padding: 0.35rem 0.2rem;
  }

  .back-btn {
    padding: 3px 6px;
    gap: 4px;
  }

  .back-btn .text {
    display: none;
  }

  .show-card-inner {
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .show-image {
    grid-column: 1;
    grid-row: 1;
  }

  .show-meta {
    grid-column: 2;
    grid-row: 1;
  }

  .show-button {
    grid-column: 1 / span 2;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
  }
}

@media (max-width: 500px) {
  header {
    margin: 1em 0 0 0;
  }

  nav {
    width: min(560px, 90vw);
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows:
      45px
      minmax(150px, 32vh)
      45px
      45px;
    grid-template-areas:
      "bio     shows"
      "img     img"
      "merch   merch"
      "awards  contact";
  }

  @supports (height: 1svh) {
    nav {
      grid-template-rows:
        45px
        minmax(150px, 32svh)
        45px
        45px;
    }
  }

  .button {
    padding: 4px 6px;
    font-size: 0.9rem;
    line-height: 1;
  }

  .counter {
    padding: 0.75rem 0;
    width: 80vw;
  }

  .button,
  .nav-image {
    min-height: 0;
  }

  .post-card {
    padding: 18px;
  }

  .post-message {
    font-size: 1.5rem;
  }
}

.nav-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Home counter: let the rule fill its container */
.counter .line-rule {
  width: 90%;
}
