/* ==========================================================================
   G3M Logic
   Palette and type tokens are drawn from the brand mark.
   ========================================================================== */

:root {
  --ink: #101b3d;
  --ink-soft: #4d5978;
  --ink-faint: #7b869e;
  --paper: #ffffff;
  --band: #eef2f8;
  --band-deep: #0c1531;
  --line: #d8dee9;
  --red: #cd2f26;
  --blue: #19409b;
  --amber: #f0a83c;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1180px;
  --gutter: 24px;
  --radius: 14px;
  --rail: 96px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "wdth" 116;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.24rem; letter-spacing: -0.01em; font-variation-settings: "wdth" 110; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Eyebrow / utility type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  flex: none;
}
.eyebrow.is-blue::before { background: var(--blue); }
.eyebrow.is-amber::before { background: var(--amber); }

.lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.measure { max-width: 68ch; }

/* ---------- Header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand__name {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mainnav { display: flex; align-items: center; gap: 30px; }

.mainnav a:not(.btn) {
  font-size: 0.96rem;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.mainnav a:not(.btn):hover { text-decoration: none; border-bottom-color: var(--amber); }
.mainnav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--red); }
.mainnav a.btn { border-bottom: none; }

.navtoggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  white-space: nowrap;
  flex: none;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--solid { background: var(--blue); color: #fff; }
.btn--solid:hover { background: #12327c; }

.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }

.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }

.btn--small { padding: 10px 17px; font-size: 0.9rem; }

.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Trace rail (signature element) ---------- */

.tracerail {
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
}

.tracerail ol { list-style: none; margin: 0; padding: 0; }

.tracerail li { position: relative; padding: 0 0 30px 26px; }
.tracerail li:last-child { padding-bottom: 0; }

.tracerail li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 13px;
  bottom: -1px;
  width: 1.5px;
  background: var(--line);
}
.tracerail li:last-child::before { display: none; }

.tracerail a {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: transparent;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  transition: color 0.25s ease;
}

.tracerail a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.tracerail:hover a,
.tracerail a:focus-visible { color: var(--ink-faint); }

.tracerail a[data-on="true"] { color: var(--ink); }
.tracerail a[data-on="true"]::before {
  border-color: var(--red);
  background: var(--red);
  transform: scale(1.15);
}

/* ---------- Sections ---------- */

section[id] { scroll-margin-top: 92px; }

.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.section--band { background: var(--band); }
.section--edge { border-top: 1px solid var(--line); }

.sectionhead { max-width: 66ch; margin-bottom: 46px; }
.sectionhead p { color: var(--ink-soft); margin-top: 16px; }

/* ---------- Hero ---------- */

.hero { padding: 78px 0 84px; position: relative; overflow: hidden; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 22px; }
.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero__portrait { position: relative; max-width: 340px; margin-left: auto; }

.hero__portrait img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--band);
}

.hero__portrait::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 88px;
  height: 88px;
  border-right: 3px solid var(--amber);
  border-bottom: 3px solid var(--amber);
  border-bottom-right-radius: var(--radius);
}

.portrait__tag {
  max-width: 340px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 28px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact strong {
  display: block;
  font-family: var(--display);
  font-variation-settings: "wdth" 118;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
}
.fact span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split--wide { grid-template-columns: 1.1fr 0.9fr; }
.split--narrow { grid-template-columns: 0.85fr 1.15fr; }

/* ---------- Week grid graphic ---------- */

.weekgrid {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.weekgrid__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.weekgrid__blocks {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.weekgrid__blocks i {
  display: block;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--band);
}

.weekgrid__blocks i.on-red { background: var(--red); }
.weekgrid__blocks i.on-blue { background: var(--blue); }
.weekgrid__blocks i.on-amber { background: var(--amber); }

.weekgrid__key {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.weekgrid__key span { display: flex; align-items: center; gap: 8px; }
.weekgrid__key b { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 22px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--ink); transform: translateY(-3px); }

.card__mark {
  width: 30px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  margin-bottom: 20px;
}
.card:nth-child(2) .card__mark { background: var(--amber); }
.card:nth-child(3) .card__mark { background: var(--blue); }
.card:nth-child(4) .card__mark { background: var(--ink); }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

.card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.card ul li { padding: 6px 0 6px 18px; position: relative; }
.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}

/* ---------- Service blocks ---------- */

.service {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  padding: 52px 0;
  border-top: 1px solid var(--line);
}
.service:first-of-type { border-top: none; padding-top: 0; }

.service__title { display: flex; gap: 16px; align-items: flex-start; }

.service__bar {
  width: 5px;
  border-radius: 3px;
  background: var(--red);
  flex: none;
  align-self: stretch;
  min-height: 46px;
}
.service:nth-of-type(2) .service__bar { background: var(--amber); }
.service:nth-of-type(3) .service__bar { background: var(--blue); }
.service:nth-of-type(4) .service__bar { background: var(--ink); }
.service:nth-of-type(5) .service__bar { background: var(--red); }

.service__body p { color: var(--ink-soft); }

.checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 9px 0 9px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 0.99rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

/* ---------- Phases (a real sequence, so it is numbered) ---------- */

.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.phase {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.phase__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--red);
  display: block;
  margin-bottom: 12px;
}
.phase:nth-child(2) .phase__num { color: var(--amber); }
.phase:nth-child(3) .phase__num { color: var(--blue); }
.phase h3 { margin-bottom: 10px; }
.phase p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Problem list ---------- */

.problems { list-style: none; margin: 0; padding: 0; }
.problems li {
  padding: 16px 0 16px 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 1.03rem;
}
.problems li:last-child { border-bottom: none; }
.problems li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25px;
  width: 16px;
  height: 2px;
  background: var(--amber);
}

/* ---------- Steps ---------- */

.steps { counter-reset: step; display: grid; gap: 4px; }

.step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }

.step__n {
  counter-increment: step;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding-top: 4px;
}
.step__n::before { content: "0" counter(step); }

.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Quote / statement ---------- */

.statement {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

/* ---------- Contact tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 18px; }

.tile {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tile:hover { text-decoration: none; border-color: var(--ink); transform: translateY(-3px); }

.tile__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.tile__value {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  font-weight: 600;
  font-size: 1.06rem;
  word-break: break-word;
}
.tile__note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Form panel ---------- */

.formpanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--paper);
}

.formpanel .hs-form-frame { min-height: 120px; }

/* HubSpot form styling. The embed uses hsfc- classes on the current version
   and hs- classes on the older one, so both are covered here. If a rule does
   not take effect, HubSpot is rendering that part in a shadow root, and the
   setting lives under Style in the HubSpot form editor instead. */
.formpanel .hsfc-Form,
.formpanel .hs-form,
.formpanel .hs-form-frame {
  font-family: var(--body) !important;
  color: var(--ink);
}

.formpanel .hsfc-FieldLabel,
.formpanel .hs-form-field > label {
  font-family: var(--body) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

.formpanel .hsfc-TextInput,
.formpanel .hsfc-DropdownInput,
.formpanel .hsfc-PhoneInput input,
.formpanel .hs-input {
  font-family: var(--body) !important;
  font-size: 1rem !important;
  color: var(--ink) !important;
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.formpanel .hsfc-TextInput:focus,
.formpanel .hs-input:focus {
  outline: none !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(25, 64, 155, 0.14) !important;
}

.formpanel textarea.hsfc-TextInput,
.formpanel textarea.hs-input { min-height: 130px !important; }

.formpanel .hsfc-Button,
.formpanel .hs-button {
  font-family: var(--body) !important;
  font-weight: 600 !important;
  font-size: 0.97rem !important;
  color: #fff !important;
  background: var(--blue) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 13px 24px !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
}

.formpanel .hsfc-Button:hover,
.formpanel .hs-button:hover { background: #12327c !important; }

.formpanel .hsfc-ErrorAlert,
.formpanel .hs-error-msg {
  color: var(--red) !important;
  font-size: 0.88rem !important;
}

.formfallback {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- Dark call to action ---------- */

.cta {
  background: var(--band-deep);
  color: #fff;
  padding: 84px 0;
  position: relative;
  overflow: hidden;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.78); }

.cta__stripe {
  display: flex;
  height: 5px;
  width: 132px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 26px;
}
.cta__stripe i { flex: 1; }
.cta__stripe i:nth-child(1) { background: var(--red); }
.cta__stripe i:nth-child(2) { background: var(--amber); }
.cta__stripe i:nth-child(3) { background: var(--blue); }

/* ---------- Footer ---------- */

.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer img.footer__logo { height: 92px; width: auto; margin-bottom: 18px; }

.footer h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin: 0 0 14px;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--ink); font-size: 0.96rem; }
.footer a:hover { color: var(--blue); }

.footer__base {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (min-width: 1460px) {
  .tracerail { display: block; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__portrait, .portrait__tag { max-width: 330px; margin-left: 0; }
  .split, .split--wide, .split--narrow, .service { grid-template-columns: 1fr; gap: 32px; }
  .phases { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 68px 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .navtoggle { display: block; }
  .mainnav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 20px;
  }
  .mainnav.is-open { display: flex; }
  .mainnav a:not(.btn) { width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .mainnav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--red); }
  .mainnav .btn { width: 100%; justify-content: center; margin-top: 14px; border-bottom: none; }
  .brand__name { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .weekgrid__blocks { gap: 5px; }
  .step { grid-template-columns: 44px 1fr; gap: 14px; }
  .formpanel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
