/* ── /support/ (renderSupportPage in scripts/build-blog.mjs) ─────────────────
   .sp-hero      navy hero: the copy beside a phone playing a WhatsApp thread with
                 Clubtech Support (js/support-page.js) and the ticket it becomes
   .sp-channels  the four ways in, wired into one ticket
   .sp-people    the people a venue works with, a track that fills in view
   .sp-raise     how an existing team raises an issue, the console still beside it
   The thread is complete in the HTML: with no script or with reduced motion the
   whole conversation and the resolved ticket show.
   ────────────────────────────────────────────────────────────────────────── */

/* Hero */
.sp-hero{position:relative;overflow:hidden;background:var(--navy);color:#cbd5e1;padding:168px 0 104px}
.sp-hero::before{content:"";position:absolute;inset:18% -20% -40% 38%;border-radius:50%;background:radial-gradient(circle,rgba(65,94,226,.34),rgba(93,254,194,.07) 42%,transparent 68%);pointer-events:none}
.sp-hero-grid{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 540px;gap:40px;align-items:center}
.sp-hero-copy{container-type:inline-size}
/* sized so each authored line sets on one line beside the phone */
.sp-hero h1{margin-top:18px;color:var(--white);font-size:clamp(36px,9.8cqw,64px);line-height:.96;letter-spacing:-.07em}
.sp-lead{max-width:520px;margin-top:30px;font-size:20px;line-height:1.45;font-weight:600;color:#cbd5e1;text-wrap:pretty}
.sp-hero .solution-actions{margin-top:34px}

/* The phone: WhatsApp's own dark theme, so the channel reads at a glance */
.sp-stage{position:relative;display:flex;justify-content:flex-end;padding-right:12px}
.sp-phone{--bz:9px;width:300px;flex:none;margin:0;box-shadow:0 40px 90px rgba(0,0,0,.55)}
.wa{position:relative;display:flex;flex-direction:column;height:610px;overflow:hidden;border-radius:35px;background:#0b141a;color:#e9edef;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Roboto,sans-serif;letter-spacing:0}
.wa::before{content:"";position:absolute;z-index:2;top:10px;left:50%;width:84px;height:24px;margin-left:-42px;border-radius:14px;background:#000}
.wa-bar{display:flex;align-items:center;gap:9px;padding:44px 14px 10px;background:#1f2c34}
.wa-back{width:9px;height:15px;flex:none;color:#aebac1}
.wa-avatar{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:var(--mint)}
.wa-avatar img{width:19px;height:19px}
.wa-who{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.wa-who strong{font-size:15px;font-weight:600}
.wa-status{font-size:12px;color:#8696a0}
.sp-stage.is-typing .wa-status{color:#00a884}
.wa-thread{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:5px;margin:0;padding:10px 10px 6px;list-style:none;overflow:hidden;transition:opacity .5s}
.wa-thread>li{flex:none}
.wa-day{align-self:center;margin-bottom:6px;padding:4px 10px;border-radius:8px;background:#182229;color:#8696a0;font-size:11.5px;font-weight:500}
.wa-msg{max-width:84%;padding:6px 8px 7px 9px;border-radius:9px;overflow:hidden}
.wa-msg p{font-size:13.5px;line-height:1.36;color:#e9edef}
.wa-msg.is-out{align-self:flex-end;background:#005c4b;border-top-right-radius:3px}
.wa-msg.is-in{align-self:flex-start;background:#202c33;border-top-left-radius:3px}
.wa-meta{float:right;display:inline-flex;align-items:center;gap:3px;margin:7px 0 -5px 10px;font-size:10.5px;line-height:1;color:rgba(233,237,239,.62)}
.wa-tick{width:16px;height:10px;color:rgba(233,237,239,.62);transition:color .4s}
.wa-msg.is-read .wa-tick{color:#53bdeb}
.wa-msg.is-photo{width:74%;padding:3px}
.wa-msg.is-photo img{display:block;width:100%;height:auto;border-radius:7px}
.wa-msg.is-photo p{padding:5px 6px 3px}
.wa-typing{display:none;align-self:flex-start;gap:4px;padding:11px 12px;border-radius:9px;border-top-left-radius:3px;background:#202c33}
.wa-typing i{width:6px;height:6px;border-radius:50%;background:#8696a0;animation:wa-typing 1.2s infinite}
.wa-typing i:nth-child(2){animation-delay:.15s}
.wa-typing i:nth-child(3){animation-delay:.3s}
@keyframes wa-typing{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-2px)}}
.sp-stage.is-typing .wa-typing{display:flex}
.sp-stage.is-playing .wa-msg:not(.is-shown){display:none}
.wa-compose{display:flex;align-items:center;gap:8px;padding:6px 10px 20px}
.wa-compose span{flex:1;padding:10px 14px;border-radius:20px;background:#202c33;color:#8696a0;font-size:13.5px}
.wa-compose i{width:38px;height:38px;flex:none;border-radius:50%;background:#00a884 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b141a' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M6 11a6 6 0 0 0 12 0M12 17v4'/%3E%3C/svg%3E") center/18px no-repeat}

/* The ticket the thread becomes, beside the phone */
/* it overlaps the phone's bezel only, never the thread */
.sp-ticket{position:absolute;z-index:1;right:302px;bottom:72px;width:252px;padding:16px 16px 15px;border-radius:18px;background:var(--white);color:var(--heading);box-shadow:0 30px 70px rgba(0,0,0,.5);letter-spacing:-.01em;transition:opacity .6s var(--ease-out),transform .6s var(--ease-out)}
.sp-ticket p{line-height:1.3}
.sp-ticket-top{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:var(--heading)}
.sp-ticket-top img{width:15px;height:15px}
.sp-ticket-top span{margin-left:auto;font-weight:600;color:var(--muted)}
.sp-ticket-title{margin-top:12px;font-size:16px;font-weight:700}
.sp-ticket-meta{margin-top:6px;font-size:13px;color:var(--muted)}
.sp-ticket-state{display:flex;gap:6px;margin-top:14px}
.sp-ticket-state span{padding:5px 11px;border-radius:999px;background:#f1f3f9;color:#94a3b8;font-size:12px;font-weight:700;transition:background-color .4s,color .4s}
.sp-ticket[data-state="open"] .is-open{background:#fdf0d5;color:#a16207}
.sp-ticket[data-state="resolved"] .is-resolved{background:#dcfce7;color:#15803d}
.sp-ticket[data-state="none"]{opacity:0;transform:translateY(14px)}

/* Section heads shared by the bands below */
.sp-head h2{font-size:clamp(38px,4.4vw,62px);line-height:.98}
.sp-sub{max-width:520px;margin-top:22px;font-size:20px;line-height:1.45;font-weight:600;color:var(--muted);text-wrap:pretty}

/* Channels: four rows wired into one ticket */
.sp-channels{background:var(--paper)}
.sp-channels-grid{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);gap:64px;align-items:center}
.sp-funnel{display:grid;grid-template-columns:minmax(0,1fr) 168px;align-items:center}
.sp-channel-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.sp-channel-list li{position:relative;display:flex;gap:16px;align-items:flex-start;margin-right:40px;padding:18px 20px;border:1px solid var(--line);border-radius:18px;background:var(--white)}
.sp-channel-list h3{font-size:19px;line-height:1.2}
.sp-channel-list p{margin-top:6px;font-size:15px;line-height:1.45;color:var(--muted)}
.sp-icon{width:42px;height:42px;flex:none;padding:9px;border-radius:12px;background:var(--navy);color:var(--mint)}
/* The wires: a stub from each row to a bus, the bus down to the next row, one line on to the ticket */
.sp-channel-list li::after,.sp-channel-list li:not(:last-child)::before,.sp-one::before{content:"";position:absolute;background:var(--indigo);transition:transform .7s var(--ease-out)}
.sp-channel-list li::after{left:100%;top:38px;width:40px;height:2px;transform-origin:0 50%}
.sp-channel-list li:not(:last-child)::before{left:calc(100% + 38px);top:38px;width:2px;height:calc(100% + 12px);transform-origin:50% 0}
.sp-one{position:relative;display:flex;flex-direction:column;gap:6px;margin-left:24px;padding:18px 18px 20px;border-radius:18px;background:var(--navy);color:#aeb9cb;box-shadow:0 24px 50px rgba(2,6,23,.2);transition:opacity .6s var(--ease-out) .5s,transform .6s var(--ease-out) .5s}
.sp-one::before{right:100%;top:50%;width:26px;height:2px;transform-origin:0 50%;transition-delay:.4s}
.sp-one-n{font-size:12px;font-weight:700;color:#8792ad;letter-spacing:0}
.sp-one strong{color:var(--white);font-size:24px;line-height:1;letter-spacing:-.04em}
.sp-one span:last-child{font-size:13px;line-height:1.35;font-weight:600}
.js .sp-channels:not(.is-in) .sp-channel-list li::after,.js .sp-channels:not(.is-in) .sp-one::before{transform:scaleX(0)}
.js .sp-channels:not(.is-in) .sp-channel-list li::before{transform:scaleY(0)}
.js .sp-channels:not(.is-in) .sp-one{opacity:0;transform:translateX(-12px)}
.sp-channel-list li:nth-child(2)::after{transition-delay:.08s}
.sp-channel-list li:nth-child(3)::after{transition-delay:.16s}
.sp-channel-list li:nth-child(4)::after{transition-delay:.24s}
.sp-channel-list li::before{transition-delay:.2s}

/* The relay: in view, each way in sends in turn. Its row lights, a token with its
   icon runs the wire, and the ticket logs the channel. Without JS, or with reduced motion, the
   ticket shows all four and nothing moves. */
.sp-funnel{position:relative}
.sp-token{position:absolute;top:0;left:0;z-index:2;display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--navy);color:var(--mint);box-shadow:0 8px 18px rgba(2,6,23,.22);offset-rotate:0deg;opacity:0;pointer-events:none}
.sp-token .sp-icon{width:22px;height:22px;padding:0;border-radius:0;background:none}
.sp-channel-list li{transition:border-color .35s ease,box-shadow .35s ease}
.sp-channel-list .sp-icon{transition:background-color .35s ease,color .35s ease}
.sp-channel-list li.is-active{border-color:rgba(65,94,226,.55);box-shadow:0 16px 34px rgba(65,94,226,.14)}
.sp-channel-list li.is-active .sp-icon{background:var(--mint);color:var(--navy)}
.sp-one-log{display:grid;gap:8px;margin:8px 0 6px;padding:12px 0 0;border-top:1px solid rgba(255,255,255,.12);list-style:none;transition:opacity .4s ease}
.sp-one-log li{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.2;font-weight:700;letter-spacing:0;color:var(--white)}
.sp-one-log .sp-icon{width:16px;height:16px;padding:0;border-radius:0;background:none}
.sp-funnel.is-playing .sp-one-log li:not(.is-logged){display:none}
.sp-funnel.is-playing .sp-one-log:not(:has(.is-logged)){margin-block:0;padding-top:0;border-top-color:transparent}
.sp-funnel.is-clearing .sp-one-log{opacity:0}

/* People: one stop each on a track that fills in view */
.sp-people{background:var(--navy);color:#aeb9cb}
.sp-people h2,.sp-people h3{color:var(--white)}
.sp-people .sp-sub{color:#aeb9cb}
.sp-people .sp-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px 64px;align-items:end}
.sp-people .sp-head .sp-sub{margin-top:0}
.sp-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:32px;margin:72px 0 0;padding:0;list-style:none}
.sp-track li{position:relative;padding-top:30px}
.sp-track li::before,.sp-track li::after{content:"";position:absolute;left:0;right:-32px;top:0;height:3px;border-radius:3px}
.sp-track li:last-child::before,.sp-track li:last-child::after{right:0}
.sp-track li::before{background:rgba(255,255,255,.14)}
.sp-track li::after{background:linear-gradient(90deg,var(--indigo),var(--peri) 60%,var(--mint));transform-origin:0 50%;transition:transform .9s var(--ease-soft) calc(var(--i) * .45s)}
.js .sp-people:not(.is-in) .sp-track li::after{transform:scaleX(0)}
.sp-stop-n{font-size:14px;font-weight:700;color:var(--mint);letter-spacing:0}
.sp-track h3{margin-top:14px;font-size:22px;line-height:1.15}
.sp-track p{margin-top:12px;color:#aeb9cb;text-wrap:pretty}
.sp-people .link-row{margin-top:48px}
.sp-people .text-link{color:var(--mint);--rule:rgba(93,254,194,.36)}

/* Raise an issue */
.sp-raise{background:linear-gradient(180deg,#f4f5ff,var(--lav))}
.sp-raise-grid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:64px;align-items:center}
.sp-raise-copy h2{font-size:clamp(34px,3.3vw,46px);line-height:1}
.sp-raise-copy .sp-sub{font-size:18px}
.sp-steps{margin:30px 0 0;padding:0;list-style:none;counter-reset:sp-step}
.sp-steps li{position:relative;padding:16px 0 16px 46px;border-top:1px solid rgba(65,94,226,.22);color:var(--muted);counter-increment:sp-step}
.sp-steps li::before{content:counter(sp-step,decimal-leading-zero);position:absolute;left:0;top:18px;font-size:14px;font-weight:700;color:var(--indigo);letter-spacing:0}
.sp-steps h3{display:block;margin-bottom:4px;font-size:19px}
.sp-note{margin-top:18px;color:var(--muted);font-size:15px}
.sp-raise .device{--bz:clamp(6px,.72vw,10px)}

@media (max-width:1100px){
  .sp-funnel{grid-template-columns:1fr}
  .sp-channel-list li{margin-right:0}
  .sp-channel-list li::after,.sp-channel-list li::before{display:none}
  .sp-one{margin:12px 0 0;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
  .sp-one::before{display:none}
  .sp-one-log{flex-basis:100%;display:flex;flex-wrap:wrap;gap:8px 16px}
}
@media (max-width:900px){
  .sp-hero{padding:142px 0 72px}
  .sp-hero-grid,.sp-channels-grid,.sp-raise-grid{grid-template-columns:1fr;gap:44px}
  .sp-stage{flex-direction:column;align-items:center;padding-right:0}
  .sp-ticket{position:relative;right:auto;bottom:auto;width:min(300px,100%);margin-top:-64px}
  .sp-hero h1{font-size:clamp(40px,9cqw,64px)}
  .sp-people .sp-head{grid-template-columns:1fr}
  .sp-track{grid-template-columns:1fr 1fr;row-gap:44px}
  .sp-track li:nth-child(2n)::before,.sp-track li:nth-child(2n)::after{right:0}
}
@media (max-width:600px){
  .sp-hero{padding:118px 0 56px}
  .sp-hero h1{font-size:clamp(38px,11.4vw,52px)}
  .sp-hero h1 .t-line{display:inline}
  .sp-lead{font-size:18px}
  .sp-hero .solution-actions .button{flex:1 1 auto}
  .sp-phone{width:min(288px,86vw)}
  .wa{height:560px}
  .sp-head h2{font-size:clamp(34px,10vw,44px)}
  .sp-sub{font-size:18px}
  .sp-track{grid-template-columns:1fr;row-gap:0}
  .sp-track li{padding:0 0 32px 28px}
  .sp-track li::before,.sp-track li::after,.sp-track li:nth-child(2n)::before,.sp-track li:nth-child(2n)::after{left:0;right:auto;top:6px;bottom:0;width:3px;height:auto}
  .sp-track li::after{transform-origin:50% 0}
  .js .sp-people:not(.is-in) .sp-track li::after{transform:scaleY(0)}
  .sp-track h3{margin-top:8px}
}

@media (prefers-reduced-motion:reduce){
  .wa-typing i{animation:none}
  .sp-ticket,.sp-one,.sp-channel-list li,.sp-channel-list .sp-icon,.sp-track li::after,.sp-channel-list li::after,.sp-channel-list li::before,.sp-one::before{transition:none}
}
