
/* Basic reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fff;
  --fg: #000;
  --header-h: 88px;
  --nav-button-padding: 10px 18px;
}

/* Custom font (place your OTF in /fonts/YourFont.otf) */
@font-face {
  font-family: "CustomOpen";
  src: url("../fonts/Caroni-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
body {
  font-family: "CustomOpen", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  /* looping background tile that scrolls slowly */
  background-image: url('../assets/bg.png');
  background-repeat: repeat;
  background-position: 0 0;
  animation: bg-scroll 80s linear infinite;
}

/* slow background scroll (loops) */
@keyframes bg-scroll {
  from { background-position: 0 0; }
  to   { background-position: 2000px 0; } /* adjust speed/length */
}

/* Topbar with centered nav */
.topbar {
  position: sticky;
  top: 0;
  background: #000;
  color: #fff;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-bottom: 3px solid #111;
}

/* logo left of nav or above nav depending on viewport */
.site-logo {
  height: 64px;
  margin-right: 18px;
  object-fit: contain;
}

/* center nav — keeps buttons centered */
.nav-center {
  display:flex;
  gap: 14px;
  align-items:center;
}

/* Buttons style (actual <button> elements) */
.nav-center button,
.external-links button,
#comic-controls button {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  padding: var(--nav-button-padding);
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-size: 16px;
}

/* hover scale + subtle shadow */
.nav-center button:hover,
.external-links button:hover,
#comic-controls button:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* page content */
.content {
  padding: 0;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--fg);
}

/* grid for thumbnails */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

/* each comic card */
.comic-card {
  display:block;
  text-decoration: none;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0px;
  border-radius: 0px;
  transition: transform 140ms ease, box-shadow 140ms ease;
  text-align:center;
}
.comic-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }

.thumb {
  width:100%;
  height: auto;
  border-radius:3px;
  display:block;
  margin-bottom: 8px;
}

/* Make thumbnail cards fixed-size boxes */
.grid {
  /* fixed column width instead of minmax */
  grid-template-columns: repeat(auto-fill, 280px);
  justify-content: center; /* center grid when there's leftover space */
}

.comic-card {
  width: 285px; /* keep card width matching the column */
}

.thumb {
  width: 280px;         /* fills the card width (210px) */
  height: 280px;       /* fixed thumbnail height — change to taste */
  object-fit: cover;   /* crop to fill the box without distortion */
  display: block;
}

.comic-title { font-weight: 900; margin-bottom: 6px; }
.comic-author { font-size: 12px; color: #333; }

/* pages container (vertical) */
.pages {
  display:flex;
  flex-direction:column;
  gap: 0px;
  margin-top: 0px;
}
.comic-page {
  width: 100%;
  max-width: 1000px;
  align-self: center;
  border: 0px solid #ddd;
  border-radius: 6px;
}

/* About section */
.about-me {
  display:flex;
  gap:20px;
  align-items:flex-start;
  margin-top: 12px;
}
.about-pic {
  width: 220px;
  height: auto;
  border-radius: 8px;
}
.about-text { flex:1; }

/* === BUTTONS: force everything interactive to use the custom font === */
/* Make sure this comes after any other button rules to override them */
button,
button * ,            /* icons inside buttons */
a.button-link,
a.button-link * {
  font-family: "CustomOpen", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 700; /* keep weight similar to your nav style */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ensure anchor buttons look like your existing nav style */
a.button-link {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  padding: var(--nav-button-padding);
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === PAGES: make them flow together seamlessly === */
/* overwrite existing .pages gap and .page-wrap margins */
.pages {
  display: flex;
  flex-direction: column;
  gap: 0; /* critical: no gap between pages */
  margin-top: 12px;
  /* if you want a small center column max width, keep the container centered */
  align-items: center;
}

/* page wrapper should not add extra spacing */
.page-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
  box-shadow: none; /* remove any shadow that might create visual separation */
}

/* make the images touch one another edge-to-edge; remove borders and radius */
.comic-page {
  width: 100%;
  max-width: 1000px;  /* keep your previous max width if desired */
  display: block;
  border: none;       /* remove border so pages butt together */
  border-radius: 0;   /* remove radius so there's no gap */
  margin: 0;
  padding: 0;
  vertical-align: top;
}


/* small screens adjustments */
@media (max-width:720px) {
  .topbar { height: 110px; flex-direction: column; gap: 6px; padding:8px; }
  .site-logo { height: 48px; }
  .nav-center { gap:10px; flex-wrap:wrap; justify-content:center; }
  .about-me { flex-direction:column; align-items:center; }
}

