/* Redlab — services hub. Loaded after base.css, blocks.css and service.css (crumbs, hero proof).
   The page is an index, not a second homepage: the title, every service by stage (after Phenomenon's
   services page), what we build and for which markets, then questions and the form. */

/* ==========================================================================
   1. Hero, the index-page type: crumbs, the title across the full width, then one line of copy with the
      Clutch proof on its baseline. Landing pages (home, services) carry actions, logos and a scene; an
      index page gets to its content on the first screen.
   ========================================================================== */
main > .hub-hero { display: grid; gap: clamp(28px, 4vh, 48px); padding-block: clamp(24px, 4vh, 48px) clamp(48px, 6vh, 72px); }
.hub-hero h1 { font-size: var(--t-title); }
.hub-hero h1 span { display: block; }
.hub-hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hub-hero .hero-copy { max-width: 34em; }
.hub-hero .hero-proof { padding-left: 0; border-left: 0; }

/* ==========================================================================
   2. Services by stage, after Phenomenon's services page. Left: a quiet sticky index of the stages, the one
      being read in ink with a red dot, and a person to ask. Right: each stage's promise, then its services
      as tall tiles on a hairline grid, two to a row — a stage grows by rows, the index never changes.
   ========================================================================== */
main > .by-stage { padding-top: clamp(40px, 4vw, 64px); }
.stages { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 40px clamp(32px, 4vw, 72px); align-items: start; }
.stage-side { position: sticky; top: 112px; display: grid; gap: 40px; }
.stage-nav li + li { margin-top: 4px; }
.stage-nav a { display: flex; align-items: center; gap: 10px; padding-block: 4px; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.3; color: var(--faint); text-decoration: none; transition: color .3s var(--ease); }
.stage-nav a::before { content: ''; flex: none; align-self: center; width: 9px; height: 9px; margin-right: 2px; border-radius: 50%; background: var(--red); transform: scale(0); transition: transform .35s var(--ease); }
.stage-nav a:hover { color: var(--muted); }
.stage-nav a[aria-current] { color: var(--ink); }
.stage-nav a[aria-current]::before { transform: none; }
.stage-person { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px 14px; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-l); background: var(--surface); }
.stage-person .person-photo { width: 48px; height: 48px; }
.stage-person .button { grid-column: 1 / -1; }

.stage { scroll-margin-top: 112px; }
.stage + .stage { margin-top: clamp(64px, 6vw, 112px); }
.stage-promise { max-width: 22em; margin-bottom: var(--head-gap); font-size: var(--t-h2); font-weight: 400; line-height: 1.15; letter-spacing: -.03em; }


/* A stage with one service (Add AI): the tile spans both columns, and the parts of the service sit inside it as pill
   links to their sections on the service page. A link can't hold links, so the card is a box: the tile link stretches
   over the whole card (::before), the pills sit above it. The hover fill covers the pills too, so they stay inside. */
.tiles .is-wide { grid-column: 1 / -1; }
.tile-card { position: relative; margin-block: 8px; border-radius: var(--r-m); transition: background-color .35s var(--ease); }
.tile-card .tile { position: static; height: auto; margin: 0; padding-bottom: 12px; }
.tile-card .tile::before { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.tile-card .tile:hover { background: none; }
.tile-card:hover { background: var(--surface); }
.tile-card:has(.tile:hover) .tile-name { color: var(--red); }
.tile-card:has(.tile:hover) .tile::after { border-color: var(--ink); background: var(--ink); color: var(--white); transform: rotate(-45deg); }
.tile-parts { position: relative; z-index: 1; pointer-events: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--card-pad) var(--card-pad); }
.tile-parts a { pointer-events: auto; display: inline-flex; align-items: center; min-height: 32px; padding: 6px 14px; border: 1px solid var(--hair); border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); color: var(--ink-2); text-decoration: none; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.tile-parts a::after { content: '→'; margin-left: 6px; color: var(--muted); transition: color .3s var(--ease); }
.tile-card:hover .tile-parts a { background: var(--white); }
.tile-card .tile-parts a:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.tile-parts a:hover::after { color: var(--white); }

/* ==========================================================================
   4–5. What we build, who we build it for: a large name on the left, what we built there as tags on the right.
   ========================================================================== */
.mk-list { border-top: 1px solid var(--hair); }
.mk-list a, .mk-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 36px; align-items: center; gap: 16px 32px; min-height: 92px; padding: 18px 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.mk-list a::after { content: '→'; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--hair); border-radius: 50%; background: var(--white); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
.mk-name { font-size: var(--t-h2); letter-spacing: -.03em; color: var(--muted); transition: color .3s var(--ease), transform .45s var(--ease); }
.mk-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mk-tags i { padding: 6px 12px; border: 1px solid var(--hair); border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-small); font-style: normal; color: var(--ink-2); transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.mk-list a:hover .mk-name { color: var(--ink); transform: translateX(8px); }
.mk-list a:hover .mk-tags i { border-color: var(--hair); background: var(--white); }
/* A row without its own page yet: looks like the hovered state, but with no arrow and no movement. */
.mk-row .mk-name { color: var(--ink); }
/* In a list with static rows, the one link keeps the same dark name, so it doesn't look switched off; the arrow shows it opens. */
.mk-list:has(.mk-row) a .mk-name { color: var(--ink); }
.mk-list:has(.mk-row) a .mk-tags i { background: var(--white); }
.mk-row .mk-tags i { background: var(--white); }
.mk-list a:hover::after { border-color: var(--ink); background: var(--ink); color: var(--white); transform: rotate(-45deg); }

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1080px) {
  .stages { grid-template-columns: minmax(0, 1fr); }
  .stage-side { position: sticky; top: 64px; z-index: 5; display: block; margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter); border-bottom: 1px solid var(--hair); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .stage-nav ol { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .stage-nav li + li { margin-top: 0; }
  .stage-nav a { white-space: nowrap; }
  .stage-person { display: none; }
  .mk-list a, .mk-row { grid-template-columns: minmax(0, 1fr) 36px; }
  .mk-tags { grid-column: 1; justify-content: flex-start; }
  .mk-list a::after { grid-column: 2; grid-row: 1; }
}

/* ==========================================================================
   Phone
   ========================================================================== */
@media (max-width: 760px) {
  .hub-hero h1 { font-size: clamp(40px, 11.5vw, 56px); }
  .mk-list a:hover .mk-name { transform: none; }
  .tile-card .tile { padding-bottom: 8px; }
  .tile-parts { padding: 0 16px 20px; }
}
