/* =============================================
   Hairline Lannoy — Custom Styles
   Palette: Cyan/Rose | Fonts: Lora + Inter
   ============================================= */

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

::selection {
  background-color: #0891b21a;
  color: #0e7490;
}

/* --- Header states --- */
#site-header {
  background: transparent;
}

#site-header.header-scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Text color swap: white on transparent, dark on scrolled */
.header-text-swap {
  color: #fff;
  transition: color 0.3s ease;
}

.header-scrolled .header-text-swap {
  color: #1a1a2e;
}

/* Active nav link always shows primary */
.header-scrolled a[class*="text-primary"] {
  color: #0891b2;
}

/* Height utilities for fixed header spacing */
.h-18 { height: 4.5rem; }
.h-20 { height: 5rem; }

/* --- Scroll reveal animations --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children if needed */
[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* --- Line clamp --- */
.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;
}

/* --- Prose refinements --- */
.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.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-width: 3px;
  padding-left: 1.25rem;
  margin: 2rem 0;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
}

.prose th {
  padding: 0.75rem 1rem;
  background: #fafbfc;
  border-bottom: 2px solid #e5e7eb;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

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

/* --- Focus accessibility --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Smooth scroll indicator bounce --- */
@keyframes subtle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.animate-bounce {
  animation: subtle-bounce 2s ease-in-out infinite;
}

/* --- Print --- */
@media print {
  header, footer, nav, [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  header, footer {
    display: none !important;
  }

  .prose {
    max-width: 100%;
  }
}
