/* ============================================================
   Winjit US - WinScale tool page
   Shape: hero + vocabulary + load-profile shapes + dashboard + offer.
   Content: SDLC_AI_Tools.xlsx, plus real product vocabulary and the
   four load-profile shapes named on WinScale's own product page
   (Collection, Environment, Flow, Feature, Load Profile, Threshold;
   Fixed/Ramping/Spike/Peak). All figures shown are illustrative
   sample-run data, labelled as such, not client results.
   Tokens from css/styles.css. Shared tp- rules from css/tools.css.
   No colours introduced beyond the site's existing tokens.
   ============================================================ */

/* ------------------------------------------------------------
   SECTION 1 - HERO
   ------------------------------------------------------------ */
.wsc-hero {
  background: linear-gradient(180deg, var(--soft-blue) 0%, var(--mint) 100%);
  padding: clamp(28px, 4vw, 44px) 0 clamp(56px, 7vw, 88px);
}
.wsc-hero__cols { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.wsc-window {
  position: relative; background: #fff; border-radius: var(--radius-card); overflow: hidden;
  box-shadow: 0 30px 70px rgba(3, 78, 162, .14), 0 0 0 1px rgba(255, 255, 255, .6);
  animation: wsc-rise 900ms var(--ease-out) 200ms both;
}
.wsc-window__bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background: var(--grey-50); border-bottom: 1px solid var(--grey-200);
}
.wsc-window__dots { display: flex; gap: 6px; }
.wsc-window__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-300); }
.wsc-window__file { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--grey-600); font-weight: 600; }
.wsc-window__file svg.i { width: 15px; height: 15px; color: var(--primary); }
.wsc-window__body { padding: clamp(18px, 2.2vw, 24px); }
.wsc-window__note {
  position: absolute; top: 11px; right: 16px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--grey-400);
}

.wsc-log { margin: 0; font: 13.5px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--grey-700); white-space: pre; overflow-x: auto; }
.wsc-log .ok { color: var(--forest-ink); font-weight: 700; }
.wsc-log .warn { color: var(--primary); font-weight: 700; }
.wsc-log b { color: var(--primary); }

.wsc-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--grey-100); }
.wsc-verdict__badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--radius-pill);
  background: var(--green-100); color: var(--forest-ink); font-size: 14px; font-weight: 700;
}
.wsc-verdict__badge svg.i { width: 15px; height: 15px; }
.wsc-verdict__note { font-size: 13.5px; color: var(--grey-600); }

@keyframes wsc-rise { from { opacity: 0; transform: translateY(18px); } }

/* pipeline strip: line draws, nodes light up in turn (js/main.js adds .in) */
.wsc-pipe {
  position: relative; list-style: none; margin: clamp(40px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.wsc-pipe::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 25px; height: 2px;
  background: var(--grad-line); opacity: .3;
}
.wsc-pipe::after {
  content: ""; position: absolute; left: 8%; right: 8%; top: 25px; height: 2px;
  background: var(--grad-line);
  transform-origin: left; transform: scaleX(0); transition: transform 1400ms var(--ease-out) 150ms;
}
.wsc-pipe.in::after { transform: scaleX(1); }
.wsc-pipe li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.wsc-pipe li > span:last-child { font-size: 13px; font-weight: 600; color: var(--grey-600); }
.wsc-pipe__node {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; border: 2px solid var(--grey-300); color: var(--grey-500);
  transition: background-color 400ms var(--ease-out), border-color 400ms var(--ease-out), color 400ms var(--ease-out), box-shadow 400ms ease;
}
.wsc-pipe__node svg.i { width: 20px; height: 20px; }
.wsc-pipe.in li:nth-child(1) .wsc-pipe__node { transition-delay: 200ms; }
.wsc-pipe.in li:nth-child(2) .wsc-pipe__node { transition-delay: 420ms; }
.wsc-pipe.in li:nth-child(3) .wsc-pipe__node { transition-delay: 640ms; }
.wsc-pipe.in li:nth-child(4) .wsc-pipe__node { transition-delay: 860ms; }
.wsc-pipe.in li:nth-child(5) .wsc-pipe__node { transition-delay: 1080ms; }
.wsc-pipe.in li:nth-child(6) .wsc-pipe__node { transition-delay: 1300ms; }
.wsc-pipe.in li .wsc-pipe__node { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 6px rgba(3, 78, 162, .12); }

@media (max-width: 960px) { .wsc-hero__cols { grid-template-columns: 1fr; } .wsc-window { max-width: 560px; } }
@media (max-width: 680px) {
  .wsc-pipe { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .wsc-pipe::before, .wsc-pipe::after { display: none; }
}
@media (max-width: 420px) { .wsc-pipe li > span:last-child { font-size: 11.5px; } }

/* ------------------------------------------------------------
   SECTION 2 - THE VOCABULARY
   ------------------------------------------------------------ */
.wsc-concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.8vw, 20px); }
.wsc-concept {
  position: relative; background: #fff; border: 1px solid var(--strokes); border-radius: var(--radius-card);
  padding: clamp(22px, 2.4vw, 28px);
  transition: opacity 500ms var(--ease-out), transform 200ms var(--ease-out), box-shadow 200ms ease, border-color 200ms ease;
}
.wsc-concept.in:hover { transform: translateY(-3px); border-color: rgba(3, 78, 162, .2); box-shadow: var(--card-hover-shadow); }
.wsc-concept__num {
  position: absolute; top: 20px; right: 22px; font-family: var(--ff-display); font-weight: 700;
  font-size: 13px; color: var(--grey-300);
}
.wsc-concept h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.wsc-concept p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--grey-600); }

@media (max-width: 900px) { .wsc-concepts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .wsc-concepts { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   SECTION 3 - FOUR LOAD PROFILE SHAPES
   ------------------------------------------------------------ */
.wsc-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 20px); }
.wsc-shape {
  background: #fff; border: 1px solid var(--strokes); border-radius: var(--radius-card);
  padding: clamp(18px, 2.2vw, 24px);
  transition: opacity 500ms var(--ease-out), transform 200ms var(--ease-out), box-shadow 200ms ease;
}
.wsc-shape.in:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.wsc-tag {
  display: inline-flex; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700;
  margin-bottom: 14px;
}
.wsc-tag--fixed   { background: var(--grey-100); color: var(--grey-800); }
.wsc-tag--ramping { background: var(--grey-100); color: var(--grey-800); }
.wsc-tag--spike   { background: var(--grey-100); color: var(--grey-800); }
.wsc-tag--peak    { background: var(--grey-100); color: var(--grey-800); }

.wsc-shape__chart { display: block; width: 100%; height: 56px; margin-bottom: 14px; overflow: visible; }
.wsc-shape__chart path {
  fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1300ms var(--ease-out) 150ms;
}
.wsc-shape.in .wsc-shape__chart path { stroke-dashoffset: 0; }
.wsc-shape p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--grey-600); }

@media (max-width: 900px) { .wsc-shapes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .wsc-shapes { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   SECTION 4 - WHAT COMES BACK
   ------------------------------------------------------------ */
.wsc-dash { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.wsc-report {
  background: var(--grey-50); border: 1px solid var(--strokes); border-radius: var(--radius-block);
  padding: clamp(20px, 2.6vw, 30px);
}
.wsc-report__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.wsc-report__stats div { background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius-icon); padding: 14px 12px; text-align: center; }
.wsc-report__stats b { display: block; font-family: var(--ff-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 27px); color: var(--primary); line-height: 1.1; }
.wsc-report__stats span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--grey-600); }

.wsc-report__dist { margin-bottom: 20px; }
.wsc-bar { display: grid; grid-template-columns: 34px 1fr 52px; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--grey-600); }
.wsc-bar i { display: block; height: 9px; border-radius: 5px; background: var(--grey-200); position: relative; overflow: hidden; }
.wsc-bar i::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary); border-radius: 5px;
  transition: width 1100ms var(--ease-out);
}
/* amber, not rose: the run still passes (see the Go badge below), this is
   "watch this number," not a failure - rose is reserved for an actual fail */
.wsc-bar--flag i::after { background: var(--primary); }
.wsc-bar b { text-align: right; font-weight: 700; color: var(--grey-900); }
.wsc-report.in .wsc-bar i::after { width: var(--w); }
.wsc-report.in .wsc-bar:nth-child(2) i::after { transition-delay: 200ms; }
.wsc-report.in .wsc-bar:nth-child(3) i::after { transition-delay: 400ms; }
.wsc-report.in .wsc-bar:nth-child(4) i::after { transition-delay: 600ms; }

.wsc-verdict--card { margin-top: 0; padding-top: 18px; }

@media (max-width: 900px) { .wsc-dash { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .wsc-report__stats { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   SECTION 5 - FIRST ENGAGEMENT
   ------------------------------------------------------------ */
.wsc-close .lp-close__inner { padding: clamp(64px, 8vw, 104px) 0; }
.wsc-close h2 { max-width: 22ch; margin-bottom: 30px; }
.wsc-facts {
  display: grid; grid-template-columns: 1.3fr 1.1fr .7fr; max-width: 820px; margin: 0 auto 36px; text-align: left;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 20px; overflow: hidden;
  background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.wsc-facts div { padding: 18px 22px; }
.wsc-facts div + div { border-left: 1px solid rgba(255, 255, 255, .18); }
.wsc-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); margin-bottom: 6px; }
.wsc-facts dd { margin: 0; font-size: 15px; line-height: 1.45; color: #fff; }

@media (max-width: 700px) {
  .wsc-facts { grid-template-columns: 1fr; }
  .wsc-facts div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
}

/* ------------------------------------------------------------
   Reduced motion - everything resolves to its final state
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .wsc-window { animation: none !important; }
  .wsc-pipe::after, .wsc-pipe__node, .wsc-shape__chart path, .wsc-bar i::after { transition: none !important; }
  .wsc-pipe::after { transform: scaleX(1); }
  .wsc-pipe__node { background: var(--primary); border-color: var(--primary); color: #fff; }
  .wsc-shape__chart path { stroke-dashoffset: 0; }
  .wsc-bar i::after { width: var(--w); }
}
