/* ============================================================
   Slop Tales — Main Stylesheet
   ============================================================ */

/* ── Font source — swap this URL to use your own CDN ────────
   Current source : Google Fonts
   To use your CDN : replace the url() value below, e.g.
     url('https://cdn.example.com/fonts/andika.css')
   ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Andika&display=swap');

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

:root {
  --color-bg:          #fafaf8;
  --color-text:        #1a1a1a;
  --color-accent:      #c85a1e;
  --color-muted:       #6b6561;
  --color-border:      #e0dbd5;
  --color-footer-bg:   #1a1a1a;
  --color-footer-text: #f0ede8;
  --max-width:         860px;
  --font-serif:        'Andika', Georgia, 'Times New Roman', Times, serif;
  --font-sans:         'Andika', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-serif);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--color-border);
}

.site-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-title a {
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  justify-content: center;
}

.site-title a:hover {
  color: var(--color-accent);
}

.site-title img {
  display: block;
  height: 8rem;
  width: auto;
}

/* ── Main content ────────────────────────────────────────── */

main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Breadcrumb ──────────────────────────────────────────── */

nav.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

nav.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
}

nav.breadcrumb a:hover {
  color: var(--color-accent);
}

nav.breadcrumb .sep {
  margin: 0 0.45rem;
  opacity: 0.5;
}

/* ── Page title ──────────────────────────────────────────── */

h1.page-title {
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 2.5rem;
}

/* ── Home page — month sections ──────────────────────────── */

.month-section {
  margin-bottom: 2.5rem;
}

.month-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
}

.month-label a {
  color: inherit;
  text-decoration: none;
}

.month-label a:hover {
  color: var(--color-accent);
}

/* ── Story list (home + month pages) ────────────────────── */

.story-list {
  list-style: none;
}

.story-list li {
  border-bottom: 1px solid var(--color-border);
}

.story-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.story-list a {
  display: block;
  padding: 0.85rem 0.25rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.1rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.story-list a:hover {
  color: var(--color-accent);
  padding-left: 0.6rem;
}

/* ── Story page ──────────────────────────────────────────── */

.story-carousel-section {
  margin-bottom: 3rem;
}

/* Constrain carousel width to a comfortable portrait size */
#story-splide {
  max-width: 480px;
  margin: 0 auto;
}

/* Each slide: image on top, text below */
.splide__slide-inner {
  display: flex;
  flex-direction: column;
}

.slide-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.slide-text {
  margin-top: 1.4rem;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
}

/* ── Splide overrides ────────────────────────────────────── */

/* Push arrows to sit beside the image, vertically centred on it */
.splide__arrow {
  background: var(--color-accent);
  opacity: 1;
  width: 2.4rem;
  height: 2.4rem;
}

.splide__arrow:hover,
.splide__arrow:focus-visible {
  background: #a04818;
  opacity: 1;
}

.splide__arrow svg {
  fill: #fff;
  width: 1rem;
  height: 1rem;
}

/* Arrow positions relative to the track */
.splide__arrow--prev { left: -3rem; }
.splide__arrow--next { right: -3rem; }

/* On narrow screens where side arrows don't fit, move them below */
@media (max-width: 640px) {
  .splide__arrow--prev { left: 0.5rem; }
  .splide__arrow--next { right: 0.5rem; }
}

/* Pull pagination out of absolute flow so it sits below the slide text */
.splide__pagination {
  position: static;
  margin-top: 1.25rem;
  padding: 0;
}

/* Pagination dots */
.splide__pagination__page {
  background: var(--color-border);
  border: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 1;
  transition: background 0.2s;
}

.splide__pagination__page.is-active {
  background: var(--color-accent);
  transform: none;
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 1.4rem 1.5rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

footer a {
  color: var(--color-footer-text);
  text-decoration: none;
  opacity: 0.65;
}

footer a:hover {
  opacity: 1;
}
