/* ==========================================================================
   TierCore - "Technical Grid" design system
   Hairline structure, blueprint grid, mono microcopy, single cyan accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts - Latin subsets only, self-hosted. Sora and Manrope are variable.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/sora-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-mono-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg: #08090b;
  --panel: #0b0d11;
  --panel-2: rgba(255, 255, 255, 0.03);
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-soft: rgba(255, 255, 255, 0.06);

  --accent: #4cc2ff;
  --accent-ink: #050608;
  --accent-dim: rgba(76, 194, 255, 0.3);
  --accent-wash: rgba(76, 194, 255, 0.06);

  /* Text tones. --ink-3 is lightened from the comp's #5f6771, which fails
     WCAG AA against --bg; #5f6771 survives only as a decorative rule colour. */
  --ink: #f2f5f8;
  --ink-2: #9aa2ac;
  --ink-3: #7f8791;

  --grid: 44px;              /* blueprint background pitch */
  --radius: 6px;
  --radius-sm: 4px;
  --pad-x: 40px;             /* horizontal section padding */
  --maxw: 1280px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: #8fd8ff;
}

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

ul {
  list-style: none;
}

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

.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: 12px;
  top: -60px;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  min-height: 100vh;
}

.section {
  padding: 56px var(--pad-x);
  border-top: 1px solid var(--hairline);
}

/* Rows run edge-to-edge and carry their own padding, so the section drops
   its horizontal padding and hands it to the eyebrow instead. */
.section--rows {
  padding: 56px 0 0;
}

.section--rows > .eyebrow {
  padding: 0 var(--pad-x);
}

/* Consistent gap between a section's mono label and whatever follows it.
   Scoped to direct children so the label inside .flow__card is unaffected. */
.section > .eyebrow + * {
  margin-top: 22px;
}

/* Blueprint grid background - two hairline gradients on a --grid pitch. */
.grid-bg {
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
}

.grid-bg--faint {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink-3);
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
}

.h-hero {
  font-size: clamp(34px, 6.2vw, 62px);
  line-height: 1.05;
  letter-spacing: -1.8px;
  color: #f2f5f8;
}

.h-section {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -1.2px;
}

.h-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 21px);
  color: #f2f5f8;
}

.accent {
  color: var(--accent);
}

.lede {
  font-size: clamp(17px, 2.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.body-copy {
  font-size: 15px;
  line-height: 1.6;
  color: #98a0aa;
}

/* --------------------------------------------------------------------------
   Badge / status pill
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-wash);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex: none;
}

.dot--pulse {
  animation: tcpulse 1.8s ease-in-out infinite;
}

@keyframes tcpulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 24px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
}

.btn--primary:hover {
  background: #7ed3ff;
  color: var(--accent-ink);
}

.btn--ghost {
  color: #dfe4e9;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.03);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--pad-x);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.brand__suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.nav a {
  color: var(--ink-2);
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}

.nav__cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
}

.nav__cta:hover {
  color: var(--accent-ink);
  background: var(--accent);
}

/* Mobile disclosure - CSS only, no JavaScript on this site.
   The <details> is a *sibling* of .nav, not its parent: browsers hide
   non-summary children of a closed <details> in ways author CSS can't
   reliably override, so the panel is toggled via the ~ combinator instead. */
.nav-toggle {
  display: none;
}

.nav-toggle > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
}

.nav-toggle > summary::-webkit-details-marker {
  display: none;
}

.nav-toggle[open] > summary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

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

.hero {
  padding: clamp(56px, 9vw, 90px) var(--pad-x) clamp(48px, 8vw, 80px);
}

.hero__inner {
  max-width: 920px;
}

.hero .badge {
  margin-bottom: 26px;
}

.hero .lede {
  max-width: 560px;
  margin: 26px 0 36px;
}

/* --------------------------------------------------------------------------
   Automation flow panel
   Grafted from concept 1a, restyled into the technical-grid vocabulary:
   6px radii, flat panel fill, hairline border, no drop shadows.
   -------------------------------------------------------------------------- */

.flow {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  margin: 0;
}

.flow__chrome {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--hairline-soft);
}

.flow__light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  flex: none;
}

.flow__title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
  margin-left: 10px;
}

.flow__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-wash);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.flow__body {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  padding: 26px;
}

.flow__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step--active {
  background: var(--accent-wash);
  border-color: rgba(76, 194, 255, 0.28);
}

.step__glyph {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: none;
}

.step--active .step__glyph {
  background: rgba(76, 194, 255, 0.16);
  border-color: rgba(76, 194, 255, 0.4);
}

.step__text {
  flex: 1;
  min-width: 0;
}

.step__name,
.step__meta {
  display: block;
}

.step__name {
  font-size: 14.5px;
  color: #eef1f4;
  font-weight: 600;
}

.step__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.step--active .step__meta {
  color: #8fd2f7;
}

/* Mono index on the right edge - mirrors the 01-04 on the service rows. */
.step__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex: none;
}

.step__rail {
  width: 2px;
  height: 16px;
  background: linear-gradient(var(--accent), rgba(76, 194, 255, 0.2));
  margin: 5px 0 5px 31px;
}

.flow__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow__card > .flow__label {
  margin-bottom: 0;
}

/* Anchor the conversation to the bottom of the card, the way a real chat
   pane behaves - otherwise it floats at the top with dead space beneath it
   whenever the step column is the taller of the two. */
.flow__card > .bubble:first-of-type {
  margin-top: auto;
}

.flow__card {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 88%;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 8px 11px;
}

.bubble--out {
  align-self: flex-end;
  max-width: 82%;
  color: #dfe4e9;
  background: rgba(76, 194, 255, 0.14);
  border: 1px solid rgba(76, 194, 255, 0.25);
  border-radius: 11px 11px 3px 11px;
}

.bubble--in {
  align-self: flex-start;
  color: #b7bec7;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 11px 11px 11px 3px;
}

/* --------------------------------------------------------------------------
   Bordered service rows
   -------------------------------------------------------------------------- */

.rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.row {
  padding: 36px var(--pad-x);
  border-top: 1px solid var(--hairline);
}

.rows > .row:nth-child(odd) {
  border-right: 1px solid var(--hairline);
}

.row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.row__idx {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   Process / three-up
   -------------------------------------------------------------------------- */

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

.step-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}

.triple p {
  font-size: 15px;
  line-height: 1.6;
  color: #b3bac3;
}

/* --------------------------------------------------------------------------
   Prose blocks (about, contact, privacy-adjacent pages)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 18px;
}

.prose li {
  position: relative;
  padding-left: 22px;
  margin-top: 10px;
  color: #b3bac3;
}

.prose li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 32px;
}

/* Panels are always laid out by a container (.pair) that owns the gap, so
   they carry no outer margin of their own - a sibling margin here knocks
   side-by-side panels out of alignment. */
.panel > * + * {
  margin-top: 18px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.cta {
  border-top: 1px solid var(--hairline);
  padding: clamp(48px, 7vw, 70px) var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta p {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-2);
}

.cta h2 {
  margin-bottom: 12px;
}

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

.footer {
  border-top: 1px solid var(--hairline);
  padding: 36px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

.footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer nav a {
  color: var(--ink-2);
}

.footer nav a:hover {
  color: var(--ink);
}

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

@media (max-width: 1023px) {
  .rows,
  .triple,
  .pair {
    grid-template-columns: 1fr;
  }

  .rows > .row:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 899px) {
  .flow__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --grid: 28px;
    --pad-x: 20px;
  }

  .shell {
    border-left: 0;
    border-right: 0;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle[open] ~ .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    /* Lifted well clear of --panel: as an overlay it has to read as a
       separate layer, not as more page. */
    background: #12161d;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--accent-dim);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.9);
    font-size: 15px;
  }

  .nav-toggle[open] ~ .nav a {
    padding: 16px var(--pad-x);
    border-bottom: 1px solid var(--hairline-soft);
  }

  .nav-toggle[open] ~ .nav a:last-child {
    border-bottom: 0;
  }

  .nav-toggle[open] ~ .nav .nav__cta {
    border: 0;
    border-radius: 0;
    color: var(--accent);
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .flow__title {
    display: none;
  }

  .panel {
    padding: 24px;
  }
}

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

  .dot--pulse {
    opacity: 1;
  }
}
