/* ============================================================
   IMRepublic — Homepage
   Executive, premium, minimal. Content leads design; every
   visual element carries a purpose. No gradients, no shadows,
   no decorative noise.
   ============================================================ */

:root {
  --ink: #10151A;         /* primary text / dark surfaces */
  --slate: #3D454C;       /* secondary text */
  --muted: #6B7480;       /* tertiary / supporting text */
  --teal: #26B8D2;        /* brand accent — exact value from the approved vector logo (imr_logo_horizontal_dark_on_white.pdf) */
  --teal-deep: #1E93A8;   /* accent, hover/pressed state (darkened for contrast) */
  --line: #DCE1E5;        /* hairline dividers */
  --paper: #F4F6F7;       /* alternate section surface */
  --white: #FFFFFF;

  --max: 1180px;
  --gutter: clamp(24px, 5vw, 64px);
  --radius: 3px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--slate); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  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;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus {
  left: var(--gutter);
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-deep); }

.btn-primary.btn-light {
  background: var(--teal);
  color: var(--ink);
}
.btn-primary.btn-light:hover { background: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.brand-mark {
  width: clamp(150px, 22vw, 190px);
  height: auto;
}

.primary-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.94rem;
}

.primary-nav a {
  color: var(--slate);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--teal);
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 4px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

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

.hero {
  padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 640px) 1fr;
  align-items: center;
  gap: 40px;
}

.hero-copy {
  animation: rise 0.7s var(--ease) both;
}

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

.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  letter-spacing: -0.02em;
  max-width: 14ch;
}

/* Inner-page hero: line breaks are set manually with <br> in markup,
   so no max-width constraint here — it would fight those breaks. */
.inner-hero h1 {
  max-width: none;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
}

.hero-lede {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  color: var(--ink);
  font-weight: 500;
  max-width: 34ch;
  margin-top: 1.1em;
}

.hero-body {
  max-width: 46ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2em;
}

.hero-mark {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.hero-star {
  width: clamp(160px, 22vw, 320px);
  height: auto;
  fill: var(--teal);
  opacity: 0.14;
}

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

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section.alt { background: var(--paper); }

.section-intro { max-width: 46ch; }
.section-intro.narrow { max-width: 40ch; }
.section-intro.narrow.wide-lede { max-width: 54ch; }
.section-intro.center { max-width: 52ch; margin: 0 auto; }

.section-intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.section-split.reverse .section-intro { order: 2; }
.section-split.reverse .mark-list { order: 1; }

/* Tag list (Experience page "Areas of contribution"): compact
   inline pills inside a row-item, instead of a full checklist,
   so NV5/Mapped read the same as the plain-text row-items below. */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.tag-list li {
  font-size: 0.85rem;
  color: var(--slate);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Contact page — "Get in Touch" fields, unstyled <dl> otherwise
   falls back to browser default indentation. */
.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 28px 0 0;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.contact-field dt {
  font-size: 0.85rem;
  color: var(--muted);
}
.contact-field dd {
  margin: 0;
  font-size: 1.1rem;
}
.contact-field a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
}
.contact-field a:hover { color: var(--teal-deep); }

/* Contact page form — posts to Google Forms in the background (see script.js) */
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 40px);
  scroll-margin-top: 96px;
}
.contact-form h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3em;
}
.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.4em;
}
.req { color: var(--teal-deep); }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-field label {
  font-size: 0.85rem;
  color: var(--muted);
}
.form-field input,
.form-field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7em 0.85em;
  transition: border-color 0.2s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.form-field input:hover,
.form-field textarea:hover { border-color: var(--muted); }
.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(38, 184, 210, 0.18);
}
.form-field [aria-invalid="true"],
.form-field [aria-invalid="true"]:hover,
.form-field [aria-invalid="true"]:focus-visible { border-color: #B3261E; }
.form-error {
  font-size: 0.82rem;
  color: #B3261E;
  margin: 0;
}
.form-error:empty { display: none; }
.contact-form .btn { cursor: pointer; margin-top: 6px; }
.contact-form .btn:disabled { opacity: 0.6; cursor: default; }
.form-status { margin: 14px 0 0; font-size: 0.95rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: #B3261E; }
.contact-form.is-sent .form-field,
.contact-form.is-sent .btn { display: none; }
.contact-form.is-sent .form-status { margin: 0; color: var(--ink); }

/* Mark list — ties list items back to the brand star mark */

.mark-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0.4em;
}

.mark-list li {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.7em 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.02rem;
}
.mark-list li:last-child { border-bottom: 1px solid var(--line); }

/* Lucide icon (icon library locked 2026-09-28): strokeWidth 1.5,
   16/20/24/32 size scale, color matches adjacent text (no fixed teal). */
.mark-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--ink);
}

.mark-list.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
}
.mark-list.two-col li:nth-child(2n) { border-left: none; }

.closing-lines {
  margin-top: clamp(28px, 4vw, 40px);
}

/* Diagrams (designer-supplied SVGs): wrap keeps the image from
   overflowing its grid column and centers it within on small screens. */
.diagram-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.diagram-wrap img {
  max-width: 100%;
  height: auto;
}
.diagram-wrap-flow {
  margin-top: clamp(32px, 5vw, 56px);
  justify-content: flex-start;
}
.diagram-wrap-flow img { width: 100%; max-width: 720px; }

.service-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  margin-bottom: 20px;
}

.eyebrow-plain {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.6em;
}

.experience-list-wrap { padding-top: 4px; }

/* ---------- Value flow (Strategy > Execution > Growth) ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 64px);
}

.flow-step {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.flow-label {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5em;
}

.flow-step p { font-size: 0.98rem; max-width: 30ch; }

.flow-connector {
  align-self: center;
  width: 28px;
  height: 2px;
  background: var(--teal);
  margin-top: 20px;
  position: relative;
}
.flow-connector::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  transform: translateY(-50%) rotate(45deg);
}

/* ---------- Services row list ---------- */

.row-list { border-top: 1px solid var(--line); }

.row-item {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 64px);
  padding: clamp(22px, 3.4vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  transition: border-color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.row-item:hover {
  border-left-color: var(--teal);
  padding-left: 16px;
}

.row-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.row-item p { max-width: 48ch; font-size: 1rem; }

/* ---------- Final CTA ---------- */

.cta-final {
  background: var(--ink);
  color: var(--white);
  padding: clamp(64px, 9vw, 112px) 0;
}

.cta-final-inner {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-final h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
}

.cta-final p {
  color: #C6CCD1;
  margin-bottom: 2em;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.footer-mark { width: 130px; height: auto; opacity: 0.85; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-right: auto;
}
.footer-nav a:hover { color: var(--ink); }

.footer-contact {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}
.footer-contact a:hover { color: var(--teal-deep); }

.placeholder-link {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  color: var(--muted);
  cursor: default;
}
.placeholder-link:hover { color: var(--muted); }

.footer-legal {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-legal p { margin: 0; }

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

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }

  .section-split,
  .section-split.reverse {
    grid-template-columns: 1fr;
  }
  .section-split.reverse .section-intro,
  .section-split.reverse .mark-list { order: initial; }

  .flow {
    grid-template-columns: 1fr;
  }
  .flow-connector {
    width: 2px;
    height: 24px;
    margin-top: 0;
    margin-left: 0;
  }
  .flow-connector::after {
    right: -3px;
    top: auto;
    bottom: -1px;
    transform: rotate(135deg);
  }

  .row-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 760px) {
  .primary-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 12px var(--gutter) 20px;
    gap: 4px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .mark-list.two-col { grid-template-columns: 1fr; }
}
