/* ===== Root variables ===== */
:root {
  --fade-dur: 520ms;
  --fade-ease: cubic-bezier(.2,.65,.3,1);
  /* defaults used by verse styles below */
  --accent: #7aa2ff;
  --fg-verse: #e6e6e6;
}

/* ===== Main quote component ===== */
figure.main-quote {
  max-width: 70ch;
  margin: 1.75rem auto;
  text-align: center;
}

/* Decorative quote SVG */
figure.main-quote > svg.quote-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: #9aa1a8;
  opacity: .9;
}

/* Quote text */
.main-quote .quote-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1.5rem;        /* ~text-2xl */
  font-style: italic;
  font-weight: 500;         /* medium */
  line-height: 1.6;
  color: #e6e6e6;           /* soft white on black */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .main-quote .quote-text { font-size: 1.625rem; } /* ~26px */
}

/* Optional subtle card wrap (shared style) */
.quote-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 1.5rem auto;
  max-width: 70ch;
  text-align: center;
}

/* ===== Base layout & typography ===== */
body {
  background-color: #000;         /* black background */
  color: #fff;                    /* white text */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji";
  margin: 0;
  padding: 0;
  min-height: 100vh;
  text-align: center;             /* center all text */
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px); /* leave room for nav height */
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

/* Navigation bar */
.nav {
  display: flex;
  justify-content: center; /* centers menu horizontally */
  gap: 0.75rem;
  padding: 1rem 2rem;
}

/* Navigation links */
.nav a {
  color: #fff;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ----- Paragraph tags ----- */
p {
  font-size: 1.2rem;
  line-height: 1.6;
  text-align: left; /* default for small screens */
}
@media (min-width: 768px) {
  p { text-align: justify; } /* justify on tablets/desktop */
}

/* Link buttons */
.btn-pill {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-pill:hover {
  background-color: #524b4b;
  color: #111;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Stoic image (on /stoicism) */
.stoic-img {
  max-width: 60%;
  width: 50%;
  height: auto;
  margin-top: 1.5rem;
  border-radius: 8px;
}

/* Content container */
.container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.containertext {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left;
}
@media (max-width: 768px) {
  .container {
    flex-direction: column;   /* stack vertically */
    align-items: center;      /* center items in the column */
    text-align: center;       /* center text inside the container */
  }
  .containertext {
    text-align: center;       /* center text content */
    margin-top: 1rem;         /* space between image and text */
  }
  .stoic-img {
    max-width: 80%;           /* let the image grow wider on mobile */
    width: 100%;
  }
}

/* Lists without bullets */
.stoic-text ul,
.stoic-text ol {
  font-size: inherit;
  line-height: inherit;
  margin: 1rem 0 1rem 1.5rem;
  padding: 0;
  list-style: none;   /* removes bullets/numbers */
}

/* ===== Scripture / verse blocks ===== */
.scripture {
  margin-top: 1.25rem;
  max-width: 70ch;
  margin-inline: auto;
}
.verse { margin: 0; } /* remove default figure margins */

.verse-text blockquote {
  margin: 0;                 /* remove extra space */
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 1.125rem;       /* a touch larger than body */
  line-height: 1.65;
  color: var(--fg-verse);
}

.scripture-card {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  max-width: 70ch;
  margin-inline: auto;
}

.verse-text {
  margin: 0;
  padding-left: 0.9rem;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #e6e6e6;
}

.verse-ref {
  margin-top: 0.35rem;
  font-size: .95rem;
  color: #b6b6b6;
  letter-spacing: 0.02em;
}

.explanation {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #f0f0f0;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  font-size: 0.75rem;   /* smaller text */
  color: #777;          /* muted gray */
  margin-top: 3rem;     /* spacing from content */
  padding: 1rem 0;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .site-footer { margin-top: 5rem; }
}
.site-footer a {
  color: inherit;       /* same muted color */
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ===== Fade-in utilities ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0; /* start hidden, then animate to 1 */
  animation: fade-up var(--fade-dur) var(--fade-ease) forwards;
  will-change: opacity, transform;
}
.fade-seq > * {
  opacity: 0;
  animation: fade-up var(--fade-dur) var(--fade-ease) forwards;
}
.fade-seq > *:nth-child(1) { animation-delay: 0ms; }
.fade-seq > *:nth-child(2) { animation-delay: 90ms; }
.fade-seq > *:nth-child(3) { animation-delay: 180ms; }
.fade-seq > *:nth-child(4) { animation-delay: 270ms; }
.fade-seq > *:nth-child(5) { animation-delay: 360ms; }
.fade-seq > *:nth-child(6) { animation-delay: 450ms; }
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-seq > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
