/* ================================
   Finologue Design System — v3
   Uses your exact HSL tokens, gradients, shadows, radii, typography
   ================================ */

/* ---------- Light theme tokens (HSL) ---------- */
:root{
  /* CORE COLORS (HSL triplets) */
  --background: 0 0% 100%;          /* #FFFFFF */
  --foreground: 218 82% 18%;        /* #1e3a8a (navy) */

  --card: 0 0% 100%;                /* #FFFFFF */
  --card-foreground: 218 82% 18%;

  --primary: 218 82% 18%;           /* #1e3a8a (navy) */
  --primary-foreground: 0 0% 100%;   /* #FFFFFF */

  --secondary: 42 95% 55%;          /* #fbbf24 (gold) */
  --secondary-foreground: 218 82% 18%;

  --muted: 218 30% 96%;             /* #f8fafc */
  --muted-foreground: 218 20% 45%;

  --border: 218 30% 90%;            /* #e2e8f0 */
  --input: 218 30% 98%;             /* #f1f5f9 */
  --ring: 218 82% 18%;

  /* GRADIENTS */
  --gradient-primary: linear-gradient(135deg, hsl(218 82% 18%), hsl(218 70% 25%));
  --gradient-secondary: linear-gradient(135deg, hsl(42 95% 55%), hsl(42 85% 60%));
  --gradient-hero: linear-gradient(135deg, hsl(218 82% 18% / 0.05), hsl(42 95% 55% / 0.05));
  --gradient-card: linear-gradient(135deg, hsl(0 0% 100%), hsl(218 30% 98%));

  /* SHADOWS */
  --shadow-elegant: 0 10px 30px -10px hsl(218 82% 18% / 0.15);
  --shadow-glow: 0 0 40px hsl(42 95% 55% / 0.25);
  --shadow-card: 0 4px 12px -2px hsl(218 82% 18% / 0.10);

  /* RADII */
  --radius: 0.5rem;                 /* 8px default */

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;}:root{
  /* Higher-contrast LIGHT palette */
  --background: 210 40% 98%;        /* #f1f5f9 (off-white reduces glare) */
  --foreground: 224 71% 11%;        /* #0b1220 (very dark navy) */

  --card: 0 0% 100%;                /* #fff */
  --card-foreground: 224 71% 11%;

  --primary: 223 82% 22%;           /* #112c66 (darker than #1e3a8a for contrast) */
  --primary-foreground: 0 0% 100%;

  --secondary: 42 95% 55%;          /* #fbbf24 */
  --secondary-foreground: 224 71% 11%;

  --muted: 216 33% 94%;             /* #e2e8f0 (section backgrounds) */
  --muted-foreground: 222 24% 24%;  /* #222d3d */

  --border: 215 20% 80%;            /* #cbd5e1 (clearer outlines) */
  --input: 0 0% 100%;
  --ring: 42 95% 55%;

  --gradient-primary: linear-gradient(135deg, hsl(223 82% 22%), hsl(223 70% 30%));
  --gradient-secondary: linear-gradient(135deg, hsl(42 95% 55%), hsl(42 85% 60%));
  --gradient-hero: linear-gradient(135deg, hsl(223 82% 22% / 0.06), hsl(42 95% 55% / 0.06));
  --gradient-card: linear-gradient(135deg, #fff, hsl(216 33% 94%));

  --shadow-elegant: 0 10px 24px -8px hsl(223 82% 22% / .12);
  --shadow-glow: 0 0 36px hsl(42 95% 55% / .22);
  --shadow-card: 0 6px 14px -4px hsl(223 82% 22% / .12);

  --radius: 12px;
}


/* ---------- Dark theme tokens ---------- */
body.dark{
  --background: 218 82% 8%;         /* #0f172a */
  --foreground: 42 95% 90%;         /* #fef3c7 */

  --card: 218 82% 12%;              /* #1e293b */
  --card-foreground: 42 95% 90%;

  --primary: 42 95% 55%;            /* #fbbf24 */
  --primary-foreground: 218 82% 18%;

  --secondary: 218 82% 20%;         /* #334155 */
  --secondary-foreground: 42 95% 90%;

  --muted: 218 82% 15%;             /* #334155 */
  --muted-foreground: 42 40% 75%;

  --border: 218 60% 20%;            /* #475569 */
  --input: 218 82% 15%;             /* #334155 */
  --ring: 42 95% 55%;

  /* DARK GRADIENTS & SHADOWS */
  --gradient-primary: linear-gradient(135deg, hsl(42 95% 55%), hsl(42 85% 65%));
  --gradient-secondary: linear-gradient(135deg, hsl(218 82% 15%), hsl(218 82% 25%));
  --gradient-hero: linear-gradient(135deg, hsl(218 82% 8% / 0.8), hsl(42 95% 55% / 0.1));
  --gradient-card: linear-gradient(135deg, hsl(218 82% 12%), hsl(218 82% 15%));

  --shadow-elegant: 0 10px 30px -10px hsl(42 95% 55% / 0.25);
  --shadow-glow: 0 0 50px hsl(42 95% 55% / 0.40);
  --shadow-card: 0 4px 12px -2px hsl(218 82% 8% / 0.50);
}

/* ---------- Base resets ---------- */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-body);
  background:hsl(var(--background));
  color:hsl(var(--foreground));
  line-height:1.6;
}
h1,h2,h3,h4{
  font-family:var(--font-heading);
  line-height:1.2;
  margin:.3em 0;
}
h1{font-size:clamp(32px,4.2vw,56px)}
h2{font-size:clamp(28px,3vw,40px)}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:hsl(var(--muted-foreground));margin:24px 0 8px}
.lead{color:hsl(var(--foreground) / 0.9);max-width:800px}

/* ---------- Layout: header & nav ---------- */
.nav{
  background:hsl(var(--card));
  box-shadow:var(--shadow-card);
  position:sticky; top:0; z-index:10;
  border-bottom:1px solid hsl(var(--border));
}
.nav-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.logo{font-weight:800;color:hsl(var(--primary));text-decoration:none;font-size:20px}
.nav nav a{
  margin-left:18px;color:hsl(var(--foreground) / .85);text-decoration:none;
  padding:8px 2px;border-bottom:2px solid transparent;transition:color .18s ease, border-color .18s ease;
}
.nav nav a:hover{color:hsl(var(--foreground));border-bottom-color:hsl(var(--secondary))}
.nav nav a.active{color:hsl(var(--foreground));border-bottom-color:hsl(var(--secondary))}
.btn.small{padding:6px 10px;font-size:14px}

/* ---------- Hero ---------- */
.hero{
  background:
    linear-gradient(0deg, hsl(var(--primary) / .10), hsl(var(--primary) / .10)),
    var(--gradient-hero),
    linear-gradient(180deg, hsl(218 82% 18%), hsl(218 70% 25%));
  color:hsl(var(--primary-foreground));
  padding:80px 0;
}
.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:36px;align-items:center}
.hero .sub{opacity:.9}
.mock{
  height:280px;border-radius:16px;
  background:var(--gradient-card);
  box-shadow:inset 0 0 0 2px hsl(var(--border) / .6);
}

/* ---------- Buttons (component classes per your spec) ---------- */
.btn{
  display:inline-block;
  background:var(--gradient-primary);
  color:hsl(var(--primary-foreground));
  padding:16px 32px;
  border-radius:12px;
  text-decoration:none;font-weight:700;
  box-shadow:var(--shadow-elegant);
  transition:transform .15s ease, filter .2s ease;
}
.btn:hover{filter:brightness(.97);transform:translateY(-1px)}

.btn.outline{
  background:transparent;
  color:hsl(var(--primary));
  border:2px solid hsl(var(--primary));
  padding:16px 32px;border-radius:12px;
  backdrop-filter:blur(4px);
  box-shadow:none;
}
.btn.dark{
  background:hsl(var(--card));
  color:hsl(var(--primary));
}
.btn-row .btn{margin-right:10px}

/* Named button classes (aliases if you prefer) */
.primary-btn{ composes: btn; }
.secondary-btn{
  background:var(--gradient-secondary);
  color:hsl(var(--secondary-foreground));
  padding:16px 32px;border-radius:12px;
  box-shadow:var(--shadow-glow);
}
.outline-btn{ composes: btn outline; }

/* ---------- Cards & grids ---------- */
.card{
  background:hsl(var(--card));
  color:hsl(var(--card-foreground));
  border:1px solid hsl(var(--border));
  border-radius:16px;
  box-shadow:var(--shadow-card);
  padding:24px;
}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;margin:24px 0}

/* Hero & service card variants (per spec) */
.hero-card{
  background:hsl(var(--card) / 0.9);
  backdrop-filter:blur(24px);
  border:1px solid hsl(var(--border) / 0.5);
  border-radius:16px;
  padding:32px;
  box-shadow:var(--shadow-elegant);
}
.service-card{
  background:hsl(var(--card));
  color:hsl(var(--card-foreground));
  padding:24px;
  border-radius:8px;
  border:1px solid hsl(var(--border));
  box-shadow:var(--shadow-card);
}

/* Infographic thumbnails */
.ig .ig-thumb{
  height:140px;
  background:var(--gradient-card);
  border-radius:12px;margin-bottom:12px;
}
.link{color:hsl(var(--primary));text-decoration:none;font-weight:600}

/* ---------- Ticker ---------- */
.ticker{overflow:hidden;white-space:nowrap}
.ticker .track{display:inline-block;padding-left:100%;animation:ticker 22s linear infinite}
.ticker .track .mr{margin-right:24px}
@keyframes ticker{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}

/* ---------- CTA band ---------- */
.cta{
  background:
    linear-gradient(0deg, hsl(var(--secondary) / .05), hsl(var(--secondary) / .05)),
    var(--gradient-secondary);
  color:hsl(var(--secondary-foreground));
  padding:36px 0;margin-top:40px;
  box-shadow:var(--shadow-glow) inset;
}
.cta-row{display:flex;align-items:center;justify-content:space-between}

/* ---------- Selector (customers) ---------- */
.selector .step{margin-bottom:14px}
.selector label{margin-right:12px;display:inline-flex;align-items:center;gap:6px}
.selector input[type="radio"]{accent-color:hsl(var(--primary))}
.selector .result ul{list-style:none;padding-left:0}
.selector .note{color:hsl(var(--muted-foreground));font-size:14px}
.barwrap{display:flex;height:20px;border-radius:12px;overflow:hidden;background:hsl(var(--muted));margin:10px 0 8px}
.bar{height:100%}
.bar.eq{background:hsl(218 80% 40%)} .bar.hy{background:hsl(42 95% 55%)} .bar.de{background:hsl(150 45% 45%)}

/* ---------- Footer ---------- */
.footer{background:hsl(218 82% 10%);color:hsl(220 20% 92%);margin-top:40px}
.footer-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:20px;padding:28px 0}
.footer a{color:inherit;text-decoration:none}
.footnote{text-align:center;border-top:1px solid hsl(0 0% 100% / .1);padding:12px 0;color:hsl(220 15% 75%)}

/* ---------- Floating WhatsApp ---------- */
.wa-float{
  position:fixed;right:18px;bottom:18px;background:#25D366;color:#fff;
  width:56px;height:56px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;box-shadow:0 10px 24px rgba(0,0,0,.15);text-decoration:none;font-size:24px;z-index:50
}
.wa-float:hover{filter:brightness(.95);transform:translateY(-1px)}

/* ---------- Accessibility helpers ---------- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip:focus{left:10px;top:10px;width:auto;height:auto;background:#fff;color:#000;padding:8px 12px;z-index:999}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .cta-row{flex-direction:column;gap:12px}
  .btn{display:block;text-align:center;width:100%}
}
/* Readable Mode (Aa): toggle with .readable on <body> */
.readable {
  --foreground: 224 71% 10%;
  --card-foreground: 224 71% 10%;
}

.readable body, body.readable {
  font-size: 18px;          /* base up from ~16 → 18 */
  line-height: 1.75;        /* more breathing room */
}

.readable .container { max-width: 960px; }         /* narrower for easier scanning */
.readable .prose, .readable .card { font-size: 18px; line-height: 1.75; }

.readable a, .readable .link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.readable .btn { font-weight: 800; }               /* clearer hierarchy */
.readable input, .readable textarea {
  border: 2px solid hsl(var(--border));            /* clearer fields */
}

/* Stronger focus ring for keyboard users */
:focus-visible {
  outline: 3px solid hsl(var(--ring));
  outline-offset: 2px;
  border-radius: 8px;
}

/* Optional: reduce animation for motion sensitive users */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
