/* ============================================================
   imci — site styles
   plain CSS, organised in clearly-marked blocks. Tokens at the
   top; every size/space/colour downstream resolves through them.
   ============================================================ */


/* ============================================================
   Tokens — type scale, spacing scale, content rail, colour
   ============================================================
   Four type sizes, six spacing steps, one content width and one
   prose measure. If a value isn't on these scales, change the
   element's role rather than inventing a new size.
   ============================================================ */
:root {
  /* type — four sizes only */
  --fs-hero:    28px;   /* text directly below a section header (leads, pitch leads) */
  --fs-heading: 32px;   /* section headings */
  --fs-body:    16px;   /* everything else — body, captions, nav pills, form, CTA */
  --fs-small:   13px;   /* floating page footer (legal line) only */

  /* spacing — six steps */
  --sp-xs:    8px;
  --sp-sm:   16px;
  --sp-md:   24px;
  --sp-lg:   48px;
  --sp-xl:   80px;
  --sp-2xl: 120px;

  /* horizontal rail — content edges align across every section */
  --pad-x:       56px;   /* page-edge → content edge */
  --content-max: 1100px; /* outer rail */
  --measure:     660px;  /* prose comfort width (~62-68ch at fs-body) */

  /* line-heights */
  --lh-tight: 1.22;      /* hero-size display */
  --lh-snug:  1.3;       /* headings, lead text */
  --lh-body:  1.55;      /* body prose */

  /* colour — gradient stops live on the gradient layer only */
  --ink:             #ffffff;
  --ink-dim:         rgba(255, 255, 255, 0.65);   /* footer + secondary */
  --ink-rule:        rgba(255, 255, 255, 0.35);   /* divider lines */
  --grad-teal:       #3FB3B0;
  --grad-blue:       #2E5A9E;
  --grad-purple:     #2D2371;
  --grad-purple-ink: #1a1340;                     /* deepest tile fill */

  /* form (only place we leave the gradient) */
  --form-ink:    #1a2236;
  --form-label:  #4a5468;
  --form-border: #d6d9e1;
  --form-bg:     #ffffff;
}

@media (max-width: 900px) {
  :root {
    --pad-x:      24px;
    --fs-hero:    24px;
    --fs-heading: 28px;
  }
}

@media (max-width: 600px) {
  :root {
    --pad-x:      20px;
    --fs-hero:    22px;
    --fs-heading: 26px;
    --fs-body:    15px;
  }
}


/* ============================================================
   Reset + base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* every section is reachable by hash; offset by a small visual gap so
   the heading doesn't feel cramped against the nav. Nav clearance is
   already handled by each section's padding-top, so this is purely
   breathing room, not nav-height compensation. */
section[id] {
  scroll-margin-top: var(--sp-sm);
}


/* ============================================================
   Fixed gradient background
   position:fixed layer rather than background-attachment:fixed
   because the latter behaves erratically on iOS Safari.
   ============================================================ */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to top right,
    var(--grad-teal)   0%,
    var(--grad-blue)   50%,
    var(--grad-purple) 100%
  );
}

/* cursor-reactive glow — sits above the gradient, below all content.
   JS updates left/top on mousemove; CSS transition does the easing. */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  z-index: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0)    70%
  );
  transition: top 350ms ease-out, left 350ms ease-out;
  will-change: top, left;
}

/* content sits above the gradient layer */
.nav,
main,
.global-cta,
.page-footer {
  position: relative;
  z-index: 1;
}


/* ============================================================
   Persistent UI — nav, CTA, footer
   ============================================================ */

/* --- top navigation (fixed) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: transparent;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo img {
  display: block;
  height: 36px;
  width: auto;
}

.nav-pills {
  display: flex;
  gap: var(--sp-xs);
}

.nav-pills-left {
  margin-left: auto;
}

.nav-pills-right {
  margin-left: auto;
}

.nav-pills a {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  transition: opacity 0.15s ease;
}

/* active pill — toggled by the IntersectionObserver as the visitor
   scrolls through the gradient sections. JS adds/removes a single
   `.active` class on the matching <a>; CSS does the rest. */
.nav-pills a.active {
  background: var(--grad-purple);
  border-color: var(--grad-purple);
}

.nav-pills a:hover,
.nav-pills a:focus-visible {
  opacity: 0.78;
}

.nav-pills a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Mobile disclosure button — hidden on desktop, shown by the 600px
   block below. Matches pill styling so the drawer feels like part
   of the same set. */
.nav-menu-btn {
  display: none;
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.nav-menu-btn:hover,
.nav-menu-btn:focus-visible {
  opacity: 0.78;
}

.nav-menu-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}


/* --- global CTA (fixed bottom-right) --- */
.global-cta {
  position: fixed;
  right: var(--sp-lg);
  bottom: var(--sp-md);
  z-index: 40;
  font-size: var(--fs-body);
  line-height: 1.45;
  text-align: right;
}

.global-cta p {
  margin: 0;
}

.global-cta a {
  color: var(--ink);
  transition: opacity 0.15s ease;
}

.global-cta a:hover,
.global-cta a:focus-visible {
  opacity: 0.78;
}


/* --- global footer (fixed bottom-left) --- */
.page-footer {
  position: fixed;
  left: var(--sp-lg);
  bottom: var(--sp-md);
  z-index: 40;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
  pointer-events: none;     /* never block content underneath */
}


/* ============================================================
   Section primitives — every section uses these
   ============================================================
   .section-heading is centred and constrained to the rail.
   .content-rail is the prose container; max-width is the
   reading measure (~62-68ch) rather than the section's full
   width, so long lines don't sprawl across the viewport.
   The websites/software photo rows are deliberately full-width
   and break out of the rail.
   ============================================================ */
.section-heading {
  margin: 0 0 var(--sp-lg);
  font-size: var(--fs-heading);
  font-weight: 500;
  line-height: var(--lh-snug);
  text-align: center;
  letter-spacing: -0.005em;
}

.section-end-text {
  max-width: var(--measure);
  margin: var(--sp-lg) auto 0;
  padding: 0 var(--pad-x);
  font-size: 26px;
  font-weight: 400;
  line-height: var(--lh-snug);
  text-align: center;
}

/* websites + software sections are full-bleed (no section padding so
   the photo rows reach the viewport edges); the heading needs its
   own padding to keep its left edge on the rail. */
.websites .section-heading,
.software-section .section-heading {
  padding: 0 var(--pad-x);
}

.content-rail {
  max-width: var(--measure);
  margin-left: 0;
  padding: 0 var(--pad-x);
}


/* ============================================================
   PAGE ONE — hero
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: var(--sp-2xl) var(--pad-x);
  display: flex;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.hero-top {
  margin-top: var(--sp-xs);
}

.hero-title {
  margin: 0;
  line-height: 1;
}

.hero-title img {
  display: block;
  width: clamp(320px, 56vw, 760px);
  height: auto;
}

.hero-tagline {
  margin: var(--sp-sm) 0 0;
  font-size: var(--fs-hero);
  font-weight: 500;
  letter-spacing: 0.005em;
}

.hero-value {
  max-width: var(--measure);
}

.value-lead {
  margin: 0 0 var(--sp-sm);
  font-weight: 500;
  font-size: calc(var(--fs-body) + 2px);
}

.value-list li {
  font-weight: 400;
  font-size: calc(var(--fs-body) + 2px);
  line-height: var(--lh-body);
}


/* ============================================================
   Shared section behaviour — post-hero
   ============================================================
   Every section after the hero adopts the hero's height pattern:
   fills the viewport, vertically centres its content, expands
   gracefully when content exceeds 100vh. Horizontal padding is
   handled per-section below because some sections are full-bleed
   (websites/software photo bands) and some sit on the centred
   content rail (ai, partners, contact).
   ============================================================ */
.websites,
.software-section,
.ai-section,
.partners-section,
.contact-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--sp-xl);     /* clears the sticky nav */
  padding-bottom: var(--sp-xl);  /* clears the bottom-right CTA */
}


/* ============================================================
   PAGE TWO — websites section
   ============================================================
   Photo bands extend to the viewport edges; everything else
   honours the rail.
   ============================================================ */
.websites {
  padding-left: 0;
  padding-right: 0;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 220px;
}

.row-img {
  height: 220px;
  background-color: #2d2a3d;          /* placeholder while image loads */
  overflow: hidden;
  border-radius: 999px;               /* pill: fully rounded ends */
}

.row-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* photo on the left — small inset from the page edge so the
   pill caps aren't clipped by the viewport */
.row-img-left .row-img {
  margin-left: var(--pad-x);
  margin-right: var(--sp-sm);
}

/* photo on the right — mirrored insets */
.row-img-right .row-img {
  margin-right: var(--pad-x);
  margin-left: var(--sp-sm);
}

.row-caption {
  margin: 0;
  padding: 0 var(--pad-x);
  font-size: calc(var(--fs-body) + 2px);
  font-weight: 400;
  line-height: var(--lh-body);
  max-width: var(--measure);
  text-wrap: pretty;
}

.row-img-right .row-caption {
  justify-self: end;
  text-align: right;
}


/* ============================================================
   PAGE THREE — software section
   ============================================================
   Cards in a responsive grid (3-up at desktop, 2-up at tablet,
   1-up at mobile via auto-fit). The websites section keeps its
   alternating row+pill layout; the software section deliberately
   reads differently so the two sections don't feel like duplicates.
   ============================================================ */
.software-section {
  padding-left: 0;
  padding-right: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-lg);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.card-img {
  aspect-ratio: 4 / 3;
  background-color: #2d2a3d;
  border-radius: 14px;
  overflow: hidden;
}

.card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-caption {
  margin: 0;
  font-size: calc(var(--fs-body) + 2px);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--ink);
  text-align: center;
  text-wrap: pretty;
}


/* ============================================================
   PAGE FOUR — ai section
   ============================================================
   Pure typography. Visual interest is rhythm between four
   blocks (heading, value prop, callout, promises).
   ============================================================ */
.ai-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: var(--sp-lg);
  align-items: start;
}

.ai-copy {
  min-width: 0;
}

.ai-media {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px -28px rgba(10, 14, 32, 0.55);
}

.ai-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .ai-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }
}

.ai-section {
  max-width: calc(var(--content-max) + 2 * var(--pad-x));
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* shared prose column — same left edge across every block */
.ai-value,
.ai-callout,
.ai-divider,
.ai-promises {
  max-width: var(--measure);
  margin-left: 0;
}

.ai-value {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: var(--sp-lg);
  font-size: calc(var(--fs-body) + 2px);
  text-align: left;
}

.ai-value-lead,
.ai-value-body {
  margin: 0;
  font-size: calc(var(--fs-hero) + 2px);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.ai-value-lead {
  font-weight: 500;
  margin-bottom: var(--sp-xs);
}

.ai-value-body {
  font-weight: 200;
}

.ai-callout {
  margin-bottom: var(--sp-md);
}

.ai-callout-q,
.ai-callout-a {
  margin: 0;
  font-size: calc(var(--fs-heading) - 1px);
  line-height: var(--lh-snug);
}

.ai-callout-q {
  font-weight: 400;
}

.ai-callout-a {
  font-weight: 500;
  margin-top: 2px;
}

/* underline removed per design — weight contrast alone carries the answer */
.ai-callout-a span {
  display: inline-block;
}

.ai-divider {
  border: 0;
  height: 1px;
  width: 320px;
  background: var(--ink-rule);
  margin: 0 0 var(--sp-md);
}

.ai-promises {
  margin-bottom: 0;
}

.ai-promises li {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
}


/* ============================================================
   PAGE FIVE — partners section
   ============================================================
   Pure typography. Formal voice (vendor audience). Two thin
   dividers bracket the body like a quoted invitation.
   ============================================================ */
.partners-section {
  max-width: calc(var(--content-max) + 2 * var(--pad-x));
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.partners-body {
  max-width: var(--measure);
  margin-left: 0;
}

.partners-divider {
  border: 0;
  height: 1px;
  width: 260px;
  background: var(--ink-rule);
  margin: 0;
}

.partners-question {
  margin: var(--sp-md) 0 var(--sp-md);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
}

.partners-pitch {
  margin-bottom: var(--sp-lg);
}

.partners-pitch-lead {
  margin: 0 0 var(--sp-xs);
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
}

.partners-pitch-body {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
}


/* ============================================================
   PAGE SIX — contact section
   ============================================================
   First and only white surface. Submit button uses the
   gradient's deep-blue stop so it feels native.
   ============================================================ */
.contact-section {
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.contact-form {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--sp-lg);
  background: var(--form-bg);
  color: var(--form-ink);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(15, 20, 45, 0.35);
}

/* honeypot — visually invisible but present in DOM for Netlify */
.contact-form .hp {
  position: absolute;
  left: -9999px;
}

.field {
  display: block;
  margin-bottom: var(--sp-sm);
}

.field label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--form-label);
  letter-spacing: 0.01em;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: var(--fs-body);
  color: var(--form-ink);
  background: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 7px;
  padding: 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
  line-height: var(--lh-body);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--grad-blue);
  box-shadow: 0 0 0 3px rgba(46, 90, 158, 0.18);
}

.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: #c98c8c;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-md);
}

.submit-btn {
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--grad-blue);
  border: 1px solid var(--grad-blue);
  border-radius: 7px;
  padding: 10px 22px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.submit-btn:hover,
.submit-btn:focus-visible {
  opacity: 0.88;
}

.submit-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}


/* ============================================================
   success.html landing
   ============================================================ */
.success-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl) var(--pad-x);
  text-align: center;
}

.success-inner {
  max-width: 720px;
}

.success-heading {
  margin: 0 0 var(--sp-md);
  font-size: var(--fs-heading);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.success-back {
  margin: 0;
  font-size: var(--fs-body);
  color: rgba(255, 255, 255, 0.85);
}

.success-back a {
  color: inherit;
  transition: opacity 0.15s ease;
}

.success-back a:hover,
.success-back a:focus-visible {
  opacity: 0.78;
}


/* ============================================================
   Scroll-driven fade-in (modern browsers only — safe fallback)
   ============================================================ */
@supports (animation-timeline: view()) {
  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .fade-in {
    animation: fade-in-up 600ms ease-out both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
}


/* ============================================================
   Responsive
   ============================================================ */

/* tablet — 900px and below */
@media (max-width: 900px) {
  .nav {
    padding: var(--sp-sm) var(--sp-md);
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-pills-left,
  .nav-pills-right {
    margin-left: 0;
  }

  .nav-pills-left {
    margin-left: auto;
  }

  .nav-pills a {
    padding: 8px 16px;
  }

  .global-cta {
    right: var(--sp-md);
    bottom: var(--sp-md);
  }

  .page-footer {
    left: var(--sp-md);
    bottom: var(--sp-md);
  }

  .hero {
    padding: var(--sp-2xl) var(--pad-x) var(--sp-xl);
  }

  .hero-inner {
    gap: var(--sp-lg);
  }

  .row-caption {
    padding: 0 var(--sp-md);
  }
}


/* mobile — 600px and below */
@media (max-width: 600px) {
  .nav {
    padding: 14px 18px;
    gap: var(--sp-xs);
  }

  .nav-logo img {
    height: 30px;
  }

  .nav-menu-btn {
    display: inline-block;
    margin-left: auto;
  }

  /* pills hide until the drawer is opened */
  .nav-pills {
    display: none;
  }

  /* open state — translucent dark panel so pills stay legible
     when content scrolls behind */
  .nav.is-open {
    background: rgba(26, 19, 64, 0.94);
  }

  .nav.is-open .nav-pills {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    margin: 0;
  }

  .nav.is-open .nav-pills-left {
    margin-top: var(--sp-xs);
  }

  .nav.is-open .nav-pills a {
    display: block;
    text-align: center;
    padding: 9px 16px;
  }

  .global-cta {
    right: 18px;
    bottom: 18px;
  }

  .page-footer {
    left: 18px;
    bottom: 14px;
  }

  .hero {
    padding: 120px var(--pad-x) var(--sp-xl);
  }

  .hero-inner {
    gap: var(--sp-lg);
  }

  .hero-title img {
    width: min(80vw, 380px);
  }

  /* stack rows on mobile: caption always above its photo */
  .row {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: var(--sp-sm);
  }

  .row-img-left .row-caption,
  .row-img-right .row-caption {
    order: 1;
    grid-row: 1;
    padding: 0 var(--pad-x);
    text-align: left;
    justify-self: start;
    max-width: 100%;
  }

  .row .row-img {
    order: 2;
    grid-row: 2;
    height: 180px;
  }

  /* software — stack cards one-per-row. The grid's auto-fit
     minmax can squeeze two narrow tracks at certain widths
     (e.g. landscape phones, tablets just under this breakpoint),
     so we force a single column explicitly. */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* ai */
  .ai-divider {
    width: 240px;
  }

  /* partners */
  .partners-divider {
    width: 200px;
  }

  /* contact */
  .contact-form {
    padding: var(--sp-md) var(--sp-md);
    border-radius: 12px;
  }
}
