/* ============================================================
   OTIMIZ — services hub + service pages
   Builds on style.css tokens/components (.btn, .eyebrow, .faq,
   .cta__panel, .footer). Loaded after style.css on subpages.
   ============================================================ */

/* ---------- Fonts (self-hosted variable woff2, latin subset)
   Duplicated from style.css so pages.css stands alone if ever
   loaded without it. Same URLs, so no extra downloads. ---------- */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/sora-var.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/manrope-var.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Skip link (a11y, duplicated from style.css) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  z-index: 300;
  padding: 12px 18px;
  background: var(--blue-deep); color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 600;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.subpage { background: var(--bg); }

/* Solid header on subpages (no hero sits behind it) */
.subpage .header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -20px rgba(11, 17, 38, 0.16);
}

/* generic section rhythm */
.s-section { padding: 92px 0; position: relative; }
.s-section--soft { background: var(--bg-soft); }
@media (max-width: 1024px) { .s-section { padding: 64px 0; } }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; }
.crumbs a { color: var(--muted); transition: color .2s ease; }
.crumbs a:hover { color: var(--blue-deep); }
.crumbs__sep { color: var(--muted); opacity: 0.5; }
.crumbs__current { color: var(--ink); }

/* ---------- Subpage hero ---------- */
.shero {
  position: relative;
  padding: calc(var(--header-h) + 60px) 0 60px;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 80% -12%, rgba(37, 99, 235, 0.10), transparent 60%),
    linear-gradient(180deg, var(--blue-tint) 0%, rgba(234, 240, 254, 0) 72%);
}
.shero__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(11, 17, 38, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 72% at 78% 18%, black, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 70% 72% at 78% 18%, black, transparent 76%);
  pointer-events: none;
}
.shero__inner { position: relative; z-index: 1; max-width: 840px; }
.shero .crumbs { margin-bottom: 24px; }
.shero__title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--ink);
}
.shero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue) 0%, #4f8af9 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.shero__lead { margin-top: 20px; max-width: 640px; font-size: 1.18rem; color: var(--body); }
.shero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Image-less hero: no right-side media, so center the column instead of
   leaving it left-aligned against an empty right half. Split heros (which
   carry .shero__inner--split and a real image) keep their two-column layout. */
.shero__inner:not(.shero__inner--split) { margin-left: auto; margin-right: auto; text-align: center; }
.shero__inner:not(.shero__inner--split) .crumbs,
.shero__inner:not(.shero__inner--split) .shero__cta { justify-content: center; }
.shero__inner:not(.shero__inner--split) .shero__lead { margin-left: auto; margin-right: auto; }

/* ghost / secondary button */
.btn--ghost { background: #fff; color: var(--blue-deep); border: 1px solid rgba(37, 99, 235, 0.25); box-shadow: var(--shadow-soft); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(37, 99, 235, 0.5); }

/* inline trust row */
.trust-inline { display: flex; align-items: center; gap: 13px; margin-top: 28px; flex-wrap: wrap; }
.trust-inline .stars .star { width: 16px; height: 16px; }
.trust-inline__text { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: var(--body); }
.trust-inline__text a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Section heads + prose ---------- */
.s-head { max-width: 720px; margin-bottom: 46px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.s-head--center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }
.s-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700; line-height: 1.16; letter-spacing: -0.02em;
  color: var(--ink);
}
.s-sub { font-size: 1.1rem; color: var(--body); max-width: 640px; }
.s-prose p { font-size: 1.08rem; color: var(--body); margin-bottom: 18px; max-width: 720px; }
.s-prose p:last-child { margin-bottom: 0; }
.s-prose strong { color: var(--ink); font-weight: 700; }

/* ---------- Problem callout ---------- */
.s-problem {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 34px 38px;
  max-width: 760px;
}
.s-problem__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #b03b3b; background: rgba(190, 60, 60, 0.1);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.s-problem p { color: var(--ink); font-size: 1.06rem; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--blue-tint); color: var(--blue-deep);
  font-family: var(--font-display); font-weight: 800; font-size: 0.95rem;
  margin-bottom: 18px;
}
.step__title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; margin-bottom: 9px; }
.step__desc { color: var(--body); font-size: 0.98rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Feature grid ---------- */
/* Flex-wrap + centered so a partial last row (e.g. a lone 3rd card) centers
   instead of stranding left. Full rows sum to 100%, so they are unaffected. */
.feature-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.feature-grid > .feature { flex: 0 1 calc((100% - 20px) / 2); min-width: 0; }
.feature {
  display: flex; gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .3s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(37, 99, 235, 0.3); }
.feature__ico { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--blue-tint); color: var(--blue-deep); display: flex; align-items: center; justify-content: center; }
.feature__ico svg { width: 22px; height: 22px; }
.feature__title { font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; margin-bottom: 6px; }
.feature__desc { color: var(--body); font-size: 0.96rem; }
@media (max-width: 760px) { .feature-grid > .feature { flex-basis: 100%; } }

/* ---------- Checklist ---------- */
.s-checks { list-style: none; display: grid; gap: 14px; max-width: 720px; }
.s-checks li { position: relative; padding-left: 36px; color: var(--ink); font-size: 1.04rem; }
.s-checks li::before {
  content: "";
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Result / mini-case panel ---------- */
.s-case {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 36px; align-items: center;
  background:
    radial-gradient(700px 360px at 12% -20%, rgba(255,255,255,0.16) 0%, transparent 55%),
    linear-gradient(150deg, #2e6bf0 0%, var(--blue) 42%, #16329f 100%);
  border-radius: 32px;
  padding: 50px 52px;
  color: #fff;
  box-shadow: 0 40px 90px -40px rgba(21, 48, 156, 0.6);
}
.s-case__label { color: rgba(255,255,255,0.85); }
.s-case__quote { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; line-height: 1.5; letter-spacing: -0.01em; }
.s-case__quote span { color: #bcd3ff; }
.s-case__stat { text-align: center; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 30px; }
.s-case__num { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; }
.s-case__cap { opacity: 0.82; font-size: 0.95rem; margin-top: 10px; }
@media (max-width: 760px) {
  .s-case { grid-template-columns: 1fr; padding: 38px 28px; gap: 26px; }
  .s-case__stat { border-left: none; border-top: 1px solid rgba(255,255,255,0.2); padding-left: 0; padding-top: 24px; }
}

/* ---------- Tools strip ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }
.tools__chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; color: var(--ink);
  transition: transform .3s ease, box-shadow .3s ease;
}
.tools__chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tools__chip img { height: 20px; width: auto; max-width: 86px; object-fit: contain; }

/* ---------- Two-column intro (text + aside) ---------- */
.s-split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: start; }
@media (max-width: 900px) { .s-split { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Services hub grid ---------- */
.svc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.svc-grid > .svc-card { flex: 0 1 calc((100% - 48px) / 3); min-width: 0; }
.svc-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  position: relative; overflow: hidden;
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease, border-color .3s ease;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: rgba(37, 99, 235, 0.3); }
.svc-card__ico {
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--blue-tint); color: var(--blue-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  transition: background-color .35s ease, color .35s ease, transform .35s ease;
}
.svc-card:hover .svc-card__ico { background: var(--blue); color: #fff; transform: scale(1.06) rotate(-4deg); }
.svc-card__ico svg { width: 25px; height: 25px; }
.svc-card__title { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; }
.svc-card__desc { color: var(--body); font-size: 0.98rem; flex: 1; }
.svc-card__link { margin-top: 22px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--blue-deep); transition: gap .25s ease; }
.svc-card__link svg { width: 15px; height: 15px; }
.svc-card:hover .svc-card__link { gap: 11px; }
@media (max-width: 980px) { .svc-grid > .svc-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .svc-grid > .svc-card { flex-basis: 100%; } }

/* ---------- Related services (bottom of a service page) ---------- */
.related { display: flex; flex-wrap: wrap; gap: 12px; }
.related a {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--ink);
  transition: border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.related a:hover { border-color: rgba(37, 99, 235, 0.4); color: var(--blue-deep); transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* ---------- FAQ on subpages (reuses .faq styles; this just guarantees spacing) ---------- */
.s-faq .faq__list { max-width: 820px; margin: 0 auto; }

/* ============================================================
   Blog / guides (hub + single post article)
   ============================================================ */

/* Hub grid of post cards */
.post-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.post-grid > .post-card { flex: 0 1 calc((100% - 48px) / 3); min-width: 0; }
@media (max-width: 980px) { .post-grid > .post-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .post-grid > .post-card { flex-basis: 100%; } }
.post-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease, border-color .3s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: rgba(37, 99, 235, 0.3); }
.post-card__tag {
  align-self: flex-start;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue-deep); background: var(--blue-tint);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.post-card__title { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; line-height: 1.28; margin-bottom: 10px; color: var(--ink); }
.post-card__excerpt { color: var(--body); font-size: 0.97rem; flex: 1; }
.post-card__meta { margin-top: 18px; font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.post-card__link { margin-top: 16px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--blue-deep); transition: gap .25s ease; }
.post-card__link svg { width: 15px; height: 15px; }
.post-card:hover .post-card__link { gap: 11px; }

/* Single post meta (under the hero title) */
.post-meta { display: flex; align-items: center; gap: 14px; margin-top: 24px; font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: var(--body); flex-wrap: wrap; }
.post-meta__author { display: inline-flex; align-items: center; gap: 9px; }
.post-meta__author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.post-meta__sep { color: var(--muted); opacity: 0.5; }

/* Article body typography (reading column) */
.article { max-width: 760px; margin: 0 auto; }
.article > * + * { margin-top: 22px; }
.article__lead { font-size: 1.22rem; color: var(--ink); font-weight: 500; line-height: 1.6; }
.article h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin-top: 48px; }
.article h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-top: 32px; }
.article p { font-size: 1.1rem; color: var(--body); line-height: 1.75; }
.article p strong { color: var(--ink); }
.article a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(37, 99, 235, 0.35); transition: text-decoration-color .2s ease; }
.article a:hover { text-decoration-color: var(--blue-deep); }
.article ul, .article ol { padding-left: 24px; color: var(--body); font-size: 1.1rem; line-height: 1.7; }
.article li { margin-top: 10px; }
.article blockquote { margin: 32px 0; padding: 24px 30px; border-left: 4px solid var(--blue); background: var(--blue-tint); border-radius: var(--radius-md); font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.5; color: var(--blue-ink); }

/* Key-takeaways box */
.takeaways { max-width: 760px; margin: 0 auto; background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius-md); padding: 26px 30px; }
.takeaways h2 { margin-top: 0; font-size: 1.1rem; font-family: var(--font-display); }
.takeaways ul { margin-top: 12px; padding-left: 22px; color: var(--body); }

/* Author / E-E-A-T card */
.author-card { display: flex; gap: 20px; align-items: center; max-width: 760px; margin: 50px auto 0; padding: 28px 30px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.author-card__img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.author-card__role { font-size: 0.9rem; color: var(--muted); margin: 2px 0 8px; }
.author-card__bio { font-size: 0.96rem; color: var(--body); }
@media (max-width: 560px) { .author-card { flex-direction: column; align-items: flex-start; text-align: left; } }

/* ============================================================
   Service hero with image (two-column split)
   ============================================================ */
.shero__inner--split {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 54px;
  align-items: center;
  max-width: 1160px;
}
.shero__copy { min-width: 0; }
.shero__media { position: relative; min-width: 0; }
.shero__media img {
  width: 100%; height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-lift);
}
@media (max-width: 980px) {
  .shero__inner--split { grid-template-columns: 1fr; gap: 34px; max-width: 640px; }
  .shero__media { max-width: 560px; }
}

/* ---------- Case studies: results list + testimonial ----------
   Added for /case-studies/ section. Reuses existing tokens. */
.s-list { list-style: none; display: grid; gap: 14px; margin-top: 22px; max-width: 720px; }
.s-list li { position: relative; padding-left: 30px; color: var(--body); font-size: 1.05rem; line-height: 1.5; }
.s-list li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); opacity: 0.14;
}
.s-list li::after {
  content: ""; position: absolute; left: 5px; top: 9px;
  width: 8px; height: 5px; border-left: 2px solid var(--blue-deep); border-bottom: 2px solid var(--blue-deep);
  transform: rotate(-45deg);
}
.s-list li strong { color: var(--ink); font-weight: 700; }

.s-quote {
  max-width: 820px; margin: 0 auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 38px 40px;
}
.s-quote__text { font-family: var(--font-display); font-size: 1.34rem; font-weight: 600; line-height: 1.5; letter-spacing: -0.01em; color: var(--ink); }
.s-quote__cite { display: block; margin-top: 20px; font-style: normal; font-size: 0.96rem; color: var(--muted); font-weight: 600; }
.s-quote__cite strong { color: var(--ink); }
@media (max-width: 600px) { .s-quote { padding: 28px 24px; } .s-quote__text { font-size: 1.16rem; } }
