/* Landing — full-bleed composition (phone and desktop share one layout language) */

html:has(.tl),
html.tl-page,
html:has(.tl) body,
html.tl-page body {
  height: auto !important;
  min-height: 100% !important;
  font-size: 16px !important;
  background: #070b12 !important;
  overflow: visible !important;
}

.tl {
  --ink: #070b12;
  --steel: #0f1522;
  --panel: #121a2b;
  --line: rgba(232, 237, 245, 0.14);
  --line-strong: rgba(232, 237, 245, 0.3);
  --fog: #e8edf5;
  --paper: #f2f5f9;
  --signal: #1ec8a5;
  --signal-deep: #0fa888;
  --signal-soft: rgba(30, 200, 165, 0.18);
  --coral: #ff5c45;
  --text: #0c1220;
  --muted: #5c6b80;
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--mk-font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* ZERO specificity via :where(), matching landing-v2.css. The old `.tl a { color: inherit }`
   had specificity (0,1,1) and loaded AFTER marketing-shared.css, so it tied-and-won against
   `.mk-mobilenav a` (also 0,1,1). `.tl` sets color to --text (#0c1220, near-black body ink
   for the light paper ground), so drawer links inherited black onto the navy mobile nav —
   section headers (divs) stayed teal, link text vanished. TASK-75. */
:where(.tl) :where(a) { color: inherit; text-decoration: none; }

.tl h1,
.tl h2,
.tl h3 {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ── Hero: full-bleed visual + copy (same on desktop & phone) ── */
.tl-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--mk-nav-h) + 24px) clamp(20px, 5vw, 72px) clamp(64px, 10vh, 104px);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.tl-hero-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tl-hero-grid {
  position: absolute;
  inset: -8%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 75% at 60% 40%, #000 15%, transparent 72%);
  animation: tl-grid-drift 24s linear infinite;
}

.tl-hero-glow {
  position: absolute;
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  right: -5%;
  top: 5%;
  background: radial-gradient(circle, rgba(30, 200, 165, 0.28) 0%, transparent 68%);
  animation: tl-glow-pulse 5.5s ease-in-out infinite;
}

.tl-hero-assembly {
  position: absolute;
  right: clamp(4%, 8vw, 12%);
  top: 46%;
  transform: translateY(-50%);
  width: min(52vw, 580px);
  height: min(56vh, 500px);
  opacity: 0.85;
}

.tl-hero-assembly svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tl-beam {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-linecap: square;
  opacity: 0;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: tl-draw 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tl-beam:nth-child(1) { animation-delay: 0.12s; }
.tl-beam:nth-child(2) { animation-delay: 0.24s; }
.tl-beam:nth-child(3) { animation-delay: 0.36s; }
.tl-beam:nth-child(4) { animation-delay: 0.48s; }
.tl-beam:nth-child(5) { animation-delay: 0.6s; }
.tl-beam:nth-child(6) { animation-delay: 0.72s; }

.tl-node {
  fill: var(--ink);
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: 0;
  animation: tl-node-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tl-node:nth-of-type(1) { animation-delay: 0.65s; }
.tl-node:nth-of-type(2) { animation-delay: 0.8s; }
.tl-node:nth-of-type(3) { animation-delay: 0.95s; }
.tl-node:nth-of-type(4) { animation-delay: 1.05s; }
.tl-node:nth-of-type(5) { animation-delay: 1.15s; }
.tl-node:nth-of-type(6) { animation-delay: 1.25s; }

.tl-slab {
  fill: rgba(30, 200, 165, 0.1);
  stroke: rgba(30, 200, 165, 0.5);
  stroke-width: 1;
  opacity: 0;
  animation: tl-slab-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tl-slab:nth-of-type(1) { animation-delay: 1.05s; }
.tl-slab:nth-of-type(2) { animation-delay: 1.2s; }
.tl-slab:nth-of-type(3) { animation-delay: 1.35s; }

.tl-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 38rem;
}

.tl-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}

.tl-hero h1 {
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 16ch;
  color: #fff;
}

.tl-hero-lead {
  margin: 0 0 32px;
  max-width: 42ch;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(232, 237, 245, 0.72);
  line-height: 1.65;
}

.tl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tl-btn,
a.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--signal);
  color: var(--ink) !important;
  font-family: var(--mk-font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tl-btn:hover,
a.tl-btn:hover {
  background: #3ad9b6;
  color: var(--ink) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 200, 165, 0.28);
}

.tl-btn-ghost,
a.tl-btn-ghost {
  background: transparent;
  color: #fff !important;
  border-color: var(--line-strong);
}

.tl-btn-ghost:hover,
a.tl-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.tl-hero-note {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(232, 237, 245, 0.5);
}

.tl-hero-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tl-scroll-cue {
  position: absolute;
  bottom: 28px;
  right: clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 237, 245, 0.45);
  z-index: 2;
}

.tl-scroll-cue i {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--signal), transparent);
  animation: tl-scroll-line 1.8s ease-in-out infinite;
}

/* ── Transform: full-bleed board + overlay copy ──── */
.tl-transform {
  position: relative;
  height: 260vh;
  background: var(--steel);
  color: #fff;
}

.tl-transform-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: block;
  overflow: hidden;
}

.tl-stage {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--panel);
}

.tl-stage-frame {
  position: absolute;
  inset: clamp(16px, 3vw, 28px);
  border: 1px dashed rgba(232, 237, 245, 0.12);
  pointer-events: none;
}

.tl-transform-copy {
  position: absolute;
  z-index: 3;
  left: clamp(16px, 4vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  width: min(400px, calc(100% - 32px));
  padding: 22px 22px 20px;
  background: rgba(7, 11, 18, 0.82);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.tl-transform-copy h2 {
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
  max-width: 14ch;
}

.tl-transform-copy p {
  margin: 0 0 18px;
  color: rgba(232, 237, 245, 0.7);
  font-size: 0.98rem;
  max-width: 34ch;
  line-height: 1.6;
}

.tl-phase {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 237, 245, 0.45);
  margin-bottom: 12px;
}

.tl-phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.tl-transform.is-ordered .tl-phase-dot {
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-soft);
}

.tl-phase-label::after { content: "Complexity"; }
.tl-transform.is-ordered .tl-phase-label::after { content: "Clarity"; }

.tl-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 237, 245, 0.45);
}

.tl-meter-track {
  height: 3px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.tl-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--signal);
}

.tl-chip {
  position: absolute;
  left: 0;
  top: 0;
  width: min(280px, 42vw);
  min-height: 56px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 92, 69, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  will-change: transform, border-color, background, box-shadow;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  /* % of stage — chaos defaults (JS overrides with px) */
  transform: translate(8%, 18%) rotate(-10deg);
}

.tl-chip:nth-child(2) { transform: translate(12%, 16%) rotate(-11deg); }
.tl-chip:nth-child(3) { transform: translate(58%, 12%) rotate(9deg); }
.tl-chip:nth-child(4) { transform: translate(8%, 42%) rotate(7deg); }
.tl-chip:nth-child(5) { transform: translate(55%, 38%) rotate(-8deg); }
.tl-chip:nth-child(6) { transform: translate(18%, 68%) rotate(10deg); }
.tl-chip:nth-child(7) { transform: translate(52%, 66%) rotate(-6deg); }

.tl-chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 1px;
  background: var(--coral);
  vertical-align: middle;
  transition: background 0.3s ease;
}

.tl-transform.is-ordered .tl-chip {
  border-color: rgba(30, 200, 165, 0.6);
  background: rgba(30, 200, 165, 0.14);
  box-shadow: 0 0 0 1px rgba(30, 200, 165, 0.1);
}

.tl-transform.is-ordered .tl-chip::before { background: var(--signal); }

.tl-chip-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(232, 237, 245, 0.45);
  opacity: 0;
  min-height: 1em;
  transition: opacity 0.3s ease;
}

.tl-transform.is-ordered .tl-chip-meta {
  opacity: 1;
  color: rgba(232, 237, 245, 0.6);
}

@keyframes tl-draw {
  to { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes tl-node-in {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes tl-slab-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes tl-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-56px, -56px, 0); }
}
@keyframes tl-glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes tl-scroll-line {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Live demo iframe (warehouse cmb-demo equivalent) */
.tl-demo {
  background: var(--paper);
  padding: 72px clamp(20px, 5vw, 72px);
  scroll-margin-top: 72px;
  text-align: center;
}
.tl-demo-inner { max-width: 1120px; margin: 0 auto; }
.tl-demo h2 {
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--ink);
}
.tl-demo-lead {
  margin: 0 auto 28px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.tl-demo-shell {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(140deg, rgba(30, 200, 165, 0.35), rgba(255, 92, 69, 0.18) 50%, rgba(30, 200, 165, 0.35));
}
.tl-demo-shell iframe,
.tl-demo-frame {
  width: 100%;
  height: 900px;
  border: none;
  display: block;
  background: #fff;
  border-radius: 12px;
}
@media (max-width: 680px) {
  .tl-demo-frame { height: min(900px, 80dvh); }
}
.tl-demo-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(160deg, var(--signal), var(--signal-deep));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 18px 44px;
  font-family: var(--mk-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(15, 168, 136, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: tl-demo-halo 2.6s ease-out infinite;
}
.tl-demo-start:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 48px rgba(15, 168, 136, 0.36); }
@keyframes tl-demo-halo {
  0%   { outline: 0 solid rgba(30, 200, 165, 0.35); outline-offset: 0; }
  70%  { outline: 12px solid rgba(30, 200, 165, 0); outline-offset: 6px; }
  100% { outline: 0 solid rgba(30, 200, 165, 0); outline-offset: 0; }
}
.tl-demo-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .tl-hero-assembly {
    width: min(70vw, 420px);
    opacity: 0.45;
    right: -2%;
  }

  .tl-chip { width: min(220px, 56vw); font-size: 0.82rem; }
}

@media (max-width: 640px) {
  .tl-hero-assembly { display: none; }
  .tl-transform { height: 220vh; }
  .tl-transform-copy {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 16px;
    transform: none;
  }
}
