/* =========================================================
   Smart OP Solutions — Phase 1 One-Page Site CSS
   Bootstrap 5 compatible
   Load AFTER Bootstrap CSS
   ========================================================= */

/* -----------------------------
   1) Theme tokens (Smart OP)
------------------------------ */

:root {
  --brand-900: #372f26;
  --brand-800: #4a4034;
  --brand-700: #5e5244;
  --accent-600: #c3ad8d;
  --accent-700: #a79273;
  --ink-900: #372f26;
  --ink-700: #5e5244;
  --ink-500: #8b7f6b;
  --surface-0: #ffffff;
  --surface-50: #f7f5f2;
  --surface-100: #e7e2de;
  --border-200: #d6cec4;
  --shadow-sm: 0 1px 2px rgba(55,47,38,.08);
  --shadow-md: 0 12px 32px rgba(55,47,38,.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-nav: "Manrope", var(--font-sans);
  --container-max: 1140px;
  --section-pad-y: clamp(3rem, 4vw, 5rem);
  --hero-pad-y: clamp(4rem, 6vw, 6.5rem);
  --nav-offset: 90px;
}

/* -----------------------------
   2) Global base
------------------------------ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--surface-50);
  font-size: 0.90rem;
  /*NEW: one notch smaller;*/
  line-height: 1.20;
  /*OPTIONAL: slightly tighter;*/
}

[id] {
  scroll-margin-top: var(--nav-offset);
}

a {
  color: var(--accent-700);
  text-decoration: none;
}

a:hover {
  color: var(--brand-900);
  text-decoration: underline;
}

p {
  color: var(--ink-700);
  margin-bottom: .30rem;
  /*NEW: tighter paragraph spacing;*/
}

p:last-child {
  margin-bottom: 0;
  /*NEW: prevents extra space at end of cards/blocks;*/
}

.readable {
  max-width: 72ch;
}

/* -----------------------------
   3) Hero Header (logo + nav)
------------------------------ */

.hero-header {
  padding-top: .15rem;
  padding-bottom: .15rem;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(214,206,196,.45);
  border-radius: 18px;
  margin: .15rem .75rem 0;
  /*IMPORTANT: clips blur to rounded corners;*/
  overflow: visible;
  position: relative;
}

/* Navbar typography — Manrope ONLY here */

.hero-header, .hero-header .nav-link, .hero-header .dropdown-item {
  font-family: var(--font-nav);
}

/* Desktop nav links (your desktop menu uses .nav-link) */

.hero-header .nav-link {
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding-top: .2rem;
  padding-bottom: .2rem;
  line-height: 1.1;
  color: var(--ink-700);
}

.hero-header .nav-link:hover {
  color: var(--brand-900);
}

/* Header button (Contact) */

.hero-header .btn {
  padding-top: .55rem;
  padding-bottom: .55rem;
  font-weight: 700;
}

/* Dropdowns (desktop) */

.dropdown-menu {
  border: 1px solid var(--border-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.dropdown-item {
  font-weight: 600;
  color: var(--ink-700);
}

.dropdown-item:hover {
  background: var(--surface-100);
  color: var(--brand-900);
}

/* Header logo sizing */

.brand-logo {
  height: 100px;
  width: auto;
  display: block;
}

@media (max-width: 991.98px) {
  .brand-logo {
    height: 60px;
  }
}

/* -----------------------------
   4) Sections
------------------------------ */

.section {
  padding: var(--section-pad-y) 0;
}

.section--alt {
  background: var(--surface-100);
  border-top: 1px solid var(--border-200);
  border-bottom: 1px solid var(--border-200);
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: .75rem;
}

.section-kicker {
  color: var(--ink-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 1rem;
  margin-bottom: .5rem;
}

/* -----------------------------
   5) Hero (Option 1 + overlay)
------------------------------ */

/* NOTE about "navbar higher":
  If you want the header higher relative to the hero, reduce ONLY hero top padding.
  This preserves the spacious lower hero area for the headline/buttons. */

.hero {
  position: relative;
  overflow: hidden;
  /*was: padding: var(--hero-pad-y) 0;*/
  padding-top: 1.25rem;
  padding-bottom: var(--hero-pad-y);
  background: radial-gradient(700px 350px at 15% 20%, rgba(195,173,141,.25), transparent 55%), radial-gradient(700px 350px at 85% 30%, rgba(195,173,141,.18), transparent 60%), url("/assets/img/sos_hero_1536x1024.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Readability overlay (safe zone for text/CTAs) */

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient( 90deg, rgba(247,245,242,.86) 0%, rgba(247,245,242,.62) 42%, rgba(247,245,242,.20) 100% ), rgba(255,255,255,.08);
  pointer-events: none;
}

/* Keep hero content above overlay */

.hero > * {
  position: relative;
}

.hero-title {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(55,47,38,.18);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.25vw, 1.10rem);
  font-weight: 500;
  color: var(--ink-700);
  max-width: 70ch;
  text-shadow: 0 1px 2px rgba(55,47,38,.12);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  border: 1px solid var(--border-200);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  font-weight: 700;
  color: var(--ink-700);
  box-shadow: var(--shadow-sm);
}

/* -----------------------------
   6) Buttons
------------------------------ */

.btn-brand {
  --bs-btn-color: #372f26;
  --bs-btn-bg: var(--accent-600);
  --bs-btn-border-color: var(--accent-600);
  --bs-btn-hover-color: #372f26;
  --bs-btn-hover-bg: var(--accent-700);
  --bs-btn-hover-border-color: var(--accent-700);
  --bs-btn-focus-shadow-rgb: 195,173,141;
  font-weight: 800;
  border-radius: 999px;
  padding: .8rem 1.1rem;
}

.btn-ghost {
  --bs-btn-color: var(--brand-900);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--border-200);
  --bs-btn-hover-bg: rgba(195,173,141,.15);
  font-weight: 800;
  border-radius: 999px;
  padding: .8rem 1.1rem;
}

/* -----------------------------
   7) Cards
------------------------------ */

.card-soft {
  background: var(--surface-0);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card-soft:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 1.25rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(195,173,141,.25);
  border: 1px solid rgba(195,173,141,.35);
  margin-bottom: .9rem;
}

.card-title {
  font-weight: 850;
  margin-bottom: .35rem;
}

.card-text {
  color: var(--ink-700);
  margin-bottom: 1rem;
}

.card-link {
  font-weight: 800;
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.card-grid > .grid-col {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .card-grid > .grid-col {
    grid-column: span 6;
  }
}

@media (min-width: 992px) {
  .card-grid > .grid-col {
    grid-column: span 4;
  }
}

/* -----------------------------
   8) How It Works flow
------------------------------ */

.flow {
  display: grid;
  gap: 1rem;
}

.flow-step {
  background: var(--surface-0);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.flow-step-title {
  font-weight: 900;
  margin-bottom: .25rem;
}

.flow-step-desc {
  color: var(--ink-700);
}

@media (min-width: 992px) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -----------------------------
   9) Contact
------------------------------ */

.contact-panel {
  background: var(--surface-0);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-md);
}

/* -----------------------------
   10) Footer
------------------------------ */

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-200);
  color: var(--ink-500);
  background: var(--surface-50);
}

.site-footer a {
  font-weight: 600;
}

.site-footer p:last-child {
  color: var(--ink-500);
}

/* -----------------------------
   11) Utilities
------------------------------ */

.hr-soft {
  height: 1px;
  background: var(--border-200);
  border: 0;
  margin: 1.5rem 0;
}

.hero--full {
  width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(195,173,141,.45);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =========================================================
   Mobile collapsed hero nav — link color consistency
   (Your mobile menu is .hero-nav-panel; keep rules targeted.)
   ========================================================= */

.hero-nav-panel a {
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 600;
}

.hero-nav-panel a:hover, .hero-nav-panel a:focus {
  color: var(--brand-900);
  text-decoration: none;
}

/* =========================================================
   12) Solutions / Offerings Cards (banded card style)
   Reuses Smart OP tokens + same lift behavior as .card-soft
   ========================================================= */

.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: var(--container-max);
  margin: 0 auto;
  align-items: stretch;
}

.solution-grid > .grid-col {
  width: 100%;
}

/* Base card: same surface + border + shadow language as .card-soft */

.solution-card {
  background: var(--surface-0);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.solution-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Optional “selected” (static highlight) */

.solution-card.is-selected {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* TITLE BAND: uniform height (2-line cap) */

.solution-card__head {
  background: #0F4C63;
  color: #fff;
  font-weight: 850;
  line-height: 1.25;
  padding: 0.95rem 1.05rem;
  min-height: calc(2 * 1.25em + 0.95rem + 0.95rem);
  display: flex;
  align-items: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* BODY: flexible zone that absorbs variation */

.solution-card__body {
  padding: 1rem 1.05rem 0.9rem;
  flex: 1 1 auto;
}

/* FOR BAND: statement style, uniform height (2-line cap) */

.solution-card__for {
  background: rgba(195,173,141,0.22);
  padding: 0.8rem 1.05rem;
  border-top: 1px solid rgba(214,206,196,0.60);
  min-height: calc(2 * 1.2em + 0.8rem + 0.8rem);
  display: flex;
  align-items: center;
}

.solution-card__for p {
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FOOTER: link rides bottom and aligns across cards */

.solution-card__footer {
  padding: 0.85rem 1.05rem 1rem;
  min-height: 3.2rem;
  display: flex;
  align-items: flex-end;
}

/* =========================================================
   Case Studies Accordion (Bootstrap accordion, SOS styling)
   ========================================================= */

:root {
  --case-blue-900: #123A52;
  --case-blue-800: #1A4A66;
  --case-blue-200: rgba(18,58,82,0.14);
  --case-blue-600: #2D6C8F;
}

/* Accordion wrapper */

.accordion-sos .accordion-item {
  background: transparent;
  border: 0;
  margin-bottom: 0.85rem;
}

/* Tab/button */

.accordion-sos .accordion-button {
  background: var(--case-blue-900);
  color: #fff;
  font-weight: 850;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 1rem 1.1rem;
}

.accordion-sos .accordion-button:hover {
  background: var(--case-blue-800);
}

/* Expanded state */

.accordion-sos .accordion-button:not(.collapsed) {
  background: var(--case-blue-800);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* Remove Bootstrap’s default focus ring; use your site focus-visible */

.accordion-sos .accordion-button:focus {
  box-shadow: none;
}

/* Arrow icon: make it white */

.accordion-sos .accordion-button::after {
  filter: brightness(0) invert(1);
}

/* The panel body “card” */

.accordion-sos .accordion-collapse .accordion-body {
  background: var(--surface-0);
  border: 1px solid var(--border-200);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.2rem;
}

/* ---------------------------------------------------------
   Interior “PDF-like” section headers + content blocks
   --------------------------------------------------------- */

.cs-block {
  margin-bottom: 1rem;
}

.cs-hdr {
  background: var(--case-blue-200);
  border: 1px solid rgba(18,58,82,0.18);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 0.78rem;
  color: var(--case-blue-600);
  margin-bottom: 0.45rem;
}

.cs-lede {
  margin-left: 0.75rem;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 0.25rem;
}

.cs-text {
  margin-left: 0.75rem;
  margin-bottom: 0;
}

/* Ensure first/last accordion tabs keep rounded corners */

.accordion-sos .accordion-item:first-of-type .accordion-button {
  border-top-left-radius: var(--radius-md) !important;
  border-top-right-radius: var(--radius-md) !important;
}

.accordion-sos .accordion-item:last-of-type .accordion-button.collapsed {
  border-bottom-left-radius: var(--radius-md) !important;
  border-bottom-right-radius: var(--radius-md) !important;
}

/* When expanded, make the header only round on top (so it mates cleanly to the body) */

.accordion-sos .accordion-button:not(.collapsed) {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

