/* ──────────────────────────────────────────────
   Arc-en-Ciel — Theme Aube
   Custom CSS — complement TailwindCSS CDN
   ────────────────────────────────────────────── */

/* Smooth behaviour */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero parallax ── */
.hero-parallax {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

@media (max-width: 768px) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

/* ── Image treatments ── */
.img-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.img-fade {
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}


/* ══════════════════════════════════════════════
   ARTICLE PROSE — Magazine-grade typography
   ══════════════════════════════════════════════ */

/* ── Drop cap: first paragraph gets a large initial letter ── */
.article-content > p:first-of-type::first-letter {
  font-family: 'DM Serif Display', Georgia, serif;
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  padding-right: 0.08em;
  padding-top: 0.07em;
  color: #3a7d7e;
  font-weight: 400;
}

/* First paragraph — slightly larger, leading */
.article-content > p:first-of-type {
  font-size: 1.2em;
  line-height: 1.85;
  color: #6b5b4e;
}

/* ── Headings ── */
.prose-custom h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.65rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, #3a7d7e 0%, transparent 70%) 1;
  color: #6b5b4e;
  letter-spacing: -0.01em;
}

.prose-custom h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #6b5b4e;
  letter-spacing: -0.01em;
}

.prose-custom h4 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: #6b5b4e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

/* ── Paragraphs ── */
.prose-custom p {
  margin-bottom: 1.35rem;
  line-height: 1.85;
}

/* ── Lists — custom bullets ── */
.prose-custom ul {
  margin-bottom: 1.35rem;
  padding-left: 0;
  list-style: none;
}

.prose-custom ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.75;
}

.prose-custom ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a7d7e, #5ba3a4);
}

/* Nested list bullets — smaller, different style */
.prose-custom ul ul li::before {
  width: 5px;
  height: 5px;
  background: transparent;
  border: 1.5px solid #3a7d7e;
}

.prose-custom ol {
  margin-bottom: 1.35rem;
  padding-left: 0;
  list-style: none;
  counter-reset: ol-counter;
}

.prose-custom ol li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.75;
  counter-increment: ol-counter;
}

.prose-custom ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #f5f0ea;
  color: #3a7d7e;
  font-weight: 600;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* ── Blockquote — editorial pull-quote ── */
.prose-custom blockquote {
  position: relative;
  border-left: none;
  padding: 1.75rem 2rem 1.75rem 2.5rem;
  margin: 2.5rem 0;
  background: linear-gradient(135deg, #f5f0ea 0%, #faf8f5 100%);
  border-radius: 12px;
  font-style: italic;
}

.prose-custom blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(to bottom, #3a7d7e, #b45542);
}

.prose-custom blockquote p {
  margin-bottom: 0;
  color: #6b5b4e;
  font-size: 1.05em;
  line-height: 1.75;
}

.prose-custom blockquote p:last-child {
  margin-bottom: 0;
}

/* Attribution in blockquote (em dash prefix) */
.prose-custom blockquote p:last-child em {
  display: block;
  font-style: normal;
  font-size: 0.85em;
  color: rgba(107, 91, 78, 0.5);
  margin-top: 0.75rem;
}

/* ── Links ── */
.prose-custom a {
  color: #3a7d7e;
  text-decoration: none;
  background-image: linear-gradient(#3a7d7e, #3a7d7e);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.prose-custom a:hover {
  color: #b45542;
  background-image: linear-gradient(#b45542, #b45542);
  background-size: 100% 1px;
}

/* ── Strong / Bold ── */
.prose-custom strong {
  font-weight: 600;
  color: #6b5b4e;
}

/* ── Horizontal rules ── */
.prose-custom hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #e5e0d8, transparent);
  margin: 2.5rem 0;
}

/* ── Images in article content ── */
.prose-custom img {
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ── Tables in article content ── */
.prose-custom table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.prose-custom thead th {
  background: #f5f0ea;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  color: #6b5b4e;
  border-bottom: 2px solid #e5e0d8;
}

.prose-custom tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f5f0ea;
  font-size: 0.95rem;
}

.prose-custom tbody tr:last-child td {
  border-bottom: none;
}

/* ── Code in prose ── */
.prose-custom code {
  background: #f5f0ea;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  color: #b45542;
}

.prose-custom pre {
  background: #2d2a26;
  color: #f5f0ea;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose-custom pre code {
  background: none;
  padding: 0;
  color: inherit;
  border-radius: 0;
}


/* ══════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════ */

/* ── Line clamping ── */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Card hover lift ── */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ── Gradient text ── */
.text-gradient {
  background: linear-gradient(135deg, #3a7d7e, #b45542);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section divider ── */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #3a7d7e, #b45542);
  border-radius: 2px;
}

/* ── Focus states ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #3a7d7e;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Base transitions ── */
a, button {
  transition: color 0.2s ease, background-color 0.25s ease;
}

/* ── Staggered fade-in animation ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ── Navbar scroll shadow ── */
.nav-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* ── Print ── */
@media print {
  header, footer, nav, .no-print, #reading-progress { display: none !important; }
  .prose-custom { max-width: 100%; }
  body { background: white; }
}
