/**
 * Sendai Glider — Custom styles
 * TailwindCSS is loaded via CDN in head.html
 * This file handles prose overrides, utilities, and accessibility.
 */

/* ─── Prose content styling ─── */
.prose {
  max-width: 65ch;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 3px solid;
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
}

.prose img {
  border-radius: 0.75rem;
}

.prose table {
  font-size: 0.9rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
}

.prose thead th {
  padding: 0.875rem 1.25rem;
  text-align: left;
}

.prose tbody td {
  padding: 0.75rem 1.25rem;
}

.prose tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.prose tbody tr {
  transition: background-color 0.15s ease;
}

.prose tbody tr:hover {
  background-color: #f0fdfa;
}

/* ─── Article drop cap ─── */
.article-content > p:first-of-type::first-letter {
  float: left;
  font-family: 'Oswald', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.85;
  margin-right: 0.5rem;
  margin-top: 0.15rem;
  color: #0e7490;
}

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

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

/* ─── Smooth scroll ─── */
html {
  scroll-behavior: smooth;
}

/* ─── Accessibility — focus states ─── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Global transitions ─── */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* ─── Image aspect ratio fallback ─── */
.aspect-\[16\/9\] {
  aspect-ratio: 16/9;
}

.aspect-\[16\/10\] {
  aspect-ratio: 16/10;
}

.aspect-\[4\/3\] {
  aspect-ratio: 4/3;
}

.aspect-\[21\/9\] {
  aspect-ratio: 21/9;
}

/* ─── Selection color ─── */
::selection {
  background-color: #0891b2;
  color: white;
}

/* ─── Print ─── */
@media print {
  header,
  footer,
  nav {
    display: none !important;
  }

  .prose {
    max-width: 100%;
  }

  main {
    padding-top: 0 !important;
  }
}
