/* Talowiz case study. Shared pieces: case-study.css, case-contact.css; more in case-talowiz-2.css.
   Ultraviolet on a deep night, lavender working surfaces, glowing edges.
   Signature: the flow builder in .tw-flow, whose wires draw in on scroll (case-talowiz.js). */

:root {
  --accent: #6a37f1;
  --tw-uv: #6a37f1;
  --tw-uv-hi: #8c5cff;
  --tw-lav: #c3b3f3;
  --tw-lilac: #f3effe;
  --tw-night: #0c0620;
  --tw-night-2: #160c38;
  --tw-green: #22c55e;
  --tw-mono: 'JetBrains Mono', ui-monospace, monospace;
  --cs-ink: #170f33;
  --cs-muted: #4f4868;
  --cs-faint: #857e9e;
  --cs-line: rgb(23 15 51 / 12%);
  --cs-bg: #f8f6ff;
  --cs-dark: var(--tw-night);
  --cs-dot-radius: 3px;
  --cs-dot-dark: var(--tw-lav);
  --cf-dots: rgb(106 55 241 / 10%);
  --cf-glow: rgb(106 55 241 / 18%);
  --cf-btn: #170f33;
  --cf-btn-icon: #8c5cff;
  --cf-btn-icon-fg: #fff;
  --cf-sent: #170f33;
  --cf-sent-fg: #c3b3f3;
}

a:hover { color: var(--accent); }
.tw-glowtext { color: #b79cff; text-shadow: 0 0 28px rgb(140 92 255 / 75%); }

/* ---------- hero: night stage with an ultraviolet glow ---------- */
.tw-hero { position: relative; overflow: hidden; padding: clamp(72px, 8vw, 120px) var(--gutter) 0; background: var(--tw-night); color: var(--white); }
.tw-hero__glow { position: absolute; inset: auto -10% -20% -10%; height: 85%; background: radial-gradient(55% 60% at 50% 70%, rgb(124 69 249 / 70%), rgb(106 55 241 / 25%) 45%, transparent 75%); pointer-events: none; }
.tw-hero__top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 72px; align-items: end; }
.tw-hero__copy { display: grid; gap: 26px; }
.tw-tag { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 8px 16px 8px 12px; border: 1px solid rgb(195 179 243 / 30%); border-radius: 999px; background: rgb(106 55 241 / 18%); font-family: var(--tw-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--tw-lav); }
.tw-tag__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tw-green); box-shadow: 0 0 10px var(--tw-green); }
.tw-hero__title { max-width: 860px; font-weight: 600; font-size: clamp(38px, 5.2vw, 84px); line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.tw-hero__side { display: grid; gap: 28px; padding-bottom: 8px; }
.tw-hero__lead { margin: 0; font-size: 17px; line-height: 1.65; color: rgb(255 255 255 / 74%); }
.tw-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid rgb(195 179 243 / 22%); }
.tw-spec > div { padding: 14px 16px 14px 0; border-bottom: 1px solid rgb(195 179 243 / 22%); }
.tw-spec dt { margin-bottom: 4px; font-family: var(--tw-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tw-lav); }
.tw-spec dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--white); }
.tw-hero__stage { position: relative; margin-top: clamp(40px, 5vw, 72px); }
.tw-hero__stage img { display: block; width: 100%; height: auto; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 120px rgb(124 69 249 / 45%), 0 0 0 1px rgb(195 179 243 / 25%); }

/* ---------- product brief + modules ---------- */
.tw-brief { background: linear-gradient(180deg, var(--tw-lilac), var(--cs-bg)); }
.tw-brief__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px 88px; align-items: center; }
.tw-for__label { margin: 8px 0 0; font-family: var(--tw-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cs-faint); }
.tw-for { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tw-for li { padding: 8px 14px; border-radius: 8px; background: var(--white); border: 1px solid var(--cs-line); font-size: 14px; color: var(--cs-ink); }
.tw-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.tw-mods li { position: relative; display: grid; align-content: start; gap: 10px; min-height: 200px; padding: 26px; border-radius: 20px; background: var(--white); border: 1px solid var(--cs-line); box-shadow: 0 20px 50px -36px rgb(106 55 241 / 50%); }
.tw-mods li:nth-child(2), .tw-mods li:nth-child(4) { transform: translateY(32px); }
.tw-mods li::after { content: ""; position: absolute; top: 26px; right: 26px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--tw-uv); background: var(--white); }
.tw-mods__id { font-family: var(--tw-mono); font-size: 12px; color: var(--tw-uv); }
.tw-mods h3 { margin: auto 0 0; padding-top: 28px; font-size: clamp(19px, 1.5vw, 23px); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.tw-mods p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--cs-muted); }

/* ---------- signature: the flow builder ---------- */
.tw-flow { overflow: hidden; background: radial-gradient(80% 60% at 20% 0%, var(--tw-night-2), var(--tw-night) 70%); color: var(--white); }
.tw-flow .cs-lead { color: rgb(255 255 255 / 70%); }
.tw-editor { margin-top: 56px; border-radius: 24px; background: #120a2c; border: 1px solid rgb(195 179 243 / 18%); box-shadow: 0 40px 120px -40px rgb(106 55 241 / 60%); overflow: hidden; }
.tw-editor__bar { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgb(195 179 243 / 14%); background: rgb(255 255 255 / 3%); font-family: var(--tw-mono); font-size: 12.5px; color: rgb(255 255 255 / 70%); }
.tw-editor__dots { display: flex; gap: 6px; }
.tw-editor__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgb(195 179 243 / 30%); }
.tw-editor__name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tw-editor__chip { padding: 5px 10px; border-radius: 6px; background: rgb(34 197 94 / 16%); color: #7ee2a4; white-space: nowrap; }
.tw-editor__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.tw-canvas { position: relative; min-height: 460px; padding: 48px 36px; background-color: #120a2c; background-image: radial-gradient(rgb(195 179 243 / 16%) 1px, transparent 1.5px); background-size: 22px 22px; }
.tw-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tw-wires path { fill: none; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: var(--d, 1); }
.tw-wires [data-tw-lines] path { stroke: #a98bff; stroke-width: 2.5; }
.tw-wires [data-tw-glow] path { stroke: #8c5cff; stroke-width: 9; opacity: .7; filter: url(#tw-blur); }
.tw-wires path.is-base { stroke: rgb(195 179 243 / 14%); stroke-width: 2; stroke-dasharray: 4 6; filter: none; opacity: 1; }
.tw-spark { fill: #fff; filter: drop-shadow(0 0 6px #b79cff) drop-shadow(0 0 14px #8c5cff); opacity: 0; transition: opacity .3s; }
.tw-spark.is-on { opacity: 1; }
.tw-nodes { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 36px; margin: 0; padding: 0; list-style: none; }
.tw-nodes li { flex: 0 1 158px; }
.tw-nodes li:nth-child(1) { margin-top: 30px; }
.tw-nodes li:nth-child(2) { margin-top: 180px; }
.tw-nodes li:nth-child(3) { margin-top: 10px; }
.tw-nodes li:nth-child(4) { margin-top: 190px; }
.tw-nodes li:nth-child(5) { margin-top: 70px; }
.tw-node { position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 16px 18px; border: 1px solid rgb(195 179 243 / 20%); border-radius: 16px; background: #1a1040; color: rgb(255 255 255 / 55%); transition: border-color .4s, background .4s, color .4s, box-shadow .4s, transform .3s; }
.tw-node__btn { justify-self: start; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 19px; font-weight: 600; letter-spacing: -.01em; text-align: left; white-space: nowrap; cursor: pointer; }
.tw-node__btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tw-node:hover { transform: translateY(-2px); border-color: rgb(195 179 243 / 50%); }
.tw-node:has(:focus-visible) { outline: 2px solid #fff; outline-offset: 3px; }
.tw-node__btn:focus-visible { outline: 0; }
.tw-node__id { font-family: var(--tw-mono); font-size: 11.5px; color: rgb(195 179 243 / 60%); }
.tw-node__sub { font-size: 12.5px; line-height: 1.4; }
.tw-node.is-lit { border-color: rgb(169 139 255 / 70%); color: var(--white); box-shadow: 0 0 0 1px rgb(140 92 255 / 30%), 0 12px 40px -10px rgb(140 92 255 / 70%); }
.tw-node.is-lit .tw-node__sub { color: rgb(255 255 255 / 70%); }
.tw-node.is-on { background: linear-gradient(160deg, #7c45f9, #5a2fd6); border-color: #c3b3f3; color: var(--white); box-shadow: 0 0 0 4px rgb(140 92 255 / 25%), 0 18px 60px -12px rgb(140 92 255 / 90%); }
.tw-node.is-on .tw-node__id, .tw-node.is-on .tw-node__sub { color: rgb(255 255 255 / 85%); }
.tw-inspect { padding: 28px 28px 32px; border-left: 1px solid rgb(195 179 243 / 14%); background: rgb(255 255 255 / 3%); }
.tw-inspect__head { margin: 0 0 22px; font-family: var(--tw-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgb(195 179 243 / 70%); }
.tw-detail { display: grid; gap: 14px; }
.tw-detail + .tw-detail { margin-top: 32px; }
.tw-ready .tw-detail + .tw-detail { margin-top: 0; }
.tw-ready .tw-detail:not(.is-on) { display: none; }
.tw-detail.is-on { animation: tw-in .5s var(--ease) both; }
.tw-detail__id { margin: 0; font-family: var(--tw-mono); font-size: 12.5px; color: #b79cff; }
.tw-detail h3 { margin: 0; font-size: clamp(22px, 1.8vw, 28px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.tw-detail p { margin: 0; font-size: 15px; line-height: 1.65; color: rgb(255 255 255 / 72%); }
.tw-detail .tw-detail__note { padding: 12px 14px; border-radius: 10px; background: rgb(106 55 241 / 20%); border: 1px solid rgb(195 179 243 / 20%); font-size: 13.5px; color: rgb(255 255 255 / 85%); }
.tw-detail__note b { display: block; margin-bottom: 2px; font-family: var(--tw-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tw-lav); }
@keyframes tw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1240px) {
  .tw-editor__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tw-canvas { min-height: 0; padding: 32px 24px; }
  .tw-nodes { flex-direction: column; align-items: stretch; gap: 34px; }
  .tw-nodes li { flex: none; }
  .tw-nodes li:nth-child(n) { margin-top: 0; }
  .tw-nodes li:nth-child(even) { margin-left: 22%; }
  .tw-nodes li:nth-child(odd) { margin-right: 22%; }
  .tw-ready .tw-detail { position: sticky; top: 96px; }
}
@media (max-width: 1000px) {
  .tw-hero__top, .tw-brief__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tw-hero__stage img { border-radius: 18px 18px 0 0; }
  .tw-spec { grid-template-columns: 1fr 1fr; }
  .tw-mods { grid-template-columns: 1fr; }
  .tw-mods li { min-height: 0; }
  .tw-mods li:nth-child(n) { transform: none; }
  .tw-mods h3 { padding-top: 6px; }
  .tw-editor { margin-top: 40px; border-radius: 18px; }
  .tw-editor__chip { display: none; }
  .tw-editor__body { grid-template-columns: 1fr; }
  .tw-canvas { padding: 24px 18px; }
  .tw-nodes { gap: 26px; }
  .tw-nodes li:nth-child(even) { margin-left: 14%; }
  .tw-nodes li:nth-child(odd) { margin-right: 14%; }
  .tw-node { grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 12px 14px; }
  .tw-node__sub { grid-column: 1 / -1; }
  .tw-ready .tw-detail { position: static; }
  .tw-inspect { padding: 22px 20px 26px; border-left: 0; border-top: 1px solid rgb(195 179 243 / 14%); }
}
@media (prefers-reduced-motion: reduce) {
  .tw-node, .tw-spark { transition: none; }
  .tw-detail.is-on { animation: none; }
}

/* the client logo (from the site logo set) on a white pill, readable on light and dark heroes */
.tw-brand { display: inline-flex; align-items: center; justify-self: start; margin: 0; padding: 10px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 6%), 0 10px 24px -14px rgb(0 0 0 / 35%); }
.tw-brand img { display: block; width: auto; height: 30px; }
