/* The Amazing Chuck: layout, typography, artwork, and lightbox */
@font-face {
  font-family: "Roboto Slab";
  src: url("../fonts/RobotoSlab-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("../fonts/RobotoSlab-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("../fonts/Inter-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("../fonts/Inter-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page-bg: #fff;
  --page-fg: #000;
  --focus: #008ac7;
  --accent: #02497f;
}

html { background: var(--page-bg); }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--page-fg);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
a {
	color: inherit;
}
.site-container {
  max-width: 960px;
  padding-top: clamp(18px, 3.5vw, 48px);
  padding-bottom: 64px;
}
.mb-section { margin-bottom: clamp(48px, 7vw, 90px); }
.site-hero { margin-bottom: clamp(20px, 3vw, 36px); }

/* Headings and body copy */
.section-title,
.card-title,
article h3 {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  margin: 0 0 clamp(25px, 3.5vw, 45px);
}
.card-title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin: 0 0 1rem;
}
article h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.25;
  margin: 1.5rem 0 .75rem;
}
/* Kickstarter heading uses section-title styling, slightly smaller on desktop. */
h3.section-title {
  line-height: 1.2;
  margin: 0 0 clamp(25px, 3.5vw, 45px);
}
article p {
  max-width: 60ch;
  margin: 0 0 1.1rem;
}
article p:last-child { margin-bottom: 0; }
.row + .section-title { margin-top: clamp(2rem, 4vw, 3rem); }
.closing-cta { margin-top: clamp(2rem, 5vw, 3.5rem); }

/* Linked artwork and gallery thumbnails */
.artwork-button,
.artwork-link {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}
.artwork-link,
.hero-link { cursor: pointer; }
.artwork-button img,
.artwork-link img {
  display: block;
  height: auto;
}
.artwork-button img,
.artwork-link img,
.gallery-figure img { border: 1px solid #888; }
:where(a, button):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
.heading-gallery-link {
  display: inline;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}
.heading-gallery-link:hover,
.heading-gallery-link:active {
  background: transparent;
  color: inherit;
  text-decoration: none;
}

/* Calls to action */
.action-button {
  display: table;
  margin: 22px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-family: Inter, Arial, sans-serif;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.action-button:hover {
  background: transparent;
  color: var(--accent);
}

/* Social sharing */
.share-section { text-align: center; }
.share-intro {
  margin: 2rem 0 0;
  text-align: center;
}
.social-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.share-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.share-button img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.share-button:hover { opacity: .75; }
.page-end-share .share-intro { margin-top: 0; }

/* Lightbox, with positioning calculated for each slide's aspect ratio by site.js */
.gallery-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  overflow: hidden;
}
.gallery-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.gallery-shell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-stage {
  position: relative;
  flex: none;
  width: 1px;
  max-width: 100%;
}
.gallery-figure {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}
.gallery-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.gallery-figure figcaption {
  margin-top: 10px;
  color: #e2e2e2;
  text-align: center;
  font: 14px/1.3 Inter, Arial, sans-serif;
}
.gallery-control {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border: 0;
  background: rgba(35, 35, 35, .84);
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}
.gallery-close {
  top: 0;
  right: -45px;
  width: 40px;
  height: 40px;
  font-size: 32px;
}
.gallery-prev,
.gallery-next {
  top: var(--image-midpoint, 50%);
  transform: translateY(-50%);
}
.gallery-prev { left: -45px; }
.gallery-next { right: -45px; }

@media (min-width: 768px) {
  h3.section-title { font-size: clamp(1.4rem, 2.8vw, 2.2rem); }
}
@media (max-width: 767.98px) {
  .site-container { padding-left: 24px; padding-right: 24px; }
  .site-hero { margin-bottom: 0; }
  .site-hero img { border: 0; }
  #kickstarter-heading { margin-top: 0; }
  h1.section-title { padding-top: 0; }
  .section-title,
  .card-title,
  article h3 {
    background: #02497f;
    color: #fff;
    padding: .45em .55em;
  }
  .action-button {
    background: transparent;
    color: var(--accent);
  }
  .action-button:hover {
    background: var(--accent);
    color: #fff;
  }
}
@media (max-width: 479px) {
  .gallery-control { width: 30px; height: 38px; font-size: 21px; }
  .gallery-prev { left: -32px; }
  .gallery-next { right: -32px; }
  .gallery-close { right: -32px; width: 30px; height: 32px; font-size: 28px; }
}

/* Dark mode is intentionally DISABLED, matching your current stylesheet.
   To re-enable it, remove: and (min-width: 99999px) from both queries. */
@media (prefers-color-scheme: dark) and (min-width: 99999px) {
  :root {
    color-scheme: dark;
    --page-bg: #000;
    --page-fg: #fff;
    --focus: #74d1ff;
    --accent: #78bdf0;
  }
  .artwork-button img,
  .artwork-link img,
  .gallery-figure img { border: 0; }
  .action-button { color: #000; }
  .action-button:hover { color: var(--accent); }
}
@media (prefers-color-scheme: dark) and (min-width: 99999px) and (max-width: 767.98px) {
  .action-button:hover { color: #000; }
}
