/* ==========================================================================
   Gratis Solutions — global stylesheet
   Loaded on every page. Page-specific rules belong in public/css/pages/*.css.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --navy-900: #0c1430;
  --navy-800: #13214f;
  --navy-700: #1b2f6f;
  --navy-600: #2c4597;   /* brand */
  --navy-500: #3f5cb8;
  --navy-050: #eef2fc;

  --accent:      #00b2ff;
  --accent-600:  #0091d6;
  --accent-050:  #e4f6ff;

  --ink:   #0e1119;
  --body:  #454c5c;
  --muted: #6b7280;   /* 4.83:1 on white, 4.51:1 on --bg-soft — WCAG AA. Do not lighten. */
  --line:  #e3e7f0;
  --bg:      #ffffff;
  --bg-soft: #f5f7fc;

  --success: #16a34a;
  --danger:  #dc2626;
  --warning: #d97706;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(12, 20, 48, .06);
  --shadow:    0 10px 30px rgba(12, 20, 48, .08);
  --shadow-lg: 0 28px 70px rgba(12, 20, 48, .16);
  --glow:      0 10px 34px rgba(0, 178, 255, .32);

  --maxw: 1200px;
  --gutter: 24px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step-6: clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem);
  --step-5: clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem);
  --step-4: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --step-3: clamp(1.375rem, 1.2rem + .8vw, 1.75rem);
  --step-2: 1.1875rem;
  --step-1: 1.0625rem;
  --step-0: 1rem;
  --step--1: .9375rem;
  --step--2: .8125rem;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.022em; font-weight: 800; }
h1 { font-size: var(--step-6); letter-spacing: -.032em; }
h2 { font-size: var(--step-5); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Layout primitives -------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 7vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: rgba(255,255,255,.78); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.section-head { max-width: 760px; margin: 0 auto clamp(36px, 4vw, 60px); text-align: center; }
.section-head p { font-size: var(--step-2); color: var(--muted); margin-top: 16px; }
.section-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-block; font-size: var(--step--2); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--navy-600); margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--accent); }

.grid { display: grid; gap: clamp(18px, 2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: var(--step--1); letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--navy-900); box-shadow: var(--glow); }
.btn--primary:hover { background: #22c0ff; }
.btn--navy { background: var(--navy-600); color: #fff; box-shadow: var(--shadow); }
.btn--navy:hover { background: var(--navy-700); }
.btn--light { background: #fff; color: var(--navy-800); box-shadow: var(--shadow); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--outline { border: 1.5px solid var(--line); color: var(--navy-700); background: #fff; }
.btn--outline:hover { border-color: var(--navy-600); }
.btn--lg { padding: 17px 36px; font-size: var(--step-1); }
.btn--block { width: 100%; }

/* --- Cards -------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 2.4vw, 34px); box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3daea; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--body); }
.card--flat:hover { transform: none; box-shadow: var(--shadow-sm); }

.checklist { margin-top: 18px; display: grid; gap: 11px; }
.checklist li {
  position: relative; padding-left: 30px; font-size: var(--step--1); color: var(--body);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230091d6' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat;
}
.section--dark .checklist li { color: rgba(255,255,255,.8); }

/* --- Role cards ----------------------------------------------------------
   Shared by the home page (Task 5) and the techWALL page (Task 6). */
.role-card { display: block; }
.role-card h3 { color: var(--navy-700); }
.role-card__more { margin-top: 18px; display: inline-block; font-weight: 700; color: var(--accent-600); font-size: var(--step--1); }

/* --- Stats -------------------------------------------------------------- */
.stat { text-align: center; }
.stat__num {
  font-size: clamp(2.75rem, 1.6rem + 4vw, 4.5rem); font-weight: 900; line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 0%, #9fd8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { margin-top: 14px; font-size: var(--step--1); color: rgba(255,255,255,.7); }
.section:not(.section--dark) .stat__num {
  background: linear-gradient(180deg, var(--navy-600) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.section:not(.section--dark) .stat__label { color: var(--muted); }

/* --- Certification strip -------------------------------------------------
   Shared by the home page (Task 5) and the partners page (Task 8). */
.cert-strip { background: var(--navy-050); border-block: 1px solid var(--line); padding-block: 16px; text-align: center; font-size: var(--step--1); font-weight: 600; color: var(--navy-700); }

/* --- Logo wall ---------------------------------------------------------- */
.logo-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.logo-wall__cell { background: #fff; display: grid; place-items: center; padding: 26px 18px; min-height: 108px; }
.logo-wall__cell img { max-height: 44px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .62; transition: filter .2s ease, opacity .2s ease; }
.logo-wall__cell:hover img { filter: none; opacity: 1; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 24px; text-align: left; font-weight: 700; color: var(--ink); font-size: var(--step-1);
}
.faq__icon { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--navy-050); color: var(--navy-600); display: grid; place-items: center; font-size: 20px; line-height: 1; transition: transform .22s ease; }
.faq__item.is-open .faq__icon { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s ease; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 24px 22px; color: var(--body); }

/* --- Testimonial -------------------------------------------------------- */
.testimonial { background: var(--navy-900); color: rgba(255,255,255,.82); }
.testimonial__inner { max-width: 900px; margin-inline: auto; }
.testimonial__quote { font-size: var(--step-3); line-height: 1.5; color: #fff; font-weight: 500; }
.testimonial__quote + .testimonial__quote { margin-top: 20px; font-size: var(--step-1); color: rgba(255,255,255,.78); font-weight: 400; }
.testimonial__mark { font-size: 5rem; line-height: .6; color: var(--accent); font-weight: 900; }
.testimonial__who { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.testimonial__name { font-weight: 800; color: #fff; }
.testimonial__role { color: rgba(255,255,255,.6); font-size: var(--step--1); }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 55%, var(--navy-700) 100%); color: #fff; text-align: center; }
.cta-band p { max-width: 620px; margin: 16px auto 30px; color: rgba(255,255,255,.82); font-size: var(--step-2); }

/* --- Nav ---------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__links a { padding: 9px 14px; border-radius: var(--radius-sm); font-size: var(--step--1); font-weight: 600; color: var(--body); transition: color .16s ease, background-color .16s ease; }
.nav__links a:hover { color: var(--navy-700); background: var(--navy-050); }
.nav__links a.is-active { color: var(--navy-700); background: var(--navy-050); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.nav__phone { font-weight: 700; font-size: var(--step--1); color: var(--navy-700); white-space: nowrap; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: var(--radius-sm); font-size: 22px; color: var(--navy-800); }

/* --- Footer ------------------------------------------------------------- */
.footer { background: var(--navy-900); color: rgba(255,255,255,.62); padding-top: clamp(48px, 5vw, 76px); }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer__logo img { height: 38px; margin-bottom: 18px; }
.footer__logo p { max-width: 340px; font-size: var(--step--1); }
.footer h4 { color: #fff; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { font-size: var(--step--1); transition: color .16s ease; }
.footer a:hover { color: var(--accent); }
.footer__bottom { margin-top: clamp(40px, 4vw, 60px); border-top: 1px solid rgba(255,255,255,.1); padding-block: 24px; text-align: center; font-size: var(--step--2); }

/* --- Prose (blog bodies, legal pages) ----------------------------------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--step-4); margin-top: 1.9em; }
.prose h3 { font-size: var(--step-3); margin-top: 1.6em; }
.prose p, .prose li { font-size: var(--step-1); line-height: 1.75; }
.prose a { color: var(--navy-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote { border-left: 4px solid var(--accent); padding-left: 22px; font-size: var(--step-2); color: var(--ink); font-style: italic; }
.prose img { border-radius: var(--radius); }
.prose figure figcaption { margin-top: 10px; font-size: var(--step--1); color: var(--muted); text-align: center; }

/* --- Product hero --------------------------------------------------------
   Shared by techWALL, payWALL, and autoWALL (Task 6). */
.product-hero { background: var(--navy-900); color: rgba(255,255,255,.78); padding-block: clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.product-hero::before { content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(0,178,255,.24) 0%, transparent 66%); }
.product-hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.product-hero__logo { height: 44px; width: auto; margin-bottom: 20px; }
.product-hero h1 { color: #fff; }
.product-hero__lede { margin-top: 20px; font-size: var(--step-2); color: rgba(255,255,255,.8); max-width: 52ch; }
.product-hero__actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 36px; }
.steps { counter-reset: step; display: grid; gap: 22px; max-width: 760px; margin-inline: auto; }
.steps li { counter-increment: step; position: relative; padding-left: 62px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 42px; height: 42px; border-radius: 50%; background: var(--navy-600); color: #fff; font-weight: 800; display: grid; place-items: center; }
@media (max-width: 900px) { .product-hero__inner { grid-template-columns: 1fr; } .product-hero__art { display: none; } .hero-stats { grid-template-columns: 1fr; } }

/* --- Role pages ---------------------------------------------------------- */
.role-hero h1 { max-width: 20ch; }
.pain-card { border-left: 3px solid var(--danger); }
.pain-card h3 { font-size: var(--step-2); color: var(--ink); }
.role-quote { max-width: 720px; margin: 44px auto 0; }
.role-quote p { font-size: var(--step-3); color: #fff; line-height: 1.5; }
.role-quote cite { display: block; margin-top: 16px; font-style: normal; font-size: var(--step--1); color: rgba(255,255,255,.6); }

/* --- Utilities ---------------------------------------------------------- */
.media-placeholder {
  display: grid; place-items: center; min-height: 220px; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 12px, #eceff7 12px, #eceff7 24px);
  color: var(--muted); font-size: var(--step--1); border: 1px dashed var(--line);
}
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__toggle { display: grid; place-items: center; }
  .nav__phone { display: none; }
  .nav__links {
    position: fixed; inset: 76px 0 auto; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 22px;
    gap: 2px; box-shadow: var(--shadow); display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 14px 12px; font-size: var(--step-1); }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid--4 { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
