/* QIRO Consulting landing page
   Brand system shared with diagnose.qirodigital.com:
   royal indigo, blush accent, Instrument Sans with Instrument Serif italic. */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --indigo: #2100B8;
  --indigo-deep: #16007E;
  --indigo-night: #0E004F;
  --blush: #F4B8CC;
  --paper: #FBF7F5;
  --lilac: #EEE8F6;
  --ink: #1C1340;
  --ink-muted: #5B5478;
  --on-indigo: #FFFFFF;
  --on-indigo-muted: #CFC8F5;
  --hairline-dark: rgba(255, 255, 255, 0.14);
  --hairline-light: #DCD3EC;

  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
a { color: inherit; }

.visually-hidden {
  position: absolute !important; 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: 16px; top: -60px; z-index: 50;
  background: var(--paper); color: var(--indigo);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: calc(16px + env(safe-area-inset-top, 0px)); }

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

/* ---------- Stage: header, hero and pathways share one indigo field ---------- */

.stage {
  position: relative;
  overflow: hidden;
  color: var(--on-indigo);
  --mx: 78%; --my: 12%; --px: 0.5; --tx: 0px; --ty: 0px;
  background:
    radial-gradient(60% 48% at 90% -6%, rgba(185, 160, 255, 0.75), rgba(140, 110, 255, 0.25) 45%, transparent 72%),
    radial-gradient(38% 30% at 66% 8%, rgba(244, 184, 204, 0.28), transparent 70%),
    radial-gradient(50% 40% at 10% 100%, rgba(90, 60, 255, 0.35), transparent 70%),
    linear-gradient(180deg, #2A08C8 0%, var(--indigo) 40%, var(--indigo-deep) 100%);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.arcs {
  position: absolute; top: 0; right: 0; z-index: 0;
  transform: translate3d(var(--tx), var(--ty), 0);
  width: min(68vw, 820px); height: min(68vw, 820px);
  pointer-events: none;
}
.arcs circle { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 1.2; }

/* Arcs brighten where the light falls */
.arcs-lit {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle 300px at var(--mx) var(--my), #000 0%, rgba(0,0,0,0.5) 40%, transparent 75%);
          mask-image: radial-gradient(circle 300px at var(--mx) var(--my), #000 0%, rgba(0,0,0,0.5) 40%, transparent 75%);
}
.arcs--lit circle { stroke: rgba(255, 255, 255, 0.7); stroke-width: 1.6; }

/* Soft light that follows the pointer across the header and services */
.stage__light {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(560px circle at var(--mx) var(--my), rgba(190, 170, 255, 0.42), rgba(140, 110, 255, 0.14) 38%, transparent 68%),
    radial-gradient(220px circle at var(--mx) var(--my), rgba(255, 220, 235, 0.22), transparent 70%);
  mix-blend-mode: screen;
}

/* One slow ambient glow so the header never feels static */
.stage__aurora {
  position: absolute; z-index: 0; pointer-events: none;
  top: -20%; right: -10%; width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 120, 255, 0.45), rgba(244, 184, 204, 0.12) 45%, transparent 70%);
  filter: blur(20px);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-8vw, 6vh, 0) scale(1.12); }
  100% { transform: translate3d(-3vw, 14vh, 0) scale(0.96); }
}

/* Click ripple, echoing the arcs */
.ripple {
  position: absolute; z-index: 1; pointer-events: none;
  width: 0; height: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1.2px solid rgba(255, 255, 255, 0.75);
  animation: ripple 1.4s var(--ease) forwards;
}
.ripple--2 { border-color: rgba(244, 184, 204, 0.8); animation-delay: 0.14s; opacity: 0; }
@keyframes ripple {
  0%   { width: 0; height: 0; opacity: 0.95; }
  100% { width: 460px; height: 460px; opacity: 0; }
}

/* Mouse follower (fine pointers only, enabled by JS) */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  border-radius: 50%; opacity: 0;
  transition: opacity 0.3s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--blush); }
.has-cursor .cursor, .has-cursor .cursor-dot { opacity: 1; }
.has-cursor.cursor-out .cursor, .has-cursor.cursor-out .cursor-dot { opacity: 0; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 255, 255, 0.12); }
.cursor.is-card { width: 84px; height: 84px; margin: -42px 0 0 -42px; border-color: var(--indigo-night); background: rgba(14, 0, 79, 0.08); }
.cursor.on-light { border-color: var(--indigo); }
.cursor.on-light.is-link { background: rgba(33, 0, 184, 0.08); }
.cursor-dot.on-card, .cursor-dot.on-light { background: var(--indigo); }
.cursor.is-down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

.site-header {
  position: relative; z-index: 3;
  max-width: var(--wrap); margin: 0 auto;
  padding: 26px var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__mark {
  font-weight: 700; font-stretch: 75%;
  font-size: 2.05rem; line-height: 1; letter-spacing: 0.01em;
}
.brand__rule { width: 1px; height: 26px; background: var(--hairline-dark); }
.brand__name { font-size: 0.95rem; font-weight: 500; color: var(--on-indigo-muted); letter-spacing: 0.01em; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pill--ghost { border: 1px solid var(--hairline-dark); color: var(--on-indigo); }
.pill--ghost:hover { background: var(--blush); border-color: var(--blush); color: var(--indigo-night); }

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

.hero {
  position: relative; z-index: 2;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(72px, 12vw, 150px) var(--gutter) clamp(48px, 6vw, 72px);
}
.hero__title {
  max-width: 13ch;
  font-weight: 700; font-stretch: 82%;
  font-size: clamp(2.9rem, 8vw, 7rem);
  line-height: 0.93; letter-spacing: -0.035em;
}
.hero__title em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-stretch: normal; letter-spacing: -0.01em;
  color: var(--blush);
  padding-right: 0.06em;
  background: linear-gradient(100deg, var(--blush) 15%, #FFE3EE 38%, #FFFFFF 50%, #FFE3EE 62%, var(--blush) 85%);
  background-size: 260% 100%;
  background-position: calc(var(--px) * 100%) 50%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede {
  max-width: 54ch;
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--on-indigo-muted);
}

/* ---------- Pathways ---------- */

.pathways {
  position: relative; z-index: 2;
  max-width: calc(var(--wrap) + 120px); margin: 0 auto;
  padding: 0 var(--gutter);
}

.routes { position: relative; display: flex; flex-direction: column; align-items: center; }
.routes__node {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--hairline-dark);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.01em;
}
.routes__node::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blush);
}
.routes__svg { display: block; width: 100%; height: 96px; overflow: visible; }
.route {
  fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.35s var(--ease), opacity 0.35s var(--ease), stroke-width 0.35s var(--ease);
}
.pathways[data-active] .route { opacity: 0.25; }
.pathways[data-active="diagnose"] .route[data-route="diagnose"],
.pathways[data-active="web"] .route[data-route="web"],
.pathways[data-active="founder"] .route[data-route="founder"],
.pathways[data-active="catalyst"] .route[data-route="catalyst"] { opacity: 1; stroke-width: 2; }
.pathways[data-active="diagnose"] .route[data-route="diagnose"] { stroke: #9FD8FF; }
.pathways[data-active="web"] .route[data-route="web"] { stroke: #A99BFF; }
.pathways[data-active="founder"] .route[data-route="founder"] { stroke: #F4B8CC; }
.pathways[data-active="catalyst"] .route[data-route="catalyst"] { stroke: #DBF43E; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  --accent: var(--blush);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 400px;
  padding: clamp(24px, 2.2vw, 30px);
  border-radius: 22px;
  border: 1px solid var(--hairline-dark);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.45s var(--ease),
    background-color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    opacity 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}
/* The endpoint where each route lands */
.card::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  width: 44px; height: 3px; margin-left: -22px; border-radius: 0 0 3px 3px;
  background: var(--accent); opacity: 0.85;
}

.card__for {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; font-weight: 500; color: var(--on-indigo-muted);
}
.card__for::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.card__title {
  margin-top: clamp(40px, 5vw, 72px);
  font-weight: 700; font-stretch: 80%;
  font-size: clamp(1.6rem, 2.1vw, 2rem);
  line-height: 1.02; letter-spacing: -0.02em;
}
.card__link { text-decoration: none; }
/* Make the whole card the click target while keeping one clear link name */
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }

.card__for, .card__desc, .card__url, .card__more > p, .card__for::before, .card::before, .card__arc circle {
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease), stroke 0.4s var(--ease);
}
.card__desc {
  margin-top: 16px; max-width: 38ch;
  font-size: 1rem; line-height: 1.6; color: var(--on-indigo-muted);
}
.card__more {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.45s var(--ease);
}
.card__more > p {
  overflow: hidden; min-height: 0;
  padding-top: 14px; max-width: 38ch;
  font-size: 0.95rem; line-height: 1.6; color: var(--on-indigo);
}

.card__foot {
  margin-top: auto; padding-top: 32px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.card__cta {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.88rem; font-weight: 600; line-height: 1.3;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card__url { font-size: 0.8rem; color: var(--on-indigo-muted); opacity: 0.8; }

.card__arc {
  position: absolute; right: -1px; bottom: -1px; z-index: -1;
  width: 62%; height: auto; aspect-ratio: 1; pointer-events: none;
  opacity: 0; transform: scale(0.92); transform-origin: 100% 100%;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.card__arc circle { fill: none; stroke: var(--accent); stroke-width: 1; }

/* Hover and keyboard focus behaviour */
.card:hover, .card:focus-within {
  transform: translateY(-6px);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--indigo-night);
  box-shadow: 0 34px 70px -30px rgba(5, 0, 40, 0.75), 0 0 60px -10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.card:hover .card__for, .card:focus-within .card__for,
.card:hover .card__desc, .card:focus-within .card__desc,
.card:hover .card__url, .card:focus-within .card__url { color: rgba(14, 0, 79, 0.75); }
.card:hover .card__more > p, .card:focus-within .card__more > p { color: var(--indigo-night); }
.card:hover .card__for::before, .card:focus-within .card__for::before,
.card:hover::before, .card:focus-within::before { background: var(--indigo-night); }
.card:hover .card__cta, .card:focus-within .card__cta {
  background: var(--indigo-night); border-color: var(--indigo-night); color: #fff;
}
.card:hover .card__arc, .card:focus-within .card__arc { opacity: 0.5; transform: scale(1); }
.card:hover .card__arc circle, .card:focus-within .card__arc circle { stroke: var(--indigo-night); }
/* Highlight inside the card follows the pointer */
.card__link::after {
  background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 30%), rgba(255, 255, 255, 0.45), transparent 65%);
  mix-blend-mode: soft-light;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover .card__link::after { opacity: 1; }
.cards:has(.card:hover) .card:not(:hover) { opacity: 0.7; }

/* On wide pointer devices, keep the secondary line folded until the card is engaged */
/* Four-column row: one-line buttons and aligned titles */
@media (min-width: 1100px) {
  .card__for { min-height: 2.9em; align-items: flex-start; }
  .card__for::before { margin-top: 0.5em; }
  .card__title { margin-top: clamp(28px, 3vw, 48px); }
  .card__cta { white-space: nowrap; padding: 8px 15px; font-size: 0.84rem; }
}

@media (hover: hover) and (min-width: 1100px) {
  .card__more { grid-template-rows: 0fr; opacity: 0; }
  .card:hover .card__more, .card:focus-within .card__more { grid-template-rows: 1fr; opacity: 1; }
}

/* ---------- Practice statement ---------- */

.practice { background: var(--paper); }
.practice__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.practice__title {
  max-width: 14ch;
  font-weight: 700; font-stretch: 82%;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1; letter-spacing: -0.03em;
  color: var(--indigo);
}
.practice__body > p { max-width: 46ch; color: var(--ink-muted); font-size: 1.1rem; }
.principles {
  margin-top: 32px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--hairline-light);
}
.principles li {
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--hairline-light);
  font-size: 1rem; color: var(--ink-muted);
}
.principles li:nth-child(odd) { padding-right: 20px; }
.principles strong { display: block; color: var(--ink); font-weight: 600; }

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

.site-footer {
  background: var(--indigo-night); color: var(--on-indigo-muted);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 0.92rem;
}
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
}
.site-footer__brand { max-width: 40ch; }
.site-footer__brand .brand__mark { color: var(--on-indigo); font-size: 1.7rem; }
.site-footer__brand p { margin-top: 14px; }
.site-footer__nav { display: flex; flex-direction: column; gap: 4px; }
.site-footer__nav a {
  display: inline-flex; align-items: center; min-height: 36px;
  text-decoration: none; color: var(--on-indigo);
  transition: color 0.2s var(--ease);
}
.site-footer__nav a:hover { color: var(--blush); }
.site-footer__legal {
  max-width: var(--wrap); margin: 0 auto;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.8rem; opacity: 0.8;
}
.parent-link {
  color: var(--on-indigo);
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.parent-link:hover { color: var(--blush); text-decoration-color: var(--blush); }

/* ---------- Load sequence (one orchestrated moment) ---------- */

.js .route { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .card, .js .routes__node { opacity: 0; transform: translateY(14px); }
.js.is-ready .route {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s var(--ease) 0.25s, stroke 0.35s var(--ease), opacity 0.35s var(--ease), stroke-width 0.35s var(--ease);
}
.js.is-ready .routes__node { opacity: 1; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js.is-ready .card {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease) calc(0.7s + var(--i, 0) * 0.08s), transform 0.6s var(--ease) calc(0.7s + var(--i, 0) * 0.08s), background-color 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), color 0.45s var(--ease);
}
.js.is-settled .card { transition-delay: 0s; }
.js.is-settled .card:hover, .js.is-settled .card:focus-within { transform: translateY(-6px); }
.js.is-settled .cards:has(.card:hover) .card:not(:hover) { opacity: 0.7; }

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

/* Below 1100px: stack the routes as a vertical spine */
@media (max-width: 1099px) {
  .routes { align-items: flex-start; }
  .routes__svg { display: none; }
  .pathways .cards {
    grid-template-columns: 1fr; gap: 18px;
    position: relative; margin-top: 18px; padding-left: 26px;
  }
  .cards::before {
    content: ""; position: absolute; left: 16px; top: -18px; bottom: 40px;
    width: 1px; background: rgba(255, 255, 255, 0.28);
  }
  .card { min-height: 0; }
  .card::before {
    top: 30px; left: -1px; margin-left: 0;
    width: 3px; height: 26px; border-radius: 0 3px 3px 0;
  }
  .card__title { margin-top: 28px; }
  .card:hover, .card:focus-within, .js.is-settled .card:hover { transform: none; }
  .cards:has(.card:hover) .card:not(:hover) { opacity: 1; }
  .practice__inner { grid-template-columns: 1fr; }
}

@media (min-width: 600px) and (max-width: 1099px) {
  .card__foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}

@media (max-width: 520px) {
  .brand__name { display: none; }
  .brand__rule { display: none; }
  .principles { grid-template-columns: 1fr; }
  .principles li:nth-child(odd) { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation: none !important;
  }
  .ripple, .cursor, .cursor-dot { display: none; }
  .js .route { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .card, .js .routes__node { opacity: 1; transform: none; }
  .card:hover, .card:focus-within, .js.is-settled .card:hover { transform: none; }
}

/* Laptop and tablet landscape: 2 x 2 grid instead of a long stack */
@media (min-width: 760px) and (max-width: 1099px) {
  .routes { align-items: center; }
  .pathways .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .cards::before { display: none; }
  .card { min-height: 360px; }
  .card::before { top: -1px; left: 50%; margin-left: -22px; width: 44px; height: 3px; border-radius: 0 0 3px 3px; }
  .card__foot { flex-direction: column; align-items: flex-start; }
}
