/* Optima Analytics — site styles.
   Components mirror the design-system primitives (Button, Card, Input, Select,
   Alert) as plain CSS. The design prototype drove hover and breakpoints from
   React state; both are pure CSS here so the page renders correctly before
   (and without) JavaScript. */

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* `clip` guards against stray horizontal overflow without turning the
     element into a scroll container, which `hidden` on body would do. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  padding-top: 74px; /* fixed header */
}

img { max-width: 100%; display: block; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--cyan-600); }

h1, h2, h3, h4 { font-family: var(--font-display); }

:focus-visible {
  outline: 2px solid var(--oa-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--oa-navy);
  color: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-standard);
}
.skip-link:focus { top: 0; color: #fff; }

@keyframes oaUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ layout */

.container {
  width: min(var(--container-max), 100% - 48px);
  margin-inline: auto;
}

.section { scroll-margin-top: 84px; }
.section--page { background: var(--surface-page); }
.section--white { background: #fff; }
.section__inner { padding-block: clamp(64px, 9vw, 112px); }

.overline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--ls-overline);
  color: var(--oa-cyan);
  margin-bottom: 16px;
}

.section-title {
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: var(--ls-tight);
  color: var(--oa-navy);
  margin: 0 0 18px;
  text-wrap: balance;
}

.lede {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
}

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }

.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.rule + .grid { margin-bottom: 0; }
.rule__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--ls-overline);
  color: var(--oa-navy);
}
.rule__line { flex: 1; height: 1px; background: var(--border-subtle); }
.rule--spaced { margin: 48px 0 20px; }

/* ------------------------------------------------------------ header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header__bar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo { display: flex; align-items: center; flex: none; }
.site-header__logo img { height: 32px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-body);
  transition: color var(--dur-fast) var(--ease-standard);
}
.site-nav a:hover { color: var(--cyan-700); }

/* .btn also sets display, so this needs the extra class to win */
.btn.nav-toggle { display: none; }

.mobile-nav {
  border-top: 1px solid var(--border-subtle);
  background: #fff;
  padding: 8px 0 20px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__list { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a:not(.btn) {
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-body);
  border-bottom: 1px solid var(--grey-100);
}
.mobile-nav a:not(.btn):last-of-type { border-bottom: 0; padding-bottom: 18px; }

/* Below 900px the inline nav is replaced by the burger menu — this was
   a JS resize listener in the prototype. */
@media (max-width: 899px) {
  .site-nav { display: none; }
  .btn.nav-toggle { display: inline-flex; }
}
@media (min-width: 900px) {
  .mobile-nav { display: none; }
}

/* ------------------------------------------------------------ button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }

.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; gap: 6px; }
.btn--lg { height: 48px; padding: 0 28px; font-size: 17px; gap: 10px; }
.btn--block { display: flex; width: 100%; }

.btn--primary {
  background: var(--action-bg);
  color: var(--action-fg);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--action-bg-hover); color: var(--action-fg); }
.btn--primary:active { background: var(--action-bg-active); }

.btn--outline {
  background: transparent;
  color: var(--oa-navy);
  border-color: var(--border-default);
}
.btn--outline:hover { background: var(--grey-50); color: var(--oa-navy); }

/* outline button sitting on the dark hero */
.btn--on-dark {
  background: #fff;
  color: var(--oa-navy);
  border-color: #fff;
}
.btn--on-dark:hover { background: var(--grey-100); color: var(--oa-navy); }

.btn .icon { flex: none; }

/* -------------------------------------------------------------- card */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard);
}
.card--pad { padding: 28px; }
.card--accent { border-top: 3px solid var(--oa-cyan); }
.card--hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.grid { display: grid; gap: 20px; align-items: stretch; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1119px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.icon-tile {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--cyan-50);
  color: var(--cyan-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-tile--sm { width: 40px; height: 40px; }
.icon-tile--md { width: 42px; height: 42px; }
.icon-tile--lg { width: 60px; height: 60px; border-radius: var(--radius-lg); }

/* -------------------------------------------------------------- hero */

/* The backdrop is a real <picture> rather than a CSS background: image-set()
   with type() is accepted by @supports in some engines but then fails to
   paint, and <picture> also gives proper srcset negotiation and LCP priority. */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  background-color: var(--navy-950);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(0,19,60,0.94) 30%, rgba(0,19,60,0.55) 62%, rgba(0,19,60,0.35));
}
/* The 100deg scrim is tuned for a wide hero; on narrow screens the copy runs
   the full width and needs an even wash to stay legible over the artwork. */
@media (max-width: 899px) {
  .hero__scrim {
    background: linear-gradient(180deg, rgba(0,19,60,0.9), rgba(0,19,60,0.82) 55%, rgba(0,19,60,0.9));
  }
}

.hero__inner {
  padding: clamp(76px, 11vw, 132px) 0 clamp(68px, 10vw, 116px);
  animation: oaUp 600ms var(--ease-out) both;
}
.hero .overline { color: var(--cyan-400); margin-bottom: 20px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: var(--ls-tight);
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
}
.hero p {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 24px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ------------------------------------------------------------- about */

.about__head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.about__card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--oa-navy);
  margin-bottom: 8px;
}
.about__card p, .service-card p { margin: 0; }
.body-sm { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------------------------------------------------------- services */

.service-card { padding: 0; }
.service-card__btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px 24px;
  height: 100%;
  width: 100%;
  font-family: inherit;
  color: inherit;
  text-align: left;
}
.service-card__btn:focus-visible { outline: 2px solid var(--oa-cyan); outline-offset: -2px; }
.service-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: var(--oa-navy);
}
.service-card__blurb { flex: 1; }
.service-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}
.service-card__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-subtle);
}
.service-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--cyan-700);
}

/* ------------------------------------------------------- detail modal */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 19, 60, 0.6);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  padding: clamp(16px, 4vw, 48px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: oaUp 260ms var(--ease-out) both;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: #fff;
  color: var(--grey-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { background: var(--grey-100); }
.modal__body { padding: clamp(28px, 4vw, 48px); }
.modal__body .overline { font-size: 11.5px; margin-bottom: 12px; }
.modal__body h2 {
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: var(--ls-tight);
  color: var(--oa-navy);
  margin: 0 0 16px;
  max-width: 22ch;
  padding-right: 48px;
}
.modal__intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0 0 32px;
  max-width: 72ch;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  padding: 0;
  list-style: none;
}
.pillar { border-top: 2px solid var(--cyan-200); padding-top: 14px; }
.pillar__n { font-family: var(--font-mono); font-size: 12px; color: var(--oa-cyan); margin-bottom: 6px; }
.pillar__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--oa-navy);
  margin-bottom: 6px;
}
.pillar p { margin: 0; }

.facts {
  background: var(--cyan-50);
  border: 1px solid var(--cyan-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 0 0 28px;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan-700);
  margin-bottom: 8px;
}
.facts dd { font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 0; }

/* -------------------------------------------------------- experience */

.sector-card { display: flex; flex-direction: column; gap: 16px; }
.sector-card__head { display: flex; align-items: center; gap: 12px; }
.sector-card__head h3 {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: var(--oa-navy);
  margin: 0;
}
.sector-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sector-card li { display: flex; gap: 12px; align-items: flex-start; }
.sector-card li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oa-cyan);
  margin-top: 8px;
}
.sector-card li p { margin: 0; text-wrap: pretty; }

.exp-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--text-subtle);
}
.exp-note svg { flex: none; margin-top: 1px; }
.exp-note p { font-size: 13.5px; line-height: 1.6; margin: 0; }

/* ----------------------------------------------------------- contact */

.contact__inner {
  padding-block: clamp(64px, 9vw, 112px);
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}
.contact__lede { margin-bottom: 40px; margin-inline: auto; }
.contact__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 48px;
  margin-bottom: 40px;
  text-align: left;
}
.contact__point { display: flex; gap: 14px; align-items: flex-start; }
.contact__cta { display: flex; justify-content: center; }
.contact__point-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--oa-navy);
}
.contact__point div > a, .contact__point div > span { font-size: 15px; }
.contact__point span { color: var(--text-muted); }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, 0.85); }
.site-footer__inner { padding: clamp(48px, 6vw, 72px) 0 36px; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}
.site-footer__logo {
  display: inline-flex;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.site-footer__logo img { height: 32px; width: auto; }
.site-footer__blurb {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 300px;
  margin: 18px 0 0;
}
.site-footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan-400);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer li a { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.site-footer li a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.site-footer__bottom a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }

/* --------------------------------------------------------- prose page */

.prose { max-width: 72ch; margin-inline: auto; padding-block: clamp(48px, 7vw, 88px); }
.prose h1 {
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: var(--ls-tight);
  color: var(--oa-navy);
  margin: 0 0 8px;
}
.prose .updated { font-size: 14px; color: var(--text-subtle); margin: 0 0 32px; }
.prose h2 {
  font-weight: 600;
  font-size: 22px;
  color: var(--oa-navy);
  margin: 32px 0 10px;
}
.prose p, .prose li { font-size: 16px; line-height: 1.7; color: var(--text-body); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ------------------------------------------------ small layout helpers
   These replace the handful of inline style attributes the page used to
   carry. The site ships a strict `style-src 'self'` CSP, which blocks
   inline styles outright, so every rule has to live in a stylesheet. */

.u-mb-0 { margin-bottom: 0; }
.u-mt-24 { margin-top: 24px; }
.u-mt-32 { margin-top: 32px; }
.u-center { text-align: center; }
.u-no-pad-top { padding-top: 0; }

.section--bordered { border-top: 1px solid var(--border-subtle); }

/* Footer on the sub-pages carries only the bottom bar. */
.site-footer__bottom--only { margin-top: 0; border-top: 0; padding-top: 0; }
