/* ==================================================================
   Fiacin Solutions — Enterprise Design System
   Quantinuum-inspired: charcoal + teal/mint, Figtree + Rajdhani.
   Precise, high-contrast, technical. Commands respect.
   (Legacy token names retained; values remapped to the new palette.)
   ================================================================== */

/* ---- Design tokens ---------------------------------------------- */
:root {
  /* Classic corporate — teal accent, grey text, dense, squared.
     (Reference: heinrichlimited.com, dsppatech.com) */
  --navy-900: #242c2e;   /* dark slate — footer / dark sections / hero overlay */
  --navy-800: #333333;   /* headings, nav text */
  --navy-700: #2b2b2b;   /* dark UI / icon wells */
  --navy-600: #4a4a4a;   /* grey */
  /* Accent scale — GREEN primary (#25d394).
     --cyan-500 is a same-hue deeper green used only where text sits on
     white, so small labels/links stay legible. */
  --steel-600: #12a06f;  /* green link (on light) */
  --steel-500: #25d394;  /* signature green */
  --steel-400: #25d394;
  --cyan-500: #12a06f;   /* green accent for text on light (eyebrows, links) */
  --cyan-400: #25d394;   /* signature green pop on dark/red bands (stats) */
  --cyan-300: #25d394;   /* green on dark */
  --teal-600: #1cb87f;   /* green hover */
  --teal-500: #25d394;   /* SIGNATURE GREEN — fills, buttons */
  --teal-700: #12a06f;
  --coral-600: #1cb87f;  /* (aliases → green so old refs stay valid) */
  --coral-500: #25d394;
  --coral-300: #25d394;
  --cyan-real: #25d394;
  --indigo:    #242c2e;  /* (alias → dark slate) */
  --red-600: #1cb87f;    /* primary btn hover = green hover */
  --red-500: #25d394;    /* primary btn = green */
  --red-400: #25d394;
  --brand-red: #ed2330;  /* logo red — stats & CTA bands */
  --true-red: #c0392b;   /* classic red — fire / danger accents */
  --brand-green: #17b681; /* logo green */
  --green-600: #12a06f;   /* deep green (readable on light) */
  --green-500: #17b681;   /* brand green */
  --green-300: #25d394;   /* bright mint */
  --orange-500: #e67e22; /* classic amber highlight */

  --white: #ffffff;
  --grey-50: #f5f5f5;    /* light grey section bg */
  --grey-100: #eeeeee;
  --grey-200: #dddddd;   /* classic border grey */
  --grey-300: #cccccc;
  --grey-400: #a6a6a6;
  --grey-500: #878787;
  --grey-600: #666666;
  --grey-700: #444444;
  --grey-800: #2b2b2b;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--grey-50);
  --bg-dark: var(--navy-900);
  --text: #333333;       /* classic grey body text */
  --text-muted: var(--grey-500);
  --text-invert: #e8eaea;
  --border: #dddddd;
  --accent: var(--teal-500);
  --primary: var(--teal-500);
  --ink: #333333;        /* headings grey */

  /* Typography — Inter (closest widely-available match to Webflow's
     proprietary "WF Visual Sans": neutral grotesque, UI-optimised) */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-tech: "Inter", system-ui, Arial, sans-serif;

  --fs-xs: 0.75rem;      /* 12px */
  --fs-sm: 0.8125rem;    /* 13px */
  --fs-base: 1rem;       /* 16px — Webflow body */
  --fs-lg: 1.125rem;     /* 18px */
  --fs-xl: 1.25rem;      /* 20px — Webflow h3 */
  --fs-2xl: 1.5rem;      /* 24px */
  --fs-3xl: 2rem;        /* 32px */
  --fs-4xl: 3.25rem;     /* 52px — Webflow h2 */
  --fs-5xl: 4.6875rem;   /* 75px — Webflow h1 */

  --lh-tight: 1.05;
  --lh-snug: 1.4;
  --lh-base: 1.6;   /* Webflow body rhythm */

  /* Spacing scale */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;     --sp-10: 8rem;

  /* Radii — restrained (Webflow-calibrated: 8px surfaces, 6px controls) */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  /* Shadows — used sparingly, soft and layered rather than glossy */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.06);          /* hairline lift */
  --shadow-sm: 0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.04);
  --shadow: 0 4px 12px rgba(16,24,40,.07), 0 1px 3px rgba(16,24,40,.04);
  --shadow-lg: 0 24px 24px rgba(16,24,40,.05), 0 12px 14px rgba(16,24,40,.05),
               0 4px 8px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --shadow-cyan: 0 4px 12px rgba(37,211,148,.18);
  /* A whisper of dimension: a soft inner bottom edge on solid controls. */
  --edge-soft: inset 0 -1px 0 rgba(0,0,0,.10);
  /* Legacy gloss helpers, now neutralised — surfaces read flat. */
  --gloss-light: #ffffff;
  --gloss-top: inset 0 0 0 0 transparent;
  --transition: 180ms cubic-bezier(.4,0,.2,1);

  --container: 1240px;
  --header-h: 84px;
}

/* ---- Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--steel-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan-500); }
ul, ol { padding-left: 1.25rem; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: 2px; border-radius: 3px; }

/* ---- Typography — classic corporate ---------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: var(--lh-tight);
  font-weight: 600;
  letter-spacing: 0;
}
/* Scale mirrors Webflow: h1 75px / h2 52px / h3 20px, all weight 600 */
h1 { font-size: clamp(2.5rem, 5.2vw, var(--fs-5xl)); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.95rem, 3.7vw, var(--fs-4xl)); font-weight: 600; line-height: 1.06; letter-spacing: -0.005em; }
h3 { font-size: var(--fs-xl); font-weight: 600; line-height: 1.4; }
h4 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.45; }
p { margin-bottom: var(--sp-4); }
.lead { font-size: 1.25rem; color: var(--grey-600); line-height: 1.5; font-weight: 400; }
/* Classic eyebrow — small teal uppercase label with underline tick */
.eyebrow {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan-500);
  margin-bottom: var(--sp-3);
}
.section-header.center .eyebrow { }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---- Layout ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container-wide { max-width: 1440px; }
.section { padding-block: clamp(2.25rem, 4.5vw, 3.75rem); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy-900); color: var(--text-invert); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-header { max-width: 720px; margin-bottom: var(--sp-6); }
.section-header.center { margin-inline: auto; text-align: center; }

/* Accent shifts to light teal on dark backgrounds for contrast */
.section-dark .eyebrow, .hero .eyebrow { color: var(--cyan-300); }
.section-dark a:not(.btn):hover, .hero a:not(.btn):hover { color: var(--cyan-300); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
/* Capped at 3 columns max — 4/6 aliases fall back to 3 */
.grid-4 { grid-template-columns: repeat(3, 1fr); }
.grid-6 { grid-template-columns: repeat(3, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); }

/* Blueprint divider */
.blueprint-divider {
  height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--grey-300) 0 8px, transparent 8px 16px);
  border: 0;
  margin-block: var(--sp-6);
}
.blueprint-bg {
  background-color: var(--navy-900);   /* solid — no grid overlay */
}

/* ---- Buttons — flat and solid; depth from colour, not gloss ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
  /* hairline lift + a soft inner bottom edge = quiet dimension */
  box-shadow: var(--shadow-xs), var(--edge-soft);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); box-shadow: var(--edge-soft); }

.btn-primary { background: var(--teal-500); color: #fff; }
.btn-primary:hover { background: var(--teal-600); color: #fff; box-shadow: var(--shadow-sm), var(--edge-soft); }

.btn-secondary { background: var(--navy-800); color: #fff; }
.btn-secondary:hover { background: #000; color: #fff; box-shadow: var(--shadow-sm), var(--edge-soft); }

.btn-cyan { background: var(--teal-500); color: #fff; }
.btn-cyan:hover { background: var(--teal-600); color: #fff; }
.btn-dark { background: var(--navy-800); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }

.btn-outline { background: #fff; color: var(--ink); border-color: var(--grey-300); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: var(--teal-500); color: var(--teal-600); box-shadow: var(--shadow-sm); }
.btn-outline-light { box-shadow: none; }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.75); color: #fff; }

.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }

.btn-lg { padding: 0.95rem 1.85rem; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-download { background: var(--grey-100); color: var(--ink); border-color: var(--border); }
.btn-download:hover { background: var(--grey-200); border-color: var(--grey-300); }

/* ---- Cards — flat surface, elevation only on hover -------------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);   /* just enough to lift off the page */
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--grey-300);
}
.card-body { padding: var(--sp-5); }
.card-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--grey-100); }

/* ---- Product category cards (flagship section) ------------------ */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.solution-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: var(--sp-6);
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: var(--card-color, var(--navy-700));  /* SOLID fill (no image) */
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-sm), var(--edge-soft);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
/* Category card with a background photo + DARK gradient overlay that
   is dark at the bottom and fades upward, covering the whole card. */
.solution-card.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  /* Glossy coloured gradient (matches the button UI): image shows,
     tinted, at the top → rich category colour at the bottom. */
  background: linear-gradient(to bottom, rgba(8,11,12,.12) 0%, var(--card-color, #333) 100%);
  opacity: .92;   /* flat fallback */
}
@supports (background: color-mix(in srgb, red, blue)) {
  .solution-card.has-image::before {
    opacity: 1;
    background: linear-gradient(to bottom,
      color-mix(in srgb, var(--card-color, #333) 40%, transparent) 0%,
      color-mix(in srgb, var(--card-color, #333) 70%, transparent) 52%,
      color-mix(in srgb, var(--card-color, #333) 94%, #000 8%) 100%);
  }
}
/* Subtle top sheen so image cards read as glossy like the buttons. */
.solution-card.has-image::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, transparent 22%);
  border-radius: inherit;
}
.solution-card > * { position: relative; z-index: 1; }
.solution-card:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: var(--shadow-lg); }
.solution-card:active { transform: translateY(0); }
.solution-card:hover .solution-card__arrow { transform: translateX(4px); opacity: 1; }
.solution-card__icon {
  display: inline-flex; align-items: center;
  margin-bottom: var(--sp-5);
}
.solution-card__icon svg { width: 40px; height: 40px; stroke: #fff; }
.solution-card h3 { color: #fff; font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.solution-card p { color: rgba(255,255,255,.82); font-size: var(--fs-sm); margin-bottom: 0; }
.solution-card__meta { margin-top: auto; padding-top: var(--sp-5); display: flex; align-items: center; justify-content: space-between; }
.solution-card__link { color: #fff; font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; }
.solution-card__arrow { transition: transform var(--transition), opacity var(--transition); opacity: .7; }

/* ---- Hero ------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; align-items: center;
  min-height: clamp(440px, 62vh, 620px);   /* standard hero height */
  color: #fff;
  padding-top: var(--sp-7);
  padding-bottom: calc(var(--sp-7) + 28px); /* room for the bottom indicators */
  overflow: hidden;
  background-color: var(--navy-900);
}
.hero:focus-visible { outline: 3px solid var(--cyan-300); outline-offset: -3px; }

/* Cross-fading background layers (editable per slide from the CMS) */
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity .7s ease;
}
.hero__bg-layer.is-active { opacity: 1; }
.hero--photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(20, 26, 27, .62);   /* solid dark overlay for legibility */
}
.hero .container { position: relative; z-index: 2; width: 100%; }

/* Stacked slides — active one is in flow, others fade out behind it */
.hero__slides { position: relative; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease, visibility .55s;
  pointer-events: none;
}
.hero-slide.is-active {
  position: relative; opacity: 1; visibility: visible; transform: none;
  pointer-events: auto;
}

/* Controls — arrows on each side, indicators centred at the bottom */
.hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.32);
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}
.hero__nav:hover { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.55); }
.hero__nav:active { transform: translateY(-50%) scale(.94); }
.hero__prev { left: clamp(12px, 2.5vw, 36px); }
.hero__next { right: clamp(12px, 2.5vw, 36px); }

.hero-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: clamp(16px, 3vh, 30px); z-index: 3;
  display: flex; gap: 8px; align-items: center;
}
/* The visible bar stays 4px, but the button carries a ~24px transparent hit
   area so it is actually tappable on touch screens. */
.hero-dot {
  width: 30px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; align-items: center;
  transition: width var(--transition);
}
.hero-dot::before {
  content: ""; display: block; width: 100%; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.32); transition: background var(--transition);
}
.hero-dot:hover::before { background: rgba(255,255,255,.55); }
.hero-dot.is-active { width: 44px; }
.hero-dot.is-active::before { background: var(--cyan-300); }

@media (max-width: 768px) {
  .hero { min-height: clamp(400px, 70vh, 520px); }
  .hero__nav { width: 40px; height: 40px; }
}
/* On phones the side arrows would sit over the headline — rely on
   swipe + the bottom indicators instead. */
@media (max-width: 560px) {
  .hero__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg-layer, .hero-slide { transition: none; }
}
.hero-inner { max-width: 760px; position: relative; z-index: 2; }
.hero h1 { color: #fff; margin-bottom: var(--sp-5); }
.hero p { font-size: var(--fs-lg); color: rgba(255,255,255,.85); margin-bottom: var(--sp-6); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.hero-glow { display: none; }   /* gradients removed */

/* ---- Stats bar -------------------------------------------------- */
.stats-band { background: var(--brand-red); color: #fff; padding-block: var(--sp-7); }
.stats-band .stat__label { color: rgba(255,255,255,.85); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-5); }
.stat { text-align: center; padding: var(--sp-4); }
.stat__num { font-family: var(--font-tech); font-size: var(--fs-5xl); font-weight: 700; color: var(--cyan-400); line-height: 1; letter-spacing: 0; }
.stat__label { margin-top: var(--sp-2); font-family: var(--font-tech); font-size: var(--fs-sm); font-weight: 500; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .1em; }

/* ---- Feature / icon list --------------------------------------- */
.feature { display: flex; gap: var(--sp-4); }
.feature__icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--grey-100); display: grid; place-items: center; color: var(--steel-600);
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h4 { margin-bottom: var(--sp-2); }
.feature p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* ---- Badges / pills --------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--grey-100); color: var(--grey-600);
  /* Hug the label — never stretch inside flex/grid parents */
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
}
.badge-cyan { background: rgba(37,211,148,.10); color: var(--teal-600); }
.badge-green { background: rgba(30,132,73,.12); color: var(--green-600); }
.badge-orange { background: rgba(230,126,34,.14); color: #b5651a; }
.badge-red { background: rgba(192,57,43,.10); color: var(--true-red); }

/* ---- Breadcrumbs ------------------------------------------------ */
.breadcrumbs { font-size: var(--fs-sm); color: var(--text-muted); padding-block: var(--sp-4); }
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs li::after { content: "›"; margin-left: 6px; color: var(--grey-400); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--steel-500); }
.breadcrumbs [aria-current] { color: var(--navy-700); font-weight: 600; }

/* ---- Page banner ------------------------------------------------ */
.page-banner { color: #fff; padding-block: var(--sp-8) var(--sp-7); }
.page-banner h1 { color: #fff; margin-bottom: var(--sp-3); }
.page-banner p { color: rgba(255,255,255,.82); max-width: 640px; margin: 0; }

/* Component & layout partials are linked separately in the layout
   <head> so they download in parallel (see layouts/public.php). */
