/* ============================================================
   Cimule base styles (stage 3.3)
   Zorka's look (Montserrat + Merriweather, spaced headings, pill buttons)
   in the current cimule.com colors, made readable for WCAG 2.2 AA:
   body text 16px and dark enough; light grey and #2098D1 are never used for text.
   Loaded after vendor/bootstrap.min.css (Bootstrap 5 reboot + grid).
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/merriweather-400.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/merriweather-400-italic.woff2") format("woff2"); }
/* 9.2: fallbacks sized to match, so text keeps its line breaks when the web fonts arrive (they shifted the page by
   up to 0.27 CLS on slow phones). Measured on English and Spanish site text against Arial and Times New Roman
   (their metric clones, Liberation Sans and Serif). */
@font-face { font-family: "Montserrat Fallback"; font-weight: 400; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); size-adjust: 111.46%; ascent-override: 86.85%; descent-override: 22.52%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; font-weight: 600 700; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); size-adjust: 108.92%; ascent-override: 88.87%; descent-override: 23.04%; line-gap-override: 0%; }
@font-face { font-family: "Merriweather Fallback"; font-style: normal; src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"); size-adjust: 121.23%; ascent-override: 81.17%; descent-override: 22.52%; line-gap-override: 0%; }
@font-face { font-family: "Merriweather Fallback"; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Liberation Serif Italic"); size-adjust: 113.27%; ascent-override: 86.87%; descent-override: 24.10%; line-gap-override: 0%; }

/* ---------- Colors (current cimule.com) ---------- */
:root {
  --c-blue: #0035A4;        /* brand blue: buttons, links, bands, headings accents */
  --c-blue-dark: #00287D;   /* hover */
  --c-ink: #25282C;         /* headings */
  --c-text: #3A3D42;        /* body text (11:1 on white) */
  --c-muted: #5E636B;       /* secondary text (6:1 on white) */
  --c-periwinkle: #8697C3;  /* decoration only (not for text) */
  --c-gold: #EFC653;        /* gold buttons and numbers on blue */
  --c-sky: #2098D1;         /* focus rings and decoration only */
  --c-line: #DDDDDD;
  --c-soft: #EEEEEE;
  --c-pale: #F4F6FB;        /* pale blue panels */
  --c-white: #FFFFFF;
  --font-sans: "Montserrat", "Montserrat Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-serif: "Merriweather", "Merriweather Fallback", Georgia, "Times New Roman", serif;
  --radius: 12px;
  --pill: 2rem;
  --space-section: clamp(3rem, 6vw, 5.5rem);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--c-ink);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 .75rem;
}
h1 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); letter-spacing: .03em; }
h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); letter-spacing: .06em; }
h3 { font-size: 1.05rem; letter-spacing: .04em; }
h4 { font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }

a { color: var(--c-blue); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-blue-dark); text-decoration-thickness: 2px; }

/* Keyboard focus, visible everywhere */
:focus-visible { outline: 3px solid var(--c-sky); outline-offset: 2px; }

/* Skip link (first thing on every page) */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 1000; padding: .75rem 1rem; background: var(--c-blue); color: #fff; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; color: #fff; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Text styles ---------- */
/* Small italic label above a heading (Zorka's Merriweather caption) */
.eyebrow { font-family: var(--font-serif); font-style: italic; color: var(--c-blue); font-size: .95rem; letter-spacing: .04em; margin: 0 0 .5rem; }
/* Blue lead sentence (current cimule.com) */
.lead { font-size: clamp(1rem, .95rem + .2vw, 1.1rem); color: var(--c-blue); line-height: 1.55; }
.muted { color: var(--c-muted); }
/* Spaced capitals, used for card titles and small headings */
.caps { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0; }
.section--pale { background: var(--c-pale); }
.section--soft { background: var(--c-soft); }
.section + .section:not(.section--pale):not(.section--soft):not(.band) { border-top: 1px solid var(--c-soft); }

/* Section header: label + heading on the left, blue lead on the right (current cimule.com) */
.section-head { display: grid; gap: 1rem 3rem; margin-bottom: 2.5rem; }
@media (min-width: 992px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.section-head__label { display: inline-block; font-size: .9rem; color: var(--c-blue); text-decoration: underline; text-underline-offset: .25em; margin-bottom: .5rem; }
.section-head h2 { margin: 0; }
.section-head .lead { margin: 0; }
.section-head--center { text-align: center; grid-template-columns: 1fr !important; max-width: 46rem; margin-left: auto; margin-right: auto; }

/* ---------- Buttons (Zorka pill with fill-on-hover) ---------- */
.btn {
  position: relative; z-index: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.6rem;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--c-blue); border-radius: var(--pill);
  background: var(--c-blue); color: #fff; cursor: pointer;
  transition: color .3s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: #fff; transform: scale(0); transition: transform .3s ease-out;
}
.btn:hover, .btn:focus-visible { color: var(--c-blue); text-decoration: none; }
.btn:hover::before, .btn:focus-visible::before { transform: scale(1); }

.btn--outline { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.btn--outline::before { background: var(--c-ink); }
.btn--outline:hover, .btn--outline:focus-visible { color: #fff; }

.btn--gold { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-ink); }
.btn--gold::before { background: #fff; }
.btn--gold:hover, .btn--gold:focus-visible { color: var(--c-ink); }

.btn--on-blue { background: transparent; border-color: #fff; color: #fff; }
.btn--on-blue::before { background: #fff; }
.btn--on-blue:hover, .btn--on-blue:focus-visible { color: var(--c-blue); }

.btn--small { min-height: 44px; padding: .5rem 1.1rem; font-size: .75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }

/* Text link with arrow (current cimule.com card links) */
.link-arrow { font-weight: 600; letter-spacing: .04em; text-decoration: none; }
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.card--line { border: 1px solid var(--c-line); }
.card--shadow { box-shadow: 0 6px 24px rgba(37, 40, 44, .08); }
.card__media { margin: -1.5rem -1.5rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card__media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
.card p:last-child { margin-bottom: 0; }

/* Icon box (Zorka feature item, in blue) */
.icon-box { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start; }
.icon-box__icon { font-size: 2.75rem; color: var(--c-blue); line-height: 1; }
.icon-box h3 { margin-bottom: .4rem; }
.icon-box--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }

/* ---------- Blue band with gold button (current cimule.com call to action) ---------- */
.band { background: var(--c-blue); color: #fff; padding: var(--space-section) 0; }
.band h2, .band h3 { color: #fff; }
.band a:not(.btn) { color: #fff; }
.band .lead { color: #fff; }
.band--center { text-align: center; }
.band--center .btn-row { justify-content: center; }

/* Numbers strip: gold figures on blue (current cimule.com) */
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 3rem; margin: 0; padding: 0; list-style: none; }
.stats__item { display: flex; align-items: baseline; gap: .6rem; }
.stats__num { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); font-weight: 700; color: var(--c-gold); letter-spacing: .02em; }
.stats__label { font-size: .9rem; line-height: 1.3; color: #fff; max-width: 11rem; }
.stats--on-white .stats__num { color: var(--c-blue); }
.stats--on-white .stats__label { color: var(--c-text); }

/* ---------- Steps ---------- */
/* Numbered step card with a blue edge (current cimule.com) */
.step { position: relative; background: var(--c-pale); border-left: 4px solid var(--c-blue); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-right: .75rem; background: var(--c-blue); color: #fff; font-weight: 700; border-radius: 6px; }
.step h3 { display: flex; align-items: center; color: var(--c-blue); margin-bottom: .5rem; }
/* Big step numbers (home page "1 2 3") */
.big-num { display: block; font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--c-blue); margin-bottom: .75rem; }

/* ---------- Highlight box (light gold, current cimule.com) ---------- */
.callout { background: #FDF7E3; border: 1px solid var(--c-gold); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.callout h3 { color: #6B5200; font-size: .95rem; }

/* ---------- Comparison table (blue header row) ----------
   Markup: <div class="table-wrap" tabindex="0" role="region" aria-label="..."> so keyboard users can scroll it. */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--c-line); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 34rem; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.table thead th { background: var(--c-blue); color: #fff; font-weight: 600; letter-spacing: .04em; position: sticky; top: 0; }
.table tbody tr:nth-child(even) { background: var(--c-pale); }
.table tbody th { font-weight: 600; color: var(--c-ink); }
.table .yes { color: #1E6B34; font-weight: 600; }
.table .no { color: var(--c-muted); }

/* ---------- Trade tile with blue corner frame (current cimule.com) ---------- */
.tile { display: block; text-align: center; text-decoration: none; color: var(--c-ink); }
.tile__frame { position: relative; display: block; margin: 14px auto 1rem; max-width: 200px; }
.tile__frame::before { content: ""; position: absolute; top: -14px; left: -14px; right: -14px; height: 42%; background: var(--c-blue); z-index: 0; }
.tile__frame img { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.tile__name { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 359.98px) { .tile__name { letter-spacing: .04em; font-size: .78rem; } }   /* 9.1: long trade names fit two columns at 320 px (WCAG 1.4.10) */
.tile:hover .tile__name { color: var(--c-blue); text-decoration: underline; }

/* ---------- Forms (base) ---------- */
label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--c-ink); }
.field { margin-bottom: 1.1rem; }
.input, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 48px; padding: .65rem .9rem;
  font: inherit; color: var(--c-ink); background: #fff;
  border: 1px solid #8A8F96; border-radius: 8px;
}
textarea { min-height: 8rem; }
.hint { font-size: .875rem; color: var(--c-muted); margin-top: .3rem; }
.error-text { font-size: .9rem; color: #A3201B; margin-top: .3rem; }
[aria-invalid="true"] { border-color: #A3201B; }
.form-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { margin-bottom: 1.5rem; padding: 1rem 1.25rem; border: 2px solid #A3201B; border-radius: var(--radius); background: #FDF1F0; }
.form-errors h3 { color: #A3201B; font-size: 1rem; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors a { color: #A3201B; }

/* ---------- Staging-only helper ---------- */
.panel-missing { margin: 1rem; padding: 1rem; border: 2px dashed #A3201B; color: #A3201B; }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Current cimule.com trade photos already include the blue frame */
.tile--baked .tile__frame { margin-top: 0; }
.tile--baked .tile__frame::before { display: none; }

/* Narrow containers (no inline styles: the security policy blocks them) */
.container--form { max-width: 36rem; }
.container--narrow { max-width: 40rem; }
.container--text { max-width: 46rem; }

/* Text alignment helpers (Bootstrap's grid file does not include them) */
.text-center { text-align: center; }
.text-start { text-align: left; }

/* Plain photos in trade tiles: draw the same frame the current site's trade photos have
   built in (blue band behind the top of the photo, photo inset), so every tile matches. */
.tile:not(.tile--baked) .tile__frame { margin-top: 0; padding: 11% 12% 0; background: linear-gradient(var(--c-blue) 0 46%, transparent 46%); }
.tile:not(.tile--baked) .tile__frame img { aspect-ratio: 129 / 207; }
.tile:not(.tile--baked) .tile__frame::before { display: none; }

/* Breadcrumbs (title band and single hero) */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; font-size: .875rem; color: var(--c-muted); }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; padding-right: .3rem; color: var(--c-muted); }
.breadcrumb a { color: var(--c-blue); }

/* Tabs (shared by tools-by-goal and faq-topics) */
.tabs__list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--c-soft); }
.tabs__list[hidden] { display: none; }
.tabs__tab { display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: .6rem 1.1rem; margin-bottom: -2px; background: none; border: 0; border-bottom: 3px solid transparent; font: inherit; font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink); cursor: pointer; }
.tabs__tab span { font-size: 1.3rem; color: var(--c-blue); }
.tabs__tab[aria-selected="true"] { color: var(--c-blue); border-bottom-color: var(--c-blue); }
.tabs__tab:hover { color: var(--c-blue); }
.tabs__panel { margin-bottom: 2rem; }
.tabs.is-ready .tabs__panel { margin-bottom: 0; }
.tabs.is-ready .tabs__panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabs__intro { color: var(--c-muted); }
.tools-goal__list { list-style: none; padding: 0; margin: 0; }
