/* =============================================
   GovTech Trust Valley — Custom CSS
   Supplements Tailwind CDN
   ============================================= */

/* ─── Typography foundation ─────────────────── */

/* Body uses Inter — clean, screen-optimised */
body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  color: #1e293b; /* slate-800 */
}

/* All headings use Montserrat for authority */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
}

/* Section h2: bold is enough — extrabold everywhere reads as shouting */
h2 {
  font-weight: 700 !important;
}

/* Card/sub-section h3: semibold */
h3 {
  font-weight: 600 !important;
}

/* ─── Details / FAQ ──────────────────────────── */

details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

details[open] > summary .rotate-on-open {
  transform: rotate(45deg);
}

/* ─── 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;
}

/* ─── Prose (blog posts) ─────────────────────── */

.prose {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #334155; /* slate-700 */
  max-width: 65ch;
  line-height: 1.75;
}
.prose h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.375rem;
  font-weight: 700 !important;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  color: #003257;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600 !important;
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
  color: #003257;
  letter-spacing: -0.01em;
}
.prose p {
  margin-bottom: 1.125rem;
  line-height: 1.8;
}
.prose ul {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0ea5e9;
}
.prose ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}
.prose ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.prose a {
  color: #005c8a;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 165, 233, 0.25);
  transition: color 0.15s, border-color 0.15s;
}
.prose a:hover {
  color: #0ea5e9;
  border-color: #0ea5e9;
}
.prose strong {
  font-weight: 600;
  color: #003257;
}
.prose blockquote {
  border-left: 2px solid #0ea5e9;
  padding: 0.875rem 1.25rem;
  margin: 1.75rem 0;
  background: #f8fafc; /* slate-50 — neutral, not baby-blue */
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #475569; /* slate-600 */
}
.prose code {
  background: #f1f5f9;
  color: #003257;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.prose hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}
.prose img {
  border-radius: 0.75rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  margin: 1.75rem 0;
}

/* ─── Timeline ───────────────────────────────── */

.timeline-item:last-child .timeline-connector {
  display: none;
}

/* ─── Focus styles ───────────────────────────── */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
label:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Skip to main content ───────────────────── */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #003257;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ─── Smooth scroll ──────────────────────────── */

html {
  scroll-behavior: smooth;
}

/* ─── Image lazy-load fade-in ────────────────── */

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.35s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
