@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* It's a Sepha Comics — site stylesheet */
:root {
  --bg: #f6efe4;
  --bg-deep: #efe3d1;
  --paper: #fffdf8;
  --ink: #2a231b;
  --ink-muted: #6a6156;
  --ink-faint: #8a8176;
  --line: #e6d9c7;
  --line-strong: #d4c3a8;
  --teal: #2f6461;
  --teal-mid: #3c7874;
  --teal-deep: #214845;
  --teal-soft: #dce8e6;
  --teal-wash: #eef4f3;
  --coral: #b44a3c;
  --coral-soft: #f6e0db;
  --gold: #a7843c;
  --gold-soft: #f3e7c6;
  --shadow: 0 12px 36px rgba(42, 35, 27, 0.08);
  --shadow-sm: 0 4px 16px rgba(42, 35, 27, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Nunito", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1140px;
  --narrow: 760px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 450;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(47, 100, 97, 0.06), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(167, 132, 60, 0.07), transparent 46%);
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-color: rgba(47, 100, 97, 0.35); text-underline-offset: 0.16em; }
a:hover { color: var(--teal-deep); text-decoration-color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  color: var(--ink);
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); font-weight: 650; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--teal);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, white);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.wordmark .eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--teal);
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark .name {
  font-family: var(--font-serif);
  font-weight: 650;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-deep);
  background: var(--teal-soft);
}

/* Main layout */
.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}
.wrap.narrow { max-width: calc(var(--narrow) + 2.5rem); }

.page-hero {
  margin-bottom: 2rem;
}
.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}
.lede {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 42rem;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--gold);
  margin: 0.25rem 0 1.5rem;
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.ornament span { font-size: 0.85rem; }

/* Buttons & chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.62rem 1.1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--teal-deep); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn.secondary {
  background: transparent;
  color: var(--teal-deep);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--teal-wash); color: var(--teal-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }

.chip, .tag {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  line-height: 1.4;
}
.chip:hover, .tag:hover { background: var(--teal-soft); color: var(--teal-deep); text-decoration: none; }
.tag.gold { background: var(--gold-soft); color: #6d5420; }
.tag.coral { background: var(--coral-soft); color: #8a382e; }

/* Cards / gallery */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.15rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.card:hover, .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.card-img {
  background: var(--bg-deep);
  aspect-ratio: 1 / 1.02;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.55rem;
}
.card-img img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}
.card-body {
  padding: 0.8rem 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.card-body h3 {
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: auto; padding-top: 0.35rem; }

/* Home */
.home-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-top: 1.25rem;
}
.home-intro h1 { margin-bottom: 0.4rem; }
.home-intro .lede { font-size: 1.15rem; }
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1.2rem;
  padding: 0;
  list-style: none;
}
.social-row a {
  font-weight: 750;
  text-decoration: none;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.social-row a:hover { text-decoration: underline; }
.intro-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
}
.intro-panel .quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 0.7rem;
}
.intro-panel .who { color: var(--ink-muted); font-size: 0.92rem; }

.today-block {
  margin: 2.5rem 0 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  min-height: 320px;
}
.today-art {
  background: var(--teal-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  min-height: 280px;
}
.today-art img {
  max-height: 560px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.today-copy {
  padding: 1.75rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.today-copy h2 { margin-bottom: 0.35rem; }
.today-feast { color: var(--teal-deep); font-weight: 750; margin-bottom: 0.65rem; }
.today-empty {
  color: var(--ink-muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.15rem;
}
.section-head h2 { margin: 0; }
.section-head a { font-weight: 750; font-size: 0.95rem; white-space: nowrap; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: end;
  margin: 0 0 1.5rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  min-width: 0;
}
.filters .grow { flex: 1 1 220px; }
.filters .field {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  width: 100%;
}
.filters .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  padding-bottom: 0.15rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
}
.filters .checks label {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}
.results-count {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

/* Comic page */
.comic-page { max-width: 900px; margin: 0 auto; }
.crumb {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--teal); text-decoration: underline; }
.crumb ol { display: flex; flex-wrap: wrap; gap: 0.3rem 0.15rem; list-style: none; padding: 0; margin: 0; }
.crumb li:not(:last-child)::after { content: " / "; color: var(--line-strong); margin-left: 0.3rem; }

.comic-frame {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow);
  margin: 1.2rem 0 1.5rem;
}
.comic-frame figure { margin: 0 0 1rem; }
.comic-frame figure:last-child { margin-bottom: 0; }
.comic-frame img {
  margin: 0 auto;
  border-radius: 6px;
  width: auto;
  max-height: none;
}

.caption {
  background: var(--teal-wash);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin: 0 0 1.4rem;
  white-space: pre-wrap;
  color: var(--ink);
}
.meta-block {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.meta-block strong { color: var(--ink); font-weight: 750; }
.meta-block a { font-weight: 700; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  margin-top: 0.5rem;
}
.pager a {
  text-decoration: none;
  color: var(--ink);
  max-width: 46%;
  font-weight: 650;
}
.pager a:hover { color: var(--teal-deep); }
.pager .dir {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 750;
  margin-bottom: 0.15rem;
}
.pager .next { text-align: right; margin-left: auto; }

/* Calendar */
.year-grid {
  display: grid;
  gap: 2.2rem;
}
.month h2 {
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 7.2rem;
  padding: 0.4rem 0.4rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
a.day:hover { border-color: var(--teal-mid); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; }
.day.empty { background: transparent; border-style: dashed; opacity: 0.85; }
.day.is-today { box-shadow: 0 0 0 2px var(--teal); }
.day-num {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--teal-deep);
}
.day-feast {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.day-thumb {
  margin-top: auto;
  height: 3.1rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.day-thumb img {
  max-height: 3.1rem;
  width: auto;
  border-radius: 3px;
}
.day.vacant .day-feast { -webkit-line-clamp: 4; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: -0.4rem 0 1.5rem;
}
.month-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.6rem;
}
.month-jump a {
  text-decoration: none;
  font-weight: 750;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}
.month-jump a:hover { background: var(--teal-soft); color: var(--teal-deep); }

/* Indexes */
.index-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.7rem;
}
.index-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.index-item:hover { border-color: var(--teal-mid); text-decoration: none; color: inherit; }
.index-item h3 { margin: 0; font-size: 1.05rem; }
.index-item .count {
  margin-left: auto;
  font-weight: 800;
  color: var(--teal);
  font-size: 0.9rem;
  white-space: nowrap;
}
.index-thumbs {
  display: flex;
  width: 4.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
}
.index-thumbs img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-deep);
}

/* Novenas */
.novena-series {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem 1.3rem 1.5rem;
  margin-bottom: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.novena-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.series-page .card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.novena-frame img { margin: 0 auto; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--teal-deep);
  color: #e7efee;
  margin-top: auto;
  padding: 2.2rem 1.25rem 1.8rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.4rem 2rem;
}
.site-footer a { color: #f3efe4; text-decoration-color: rgba(243, 239, 228, 0.35); }
.site-footer a:hover { color: #fff; }
.site-footer h2 {
  color: #f6efe4;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.copyright { opacity: 0.86; font-size: 0.92rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0; margin: 0.4rem 0 0; list-style: none; }
.footer-nav a { font-weight: 700; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* About */
.about-stack { display: grid; gap: 1.2rem; }
.about-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

/* 404 */
.err-page { text-align: center; padding: 4rem 1rem 5rem; }
.err-page h1 { font-size: clamp(2.5rem, 8vw, 5rem); }

/* Hidden (filters) */
.is-hidden { display: none !important; }

/* Responsive */
@media (max-width: 860px) {
  .home-intro,
  .today-block { grid-template-columns: 1fr; }
  .today-art { min-height: 220px; padding: 1rem; }
  .today-art img { max-height: 420px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.6rem 1rem 0.9rem;
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.65rem 0.7rem; }
  .month-grid { grid-template-columns: repeat(4, 1fr); }
  .day { min-height: 6.2rem; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0.65rem 0.9rem; }
  .wrap { padding: 1.4rem 0.9rem 2.6rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .card-body { padding: 0.6rem 0.65rem 0.75rem; }
  .card-body h3 { font-size: 0.92rem; }
  .month-grid { grid-template-columns: repeat(3, 1fr); }
  .comic-frame { padding: 0.45rem; border-radius: 12px; }
  .pager { flex-direction: column; }
  .pager a, .pager .next { max-width: 100%; text-align: left; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .filters, .pager, .btn-row { display: none !important; }
  body { background: #fff; }
  .comic-frame { box-shadow: none; border: 0; padding: 0; }
}

/* Avoid a double card frame when a .card link sits inside article.card */
article.card > a.card {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  transform: none !important;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.card > a.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.card > a.card-link:hover {
  color: inherit;
  text-decoration: none;
}
