/* Cerita Yasmin — gaya halaman publik. Terang, editorial, satu warna aksen (biru tua). */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin-opsz-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin-opsz-italic.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --paper: #fbf7ef;
  --paper-2: #f3ecdf;
  --ink: #27231e;
  --ink-2: #5c5349;
  --rule: #e2d8c5;
  --accent: #1d1b4f;
  --accent-hover: #3a3592;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --wide: 68rem;
  --text: 36rem;
  --pad: clamp(1.15rem, 4vw, 2rem);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 4px;
}
.skip:focus {
  top: 0.75rem;
  color: #fff;
}

/* ---------- bilah atas & kaki ---------- */

.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.topbar-in {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover {
  color: var(--accent);
}
.star {
  flex: none;
}
.home-link {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.home-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.footer-in {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
}
.footer-in p {
  margin: 0 0 0.6rem;
  max-width: 40rem;
}
.footer-links a {
  color: var(--ink-2);
}

/* ---------- beranda ---------- */

.home {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.masthead {
  padding: clamp(2.5rem, 7vw, 5rem) 0 2rem;
  max-width: 42rem;
}
.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.masthead h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.masthead-small h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
}
.intro p {
  margin: 0 0 1em;
  font-size: clamp(1.1rem, 2.4vw, 1.25rem);
  line-height: 1.65;
}
.signature {
  margin: 0;
  font-style: italic;
  color: var(--ink-2);
}
.count {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-2);
}

.genres {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.95rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.genres ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0.85rem 0.1rem;
  list-style: none;
  white-space: nowrap;
}
.genres a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.35rem 0;
}
.genres a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.genres a[aria-current="page"] {
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.stories {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stories > li + li {
  border-top: 1px solid var(--rule);
}

.card {
  display: grid;
  gap: 1rem;
  padding: 2rem 0;
}
.card-cover {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 3 / 2;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  min-width: 0;
}
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.tag:hover {
  text-decoration: underline;
}
.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-title a {
  color: var(--ink);
  text-decoration: none;
}
.card-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.card-excerpt {
  margin: 0 0 0.75rem;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-info {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-2);
}

@media (min-width: 46rem) {
  .card {
    grid-template-columns: 17rem 1fr;
    gap: 2rem;
    align-items: start;
  }
  .card-nocover {
    grid-template-columns: 1fr;
    max-width: 42rem;
  }
  .card-featured {
    grid-template-columns: 1.35fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
    align-items: center;
  }
  .card-featured .card-title {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  }
  .card-featured .card-excerpt {
    font-size: 1.15rem;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

.empty {
  padding: 3rem 0 2rem;
  max-width: 34rem;
}
.empty-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--accent);
}
.empty p {
  margin: 0 0 0.5rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.pager-now {
  color: var(--ink-2);
}

/* ---------- halaman cerita ---------- */

.story {
  padding: clamp(2rem, 6vw, 4rem) var(--pad) 0;
}
.story-head,
.prose,
.note,
.the-end {
  max-width: var(--text);
  margin-left: auto;
  margin-right: auto;
}
.story-head h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-wrap: balance;
}
.story-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.story-cover {
  max-width: 54rem;
  margin: 2rem auto 0;
}
.story-cover img {
  width: 100%;
  border-radius: 4px;
  background: var(--paper-2);
}

.prose {
  margin-top: 2.5rem;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
  line-height: 1.75;
  hyphens: manual;
}
.prose p {
  margin: 0 0 1.15em;
}
.prose h2,
.prose h3 {
  margin: 2.2em 0 0.7em;
  line-height: 1.25;
  font-weight: 650;
  color: var(--ink);
  text-wrap: balance;
}
.prose h2 {
  font-size: 1.45em;
}
.prose h3 {
  font-size: 1.2em;
}
.prose strong {
  font-weight: 650;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0.1em 0 0.1em 1.25em;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.3em;
}
.prose hr.scene {
  border: 0;
  margin: 2.4em 0;
  height: auto;
  text-align: center;
  color: var(--accent);
}
.prose hr.scene::after {
  content: "*\2002*\2002*";
  font-size: 1.1em;
  letter-spacing: 0.3em;
}
.prose figure {
  margin: 2em 0;
}
.prose figure img {
  margin: 0 auto;
  border-radius: 4px;
}
.prose figcaption {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
}

.the-end {
  margin-top: 2.5rem;
  margin-bottom: 0;
  text-align: center;
}
.the-end .star {
  display: inline-block;
}

.note {
  margin-top: 2.5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--paper-2);
  border-radius: 6px;
  font-size: 1.05rem;
}
.note h2 {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.note p {
  margin: 0 0 0.8em;
}
.note-sign {
  font-style: italic;
  color: var(--ink-2);
}

.prevnext {
  max-width: var(--wide);
  margin: 4rem auto 0;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.pn {
  display: block;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.pn:last-child {
  border-bottom: 1px solid var(--rule);
}
.pn-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-2);
  margin-bottom: 0.25rem;
}
.pn-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.pn:hover .pn-title {
  color: var(--accent);
  text-decoration: underline;
}
@media (min-width: 46rem) {
  .prevnext {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .pn,
  .pn:last-child {
    border-bottom: 1px solid var(--rule);
  }
  .pn-next {
    text-align: right;
  }
}

.others {
  max-width: var(--wide);
  margin: 3.5rem auto 0;
  padding: 0 var(--pad);
}
.others h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
}
.others-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.others-list > li + li {
  border-top: 1px solid var(--rule);
}
.others .card {
  padding: 1.5rem 0;
}
.others .card-title {
  font-size: 1.25rem;
}
@media (min-width: 46rem) {
  .others-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .others-list > li + li {
    border-top: 0;
  }
  .others .card,
  .others .card-nocover {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .others .card-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* ---------- pratinjau (admin) ---------- */

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.7rem var(--pad);
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  text-align: center;
}
.preview-banner a {
  color: #fff;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 0.12s ease;
  }
}

@media print {
  .topbar,
  .site-footer,
  .prevnext,
  .others,
  .genres {
    display: none;
  }
  body {
    background: #fff;
  }
}
