/* =============================================
   SOLVERSTOP — Global Styles
   ============================================= */

/* --- Google Fonts ---
     Loaded via <link> tags in each HTML <head> for faster rendering.
     Do NOT re-add @import here — it is render-blocking.
     ---------------------------------------------------------------- */

/* --- Global overflow protection --- */
html { overflow-x: clip; }

/* --- CSS Variables --- */
:root {
  --white:       rgb(255, 255, 255);
  --black:       rgb(1, 1, 1);
  --blue:        rgb(2, 24, 119);
  --grey-dark:   rgb(27, 27, 27);
  --grey-light:  rgb(245, 245, 245);
  --gold:        rgb(249, 166, 2);
  --gold-light:  rgba(249, 166, 2, 0.10);
  --grey-text:   rgb(85, 85, 85);
  --grey-border: rgb(232, 232, 232);
  --font:        'Inter',roboto,sans-serif;
  --transition:  0.25s ease;
  --radius:      6px;
  --shadow:      0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.14);

  /* Fluid layout tokens */
  --container-max:  min(clamp(1200px, 82vw, 1600px), 100%);
  --container-pad:  clamp(1rem, 3vw, 2.5rem);
  --section-pad:    clamp(48px, 6vw, 96px);
  --section-pad-sm: clamp(32px, 4vw, 56px);
  --card-gap:       clamp(16px, 2vw, 32px);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font);
  background-color: var(--white);
  color: var(--black);
  font-size: 16px;
  line-height: 1.7;
}

/* --- Skip-to-content (accessibility) --- */
.skip-to-content {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--gold);
  color: var(--black);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
  box-shadow: var(--shadow-lg);
}
.skip-to-content:focus {
  top: 0;
  outline: none;
}

/* --- Back-to-top button --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold);
  color: var(--black);
}
@media (max-width: 768px) {
  .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}

/* --- Focus styles (accessibility) --- */
*:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
}
/* Remove outline for mouse clicks, keep for keyboard */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Styled scrollbar on main (pages use overflow-y:auto for scroll-snap) */
main {
  scrollbar-width: thin;                        /* Firefox */
  scrollbar-color: rgba(0,0,0,0.35) rgba(0,0,0,0.06); /* Firefox: thumb / track */
}
main::-webkit-scrollbar {
  width: 8px;
}
main::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.06);
}
main::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}
main::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.5);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--black);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: clamp(1rem, 1.5vw, 1.2rem); }
p  { margin-bottom: 1rem; text-align: justify; hyphens: none; font-size: clamp(0.925rem, 1vw, 1.05rem); }
@media (max-width: 480px) { p { text-align: left; } }
p:last-child { margin-bottom: 0; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section {
  padding: var(--section-pad) 0;
}
.section-sm {
  padding: var(--section-pad-sm) 0;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: clamp(36px, 4vw, 64px);
}
.section-header h2 {
  margin-bottom: 16px;
}
.section-header p {
  max-width: clamp(480px, 50vw, 720px);
  margin: 0 auto;
  text-align: center;
  color: var(--grey-text);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  min-height: 44px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.btn-grey {
  background: var(--grey-dark);
  color: var(--white);
  border-color: var(--grey-dark);
}
.btn-grey:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.btn-outline-blue {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline-blue:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 2.5vw, 36px);
  border: 1px solid var(--grey-border);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gold);
}
/* Global learn-more link — gold on hover */
.learn-more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--transition), color var(--transition);
  text-decoration: none;
}
.learn-more:hover {
  gap: 10px;
  color: var(--gold);
}
.card-grid {
  display: grid;
  gap: var(--card-gap);
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* --- Containers with colour --- */
.bg-blue {
  background: var(--blue);
  color: var(--white);
}
.bg-blue h1, .bg-blue h2, .bg-blue h3, .bg-blue h4, .bg-blue p { color: var(--white); }

.bg-dark {
  background: var(--grey-dark);
  color: var(--white);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark p { color: var(--white); }

.bg-light {
  background: var(--grey-light);
}

/* --- Hero Section --- */
.hero {
  padding: clamp(80px, 10vw, 140px) 0 clamp(48px, 6vw, 96px);
  position: relative;
  overflow: hidden;
}
.hero-blue {
  background: var(--blue);
  color: var(--white);
}
.hero-blue h1, .hero-blue p { color: var(--white); }
.hero-dark {
  background: var(--grey-dark);
  color: var(--white);
}
.hero-dark h1, .hero-dark p { color: var(--white); }
.hero-content { max-width: clamp(560px, 50vw, 800px); }
.hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
  display: block;
}
.hero h1 { margin-bottom: 24px; }
.hero p.lead {
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  margin-bottom: clamp(24px, 3vw, 40px);
  opacity: 0.9;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Page Hero (sub-pages) --- */
.page-hero {
  height: clamp(240px, 22vw, 360px);
  background: var(--grey-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
}
/* Dark overlay for text readability when background image is set */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(1, 1, 1, 0.82);
  z-index: 1;
  pointer-events: none;
}
.page-hero .container { width: 100%; position: relative; z-index: 2; }
.page-hero h1, .page-hero p { color: var(--white); }
.page-hero h1 { margin-bottom: 12px; }
.page-hero p  { margin-bottom: 0; opacity: 0.8; font-size: 1rem; }
.page-hero .breadcrumb {
  font-size: 0.85rem;
  opacity: 0.65;
  margin-bottom: 14px;
}
.page-hero .breadcrumb a { color: var(--white); }
.page-hero .breadcrumb span { margin: 0 6px; }
.hero-note {
  max-width: 560px;
  font-size: 0.78rem;
  line-height: 1.6;
  opacity: 0.5;
  margin-top: 10px;
  padding: 10px 16px;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
}
@media (max-width: 768px) {
  .page-hero { height: auto; padding: clamp(40px, 6vw, 56px) 0 clamp(32px, 5vw, 44px); }
}

/* --- Service Icon --- */
.service-icon {
  width: 56px;
  height: 56px;
  background: var(--blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; stroke: var(--white); fill: none; stroke-width: 2; }

/* --- Divider --- */
.divider {
  width: 60px;
  height: 4px;
  background: var(--blue);
  margin: 16px 0 24px;
  border-radius: 2px;
}
.divider-center { margin: 16px auto 24px; }

/* --- Tag / Badge --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(0,0,255,0.08);
  color: var(--blue);
}

/* --- Partner card --- */
.partner-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: clamp(24px, 2.5vw, 40px) clamp(20px, 2vw, 32px);
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.partner-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gold);
}

/* --- CTA Strip --- */
.cta-strip {
  background: var(--blue);
  color: var(--white);
  padding: clamp(40px, 5vw, 80px) 0;
  text-align: center;
}
.cta-strip h2, .cta-strip p { color: var(--white); }
.cta-strip p { font-size: clamp(0.95rem, 1.1vw, 1.1rem); margin-bottom: clamp(20px, 2.5vw, 36px); opacity: 0.9; text-align: center; }

/* --- Contact Form --- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--grey-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--black);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 1.5vw, 24px); }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-blue  { color: var(--blue) !important; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.hidden { display: none; }

/* ---------- Resource card date (used by resource-cards.js) ---------- */
.resource-card-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.02em;
  margin-top: 8px;
  text-align: center;
}

/* =============================================
   Scroll-triggered entrance animations
   ============================================= */

/* Base: hidden state */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Revealed state */
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children: add .fade-in-stagger on a parent grid/container,
   and .fade-in on each child — children appear one after another */
.fade-in-stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger > .fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger > .fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger > .fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger > .fade-in:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger > .fade-in:nth-child(6) { transition-delay: 0.40s; }
.fade-in-stagger > .fade-in:nth-child(7) { transition-delay: 0.48s; }
.fade-in-stagger > .fade-in:nth-child(8) { transition-delay: 0.56s; }
.fade-in-stagger > .fade-in:nth-child(9) { transition-delay: 0.64s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Fallback if JS is disabled — make everything visible */
noscript + style .fade-in,
.no-js .fade-in {
  opacity: 1;
  transform: none;
}
