/* ============================================================================
   PAGE: IT CONSULTING (it-consulting.html)
   Sections: split-screen compass hero · sweep-fill index rows · pull-quote ·
             self-drawing blueprint · winding roadmap · zoom-to-bleed panel ·
             drifting organic venn · tilted brutal slab CTA
   ============================================================================ */

@layer sections {

  /* ===================== SPLIT-SCREEN HERO ===================== */
  .con-hero {
    display: grid;
    min-height: min(100svh, 60rem);
  }
  @media (min-width: 960px) { .con-hero { grid-template-columns: 1.15fr .85fr; } }

  .con-hero__copy {
    align-self: center;
    padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(3rem, 6vw, 5rem);
    padding-inline-start: max(var(--gutter), (100vw - 1280px) / 2);
  }
  .con-hero__title {
    font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.4rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: .96;
    margin-bottom: 2rem;
    max-inline-size: 14ch;
  }
  .con-hero__title em { color: var(--accent); font-weight: inherit; }
  .con-hero__lead { font-size: var(--fs-lg); line-height: 1.4; letter-spacing: -.01em; margin-bottom: 1.1rem; max-inline-size: 46ch; }
  .con-hero__text { color: var(--ink-soft); max-inline-size: 58ch; }

  .con-hero__panel {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-block-size: 22rem;
    background: var(--grad-k);
    border-radius: clamp(2rem, 6vw, 5rem) 0 0 clamp(2rem, 6vw, 5rem);
    margin-top: 0;
  }
  @media (max-width: 959px) { .con-hero__panel { margin-inline: var(--gutter) 0; } }
  @media (min-width: 960px) { .con-hero__panel { margin-top: calc(var(--header-h) + 1.5rem); margin-bottom: 1.5rem; } }

  .compass { inline-size: min(80%, 26rem); }
  .compass__ring { fill: none; stroke: rgb(245 238 228 / .35); stroke-width: 2; }
  .compass__ring--dash { stroke-dasharray: 4 10; stroke: var(--k-amber); }
  .compass__ticks path { stroke: var(--k-amber); stroke-width: 4; stroke-linecap: round; }
  .compass__needle { transform-origin: 200px 200px; transform-box: view-box; }

  /* ===================== INDEX ROWS ===================== */
  .plan__title { font-size: var(--fs-xl); letter-spacing: -.035em; margin-bottom: 2rem; max-inline-size: 20ch; }
  .plan__cols { display: grid; gap: 1.25rem 4rem; color: var(--ink-soft); }
  @media (min-width: 800px) { .plan__cols { grid-template-columns: 1fr 1fr; } }
  .plan__lead { margin: clamp(3rem, 6vw, 5rem) 0 1rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; }

  .rows { border-top: 2px solid var(--line); }
  .rows__item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.1rem, 2.2vw, 1.75rem) clamp(.5rem, 1.5vw, 1.25rem);
    border-bottom: 2px solid var(--line);
    font-size: clamp(1.2rem, .9rem + 1.4vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.15;
    transition: color .45s var(--ease-out), padding .45s var(--ease-out);
  }
  /* Gradient sweeps in from the left on hover */
  .rows__item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--grad-brand);
    transform-origin: 0 50%;
    scale: 0 1;
    transition: scale .55s var(--ease-out);
  }
  .rows__item:hover { color: #fff; padding-inline-start: clamp(1.25rem, 3vw, 2.5rem); }
  .rows__item:hover::before { scale: 1 1; }

  /* ===================== PULL-QUOTE ===================== */
  .needs__grid { display: grid; gap: 3rem; align-items: center; }
  @media (min-width: 960px) { .needs__grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
  .needs__copy { display: grid; gap: 1.1rem; color: var(--ink-soft); }
  .needs__title { color: var(--ink); font-size: var(--fs-xl); letter-spacing: -.035em; margin-bottom: .75rem; }
  .needs__title em { color: var(--accent); font-weight: inherit; }

  .pullquote { position: relative; margin: 0; padding-top: 4.5rem; }
  .pullquote__mark { position: absolute; top: 0; left: 0; inline-size: clamp(4rem, 7vw, 6rem); fill: var(--k-orange); }
  .pullquote p {
    font-family: var(--font-serif);
    font-style: normal;
    font-size: clamp(1.7rem, 1.1rem + 2.2vw, 3rem);
    line-height: 1.18;
    letter-spacing: -.01em;
  }

  /* ===================== BLUEPRINT ===================== */
  .review__grid { display: grid; gap: 3rem; align-items: center; }
  @media (min-width: 960px) { .review__grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
  .review__copy { display: grid; gap: 1.1rem; color: var(--ink-soft); }
  .review__title { color: var(--ink); font-size: var(--fs-xl); letter-spacing: -.035em; margin-bottom: .75rem; }

  .blueprint {
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: var(--radius);
    background-color: color-mix(in oklab, var(--k-indigo) 92%, transparent);
    /* Graph-paper grid */
    background-image:
      linear-gradient(rgb(251 176 59 / .12) 1px, transparent 1px),
      linear-gradient(90deg, rgb(251 176 59 / .12) 1px, transparent 1px);
    background-size: 22px 22px;
    border: 2px solid var(--line);
    box-shadow: 10px 10px 0 var(--k-amber);
  }
  .blueprint svg { overflow: visible; }
  .blueprint__lines * { fill: none; stroke: #f5eee4; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  .blueprint__lens { fill: rgb(251 176 59 / .18); stroke: var(--k-amber); stroke-width: 4; translate: 90px 65px; }

  /* ===================== ROADMAP ===================== */
  .roadmap__title { font-size: var(--fs-xl); letter-spacing: -.035em; margin-bottom: clamp(2.5rem, 5vw, 4rem); max-inline-size: 18ch; }
  .roadmap__title em { color: var(--accent); font-weight: inherit; }
  .roadmap__track { position: relative; }
  .roadmap__road { display: none; }
  .roadmap__road path { fill: none; stroke: var(--k-orange); stroke-width: 6; stroke-linecap: round; }
  .roadmap__stops { display: grid; gap: 2rem; padding-left: 2.5rem; border-left: 4px dashed var(--k-orange); }
  .roadmap__stop { position: relative; color: var(--ink-soft); }
  .roadmap__pin {
    position: absolute;
    left: calc(-2.5rem - 14px);
    top: .1rem;
    inline-size: 24px;
    aspect-ratio: 1;
    border-radius: 50% 50% 50% 0;
    rotate: -45deg;
    background: var(--k-magenta);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--k-magenta);
  }
  @media (min-width: 900px) {
    .roadmap__road { display: block; position: absolute; inset: 0 0 auto; inline-size: 100%; block-size: 120px; }
    .roadmap__stops { grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); padding: 140px 0 0; border: 0; }
    .roadmap__pin { left: 0; top: 60px; }
    .roadmap__stop:nth-child(1) .roadmap__pin { top: -88px; left: 12%; }
    .roadmap__stop:nth-child(2) .roadmap__pin { top: -88px; left: 30%; }
    .roadmap__stop:nth-child(3) .roadmap__pin { top: -88px; left: 50%; }
  }

  /* ===================== ZOOM PANEL ===================== */
  .zoom { padding-block: clamp(2rem, 5vw, 4rem); }
  .zoom__panel {
    padding-block: clamp(5rem, 10vw, 9rem);
    background: var(--k-indigo);
    color: #f5eee4;
    background-image: radial-gradient(60rem circle at 85% 0%, rgb(156 10 94 / .55), transparent 60%);
  }
  .zoom__grid { display: grid; gap: 1.5rem 4rem; }
  @media (min-width: 900px) { .zoom__grid { grid-template-columns: 1fr 1fr; } .zoom__title { grid-column: 1 / -1; } }
  .zoom__title { font-size: clamp(2rem, 1.1rem + 5vw, 6rem); letter-spacing: -.05em; line-height: .92; margin-bottom: 1.5rem; max-inline-size: 14ch; }
  .zoom__title em { color: var(--k-amber); font-weight: inherit; }
  .zoom__grid p { color: #d6cbe6; }

  /* ===================== VENN ===================== */
  .venn__title { font-size: var(--fs-xl); letter-spacing: -.035em; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
  .venn__stage { display: grid; gap: 0; justify-items: center; }
  .venn__shape {
    display: grid;
    place-items: center;
    inline-size: min(100%, 34rem);
    aspect-ratio: 1;
    padding: clamp(3.4rem, 9vw, 5.5rem);
    border-radius: var(--blob);
    font-size: clamp(.92rem, .85rem + .35vw, 1.1rem);
    line-height: 1.55;
  }
  /* Narrow phones: a square can't hold the paragraph → let the blob grow taller */
  @media (max-width: 599px) { .venn__shape { aspect-ratio: auto; min-block-size: 18rem; padding: 3.2rem 2.2rem; } }
  .venn__shape--a { background: var(--grad-k); color: #f5eee4; position: relative; z-index: 1; }
  .venn__shape--b {
    background: var(--grad-fire);
    color: var(--k-indigo);
    margin-top: -12%;
    border-radius: 44% 56% 52% 48% / 58% 44% 56% 42%;
    border: 2px solid var(--line);
  }
  @media (min-width: 900px) {
    .venn__stage { grid-template-columns: 1fr 1fr; align-items: center; }
    .venn__shape--a { justify-self: end; margin-right: -6%; }
    .venn__shape--b { justify-self: start; margin: 4rem 0 0 -6%; inline-size: min(100%, 28rem); }
  }

  /* ===================== TILTED SLAB CTA ===================== */
  .slab {
    position: relative;
    display: grid;
    gap: 2rem;
    padding: clamp(2rem, 6vw, 5rem);
    border-radius: 22px;
    background: var(--k-amber);
    color: var(--k-indigo);
    border: 3px solid var(--k-indigo);
    box-shadow: 14px 14px 0 var(--k-indigo);
    rotate: -1.5deg;
    transition: rotate .6s var(--ease-spring), box-shadow .6s var(--ease-out);
  }
  .slab:hover { rotate: 0deg; box-shadow: 18px 18px 0 var(--k-indigo); }
  @media (min-width: 900px) { .slab { grid-template-columns: 1.1fr 1fr; align-items: end; } }
  .slab__title { font-size: clamp(2rem, 1.2rem + 3vw, 4rem); letter-spacing: -.045em; line-height: .98; }
  .slab__title em { font-weight: inherit; color: var(--k-magenta); }
  .slab__body { display: grid; gap: 1rem; justify-items: start; }
  .slab__sticker {
    position: absolute;
    inline-size: clamp(5rem, 9vw, 7.5rem);
    top: clamp(-3.5rem, -4vw, -2.5rem);
    right: clamp(1rem, 4vw, 3rem);
  }
  .slab__sticker circle { fill: var(--k-magenta); stroke: var(--k-indigo); stroke-width: 3; }
  .slab__sticker path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
  .btn--slab {
    margin-top: .5rem;
    border-radius: 14px;
    color: var(--k-amber);
    background: var(--k-indigo);
    border: 2px solid var(--k-indigo);
    box-shadow: 5px 5px 0 var(--k-magenta);
  }
  .btn--slab:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--k-magenta); }
}

@layer motion {
  @keyframes lens-scan {
    0%   { translate: 90px 65px; }
    25%  { translate: 330px 65px; }
    50%  { translate: 210px 165px; }
    75%  { translate: 90px 260px; }
    100% { translate: 330px 260px; }
  }
  @keyframes needle   { from { rotate: -40deg; } to { rotate: 220deg; } }
  @keyframes tick-spin { to { rotate: 360deg; } }
  @keyframes zoom-out { from { clip-path: inset(0 6% round 48px); } to { clip-path: inset(0 0 round 0); } }
  @keyframes venn-a   { from { translate: -14% 0; } to { translate: 0 0; } }
  @keyframes venn-b   { from { translate: 14% 0; }  to { translate: 0 0; } }
  @keyframes road     { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes bp-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

  @media (prefers-reduced-motion: no-preference) {
    /* Title words slide in from the left with a skew (overrides the default rise) */
    .con-hero__title[data-kinetic-in] .word__inner { translate: -110% 0; rotate: 0deg; skew: -12deg 0; opacity: 0; transition: translate 1s var(--ease-out), skew 1s var(--ease-out), opacity .8s, color .35s; transition-delay: calc(var(--i) * 80ms + 150ms), calc(var(--i) * 80ms + 150ms), calc(var(--i) * 80ms + 150ms), 0s; }
    .con-hero__title[data-kinetic-in].is-in .word__inner { translate: 0 0; skew: 0deg 0; opacity: 1; }

    .blueprint__lens { animation: lens-scan 10s ease-in-out infinite alternate; }
    .compass__ticks { transform-origin: 200px 200px; transform-box: view-box; animation: tick-spin 40s linear infinite; }
    .venn__shape--a, .venn__shape--b { animation: morph 16s ease-in-out infinite alternate; }

    @supports (animation-timeline: scroll()) {
      /* Compass needle turns with page scroll */
      .compass__needle { animation: needle linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }

      /* Blueprint lines draw themselves as the section enters */
      .blueprint__lines * { stroke-dasharray: 1; animation: bp-draw linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }

      /* Roadmap path draws across */
      .roadmap__road path { stroke-dasharray: 1; animation: road linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }

      /* Rounded panel opens to full bleed */
      .zoom__panel { animation: zoom-out linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }

      /* Venn shapes drift together; the wrapper keeps the morph animation free */
      .venn__stage > :first-child { animation: venn-a linear both, morph 16s ease-in-out infinite alternate; animation-timeline: view(), auto; animation-range: entry 0% cover 45%, normal; }
      .venn__stage > :last-child  { animation: venn-b linear both, morph 16s ease-in-out infinite alternate; animation-timeline: view(), auto; animation-range: entry 0% cover 45%, normal; }
    }
  }
}
