/* pact-gateway.com's own layer over pact-web-kit: the light hero, the wire between two nodes, the
 * attacks it refuses, and the run section. Shared vocabulary (sections, .runs, .ticks, the product
 * window) is the kit's. Orange means "this was allowed" and nothing else. */

/* ---------------------------------------------------------------- hero */
.hero-g{padding:clamp(3.5rem,8vw,6.5rem) 0 0;position:relative;overflow:clip}
.hero-g::before{content:"";position:absolute;inset:0 0 auto;height:640px;z-index:-1;pointer-events:none;
  background:radial-gradient(55% 60% at 80% 0%,rgb(var(--glow-rgb) / .16),transparent 70%),linear-gradient(to bottom,var(--bg-2),var(--bg))}
.hero-g-top{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:clamp(1.5rem,5vw,4.5rem);align-items:end}
.hero-g h1{font-size:clamp(2.6rem,5.4vw,4.8rem);font-weight:700;letter-spacing:-.04em;line-height:.98;margin:0;max-width:13ch}
.oss{margin:0 0 1.2rem;font-size:.9rem;font-weight:500;color:var(--muted)}
.hero-g-copy .lede{margin-bottom:1.4rem;max-width:36rem}
.hero-g-copy .hero-actions{margin:0}
@media (max-width:900px){.hero-g-top{grid-template-columns:1fr;align-items:start}.hero-g h1{max-width:15ch}}

/* the inbox, arriving in order: the page's one orchestrated moment */
.shot-g{margin:clamp(2.5rem,5vw,3.5rem) auto 0;max-width:1120px}
.shot-g .av.me{background:var(--ink)}
@media (prefers-reduced-motion:no-preference){
  .shot-g .msg{animation:arrive .45s ease-out both}
  .shot-g .m1{animation-delay:.5s}.shot-g .m2{animation-delay:1.4s}.shot-g .m3{animation-delay:2.4s}
  .shot-g .m4{animation-delay:3.3s}.shot-g .m5{animation-delay:4.1s}
}
@keyframes arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* on a phone the permissions follow the thread instead of disappearing */
@media (max-width:900px){.shot-g .side{display:block;border-left:0;border-top:1px solid var(--line)}.shot-g .side .audit{display:none}}

/* ---------------------------------------------------------------- the wire between two nodes */
.wire{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr);align-items:end;gap:1rem;margin:2.2rem 0 1.8rem}
.wire-end{display:flex;flex-direction:column;align-items:stretch;text-align:center}
.wire-agent{font-weight:600;color:var(--ink);padding:.7rem 1rem;border:1px dashed var(--line-2);border-radius:12px;background:var(--bg)}
.wire-hop{font-family:var(--mono);font-size:.78rem;color:var(--muted);padding:.55rem 0;position:relative}
.wire-hop::before,.wire-hop::after{content:"";display:block;width:1px;height:.6rem;background:var(--line-2);margin:0 auto}
.wire-node{font-family:var(--display);font-weight:600;font-size:1.15rem;color:#fff;background:var(--ink);border-radius:14px;padding:1rem}
.wire-node small{display:block;font-family:var(--sans);font-weight:400;font-size:.8rem;color:var(--dark-muted);margin-top:.2rem}
.wire-link{display:flex;flex-direction:column;align-items:center;gap:.6rem;padding-bottom:1.6rem}
.wire-line{display:block;width:100%;height:3px;border-radius:3px;background:var(--accent)}
.wire-label{font-size:.9rem;font-weight:500;color:var(--accent-ink);text-align:center}
.wire-notes{display:grid;grid-template-columns:1fr 1fr;gap:clamp(1rem,4vw,3rem)}
.wire-notes p{color:var(--muted);margin:0;max-width:34rem}
@media (max-width:760px){
  .wire{grid-template-columns:1fr;gap:.4rem}
  .wire-link{padding:.4rem 0;flex-direction:row;justify-content:center}
  .wire-line{width:3px;height:2.2rem}
  .wire-notes{grid-template-columns:1fr}
}

/* ---------------------------------------------------------------- what it refuses */
.atk{display:grid;grid-template-columns:repeat(2,1fr);gap:clamp(1.5rem,4vw,3rem) clamp(1.5rem,5vw,4rem)}
.atk-group h3{font-size:1.2rem;display:flex;align-items:baseline;gap:.6rem;border-top:2px solid var(--ink);padding-top:1rem;margin-bottom:.6rem}
.atk-n{font-family:var(--sans);font-size:.85rem;font-weight:600;color:var(--muted)}
.atk-group ul{list-style:none;margin:0;padding:0}
.atk-group li{position:relative;padding:.45rem 0 .45rem 1.6rem;border-bottom:1px solid var(--line);color:var(--text);font-size:.97rem}
.atk-group li:last-child{border-bottom:0}
.atk-group li::before{content:"";position:absolute;left:0;top:.72em;width:.95rem;height:.95rem;border-radius:50%;background:var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%2315181E' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/62% no-repeat}
@media (max-width:760px){.atk{grid-template-columns:1fr}}

.two-col-g{display:grid;grid-template-columns:4fr 7fr;gap:clamp(1.5rem,5vw,4rem);align-items:start}
.two-col-g .sec-title{margin-bottom:.8rem}
@media (max-width:820px){.two-col-g{grid-template-columns:1fr}}
.tradeoffs{margin:0}
.tradeoffs div{border-top:1px solid var(--line-2);padding:1rem 0}
.tradeoffs dt{font-family:var(--display);font-weight:600;font-size:1.1rem;color:var(--ink);margin-bottom:.25rem}
.tradeoffs dd{margin:0;color:var(--muted);max-width:40rem}

/* ---------------------------------------------------------------- run it */
.term{margin:0 0 1.6rem;background:var(--ink);color:var(--dark-text);border-radius:14px;padding:1.2rem 1.35rem;overflow-x:auto;font-family:var(--mono);font-size:.88rem;line-height:1.7}
.term code{background:none;border:0;padding:0;color:inherit;font-size:1em}
.term .c{color:var(--dark-muted)}
.reach{width:100%;border-collapse:collapse;font-size:.95rem}
.reach th,.reach td{text-align:left;padding:.7rem .5rem;border-bottom:1px solid var(--line);vertical-align:top}
.reach th{font-weight:600;color:var(--ink);font-size:.9rem}
.reach td:first-child{color:var(--ink);font-weight:500;white-space:nowrap}
.reach code{white-space:nowrap}
@media (max-width:520px){.reach td:first-child{white-space:normal}}

/* ---------------------------------------------------------------- visuals */

/* your machine */
.machine{margin:0 0 1.6rem}
.machine svg{width:100%;height:auto;max-width:40rem;display:block}
.m-box{fill:var(--bg);stroke:var(--line-2);stroke-width:1.5;stroke-dasharray:6 5}
.m-cap{font:600 15px var(--display);fill:var(--ink)}
.m-node{fill:var(--ink)}
.m-node-t{font:600 17px var(--display);fill:#fff}
.m-store{fill:var(--bg-3);stroke:var(--line-2)}
.m-t{font:500 13px var(--sans);fill:var(--ink)}
.m-dest{fill:#fff;stroke:var(--ink);stroke-width:1.5}
.m-dest.dim{stroke:var(--line-2)}
.m-t.dim{fill:var(--faint)}
.m-out{stroke:var(--accent);stroke-width:3;fill:none}
.m-arrow{stroke:var(--accent);stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round}
.m-no{stroke:var(--line-2);stroke-width:2;fill:none;stroke-dasharray:5 5}
.m-x{stroke:#B3261E;stroke-width:3;stroke-linecap:round}
/* grid columns may shrink below their content (the terminal block scrolls instead of widening the page) */
.two-col-g>*,.hero-g-top>*,.atk>*,.wire>*{min-width:0}
.two-col-g .ticks li,.two-col-g p.muted{max-width:40rem}

/* ---------------------------------------------------------------- the bento of differences */
.bento{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.6rem}
.bx{margin:0;background:#fff;border:1px solid var(--line);border-radius:18px;padding:1.3rem;display:flex;flex-direction:column;gap:1.1rem}
.bx-wide{grid-column:span 2;flex-direction:row;align-items:center;gap:1.6rem}
.bx-wide>*{flex:1;min-width:0}
.bx figcaption h3{font-size:1.15rem;margin-bottom:.35rem}
.bx figcaption p{margin:0;color:var(--muted);font-size:.95rem;line-height:1.55}
@media (max-width:980px){.bento{grid-template-columns:repeat(2,1fr)}.bx-wide{grid-column:span 2}}
@media (max-width:640px){.bento{grid-template-columns:1fr}.bx-wide{grid-column:auto;flex-direction:column;align-items:stretch}}

/* what an edge sees */
.env{background:var(--ink);border-radius:14px;padding:1rem 1.1rem;font-size:.86rem}
.env-row{display:grid;grid-template-columns:4.2rem 1fr;gap:.6rem;padding:.42rem 0;border-bottom:1px solid rgb(255 255 255 / .07)}
.env-row:last-child{border-bottom:0}
.env-row span{color:var(--dark-muted)}
.env-row code{background:none;border:0;padding:0;font-size:.95em;color:var(--dark-text)}
.env-row.shut code{color:#555A64;letter-spacing:-.05em;overflow:hidden;white-space:nowrap}
.env-row.shut span::after{content:"";display:inline-block;width:10px;height:10px;margin-left:.4rem;vertical-align:-1px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.5' fill='none' stroke='%23FFA552' stroke-width='1.6'/%3E%3Cpath d='M5.5 7V5a2.5 2.5 0 0 1 5 0v2' fill='none' stroke='%23FFA552' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat}

/* the switchboard */
.sb{background:var(--bg-2);border:1px solid var(--line);border-radius:14px;padding:.8rem .9rem;font-size:.86rem}
.sb-who{font-weight:600;color:var(--ink);margin:.35rem 0 .2rem}
.sb-who:not(:first-child){margin-top:.8rem}
.sb-who small{font-weight:400;color:var(--muted);margin-left:.3rem}
.sb-row{display:flex;justify-content:space-between;align-items:center;padding:.32rem 0;color:var(--text)}
.sb-row .sw{width:26px;height:15px}.sb-row .sw::after{width:11px;height:11px}
.sb-hidden{font-size:.78rem;color:var(--faint);font-style:italic}

/* the chain */
.chain{width:100%;height:auto;display:block}
.c-root{fill:var(--ink)}
.c-leaf{fill:#fff;stroke:var(--ink);stroke-width:1.5}
.c-t{font:600 12.5px var(--sans);fill:var(--ink)}
.c-t.light{fill:#fff}
.c-s{font:400 11.5px var(--sans);fill:var(--muted)}
.c-s.strong{font-weight:600;fill:var(--accent-ink)}
.c-line,.c-head{stroke:var(--ink);stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.c-pin{stroke:var(--accent);stroke-width:2;fill:none;stroke-dasharray:4 4}

/* the ways in */
.ways{display:flex;flex-wrap:wrap;gap:.45rem}
.ways span{font-size:.84rem;font-weight:500;padding:.38rem .7rem;border-radius:999px;background:var(--bg-2);border:1px solid var(--line-2);color:var(--ink)}
.ways .no{color:var(--faint);text-decoration:line-through;background:transparent;border-style:dashed}

/* one binary */
.bin{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:.4rem 0}
.bin-box{font:600 1rem var(--display);color:#fff;background:var(--ink);border-radius:12px;padding:.8rem 1.4rem}
.bin-dbs{display:flex;align-items:center;gap:.5rem;font-size:.84rem}
.bin-dbs span{padding:.3rem .65rem;border-radius:8px;border:1px solid var(--line-2);color:var(--ink);background:var(--bg-2)}
.bin-dbs .or{border:0;background:none;color:var(--muted);padding:0}

/* the hash chain */
.hc{display:flex;align-items:center;justify-content:center;padding:.6rem 0}
.hc .blk{display:flex;flex-direction:column;align-items:center;gap:.1rem;font-size:.74rem;color:var(--muted);padding:.55rem .6rem;border-radius:10px;border:1px solid var(--line-2);background:var(--bg-2);min-width:3.8rem}
.hc .blk b{font-family:var(--mono);font-weight:500;font-size:.8rem;color:var(--ink)}
.hc .lnk{width:1.3rem;height:2px;background:var(--ink)}
.bx-row{grid-column:1/-1;flex-direction:row;align-items:center;gap:2rem}
.bx-row .hc{flex:0 0 auto}
.bx-row figcaption{max-width:40rem}
@media (max-width:640px){.bx-row{flex-direction:column;align-items:stretch}}

/* Motion (the kit's site.js adds .rv/.in as blocks scroll in; reduced motion stops all of it). The
   hero enters once, from CSS; the wire carries a message end to end; the chain draws and the pin
   marches; on the machine, data leaves only for approved contacts and a phone-home stops at the x.
   Travelling dots are transparent outside their keyframes, so a still page shows none. */
@media (prefers-reduced-motion:no-preference){
  .hero-g .oss,.hero-g h1,.hero-g-copy .lede,.hero-g-copy .waitlist,.hero-g-copy .fine{animation:rise .7s var(--ease-out) both}
  .hero-g h1{animation-delay:.07s}.hero-g-copy .lede{animation-delay:.16s}.hero-g-copy .waitlist{animation-delay:.24s}.hero-g-copy .fine{animation-delay:.3s}
  .shot-g .window{animation:rise 1s var(--ease-out) .3s both}
}
.wire-line{position:relative;transform-origin:left center}
.in .wire-line{animation:grow-x .8s var(--ease-out) .2s both}
.wire-line::after{content:"";position:absolute;top:50%;left:0;width:11px;height:11px;margin:-5.5px 0 0 -5.5px;border-radius:50%;background:var(--ink);box-shadow:0 0 0 3px #fff;opacity:0}
.in .wire-line::after{animation:wire-go 2.6s ease-in-out 1.1s infinite}
@keyframes wire-go{0%{left:0;opacity:0}10%{opacity:1}85%{left:100%;opacity:1}100%{left:100%;opacity:0}}
@media (max-width:900px){
  .wire-line{transform-origin:center top}
  .wire-line::after{top:0;left:50%}
  .in .wire-line::after{animation-name:wire-go-v}
}
@keyframes wire-go-v{0%{top:0;opacity:0}10%{opacity:1}85%{top:100%;opacity:1}100%{top:100%;opacity:0}}
.in .c-line,.in .c-head{stroke-dasharray:1;stroke-dashoffset:1;animation:draw .5s var(--ease-out) .3s forwards}
.in .c-head{animation-delay:.7s}
.in .c-pin{animation:march 1.2s linear 1s infinite}
@keyframes march{to{stroke-dashoffset:-16}}
.in .m-out{stroke-dasharray:1;stroke-dashoffset:1;animation:draw .7s var(--ease-out) .4s forwards}
.m-x{transform-box:fill-box;transform-origin:center}
.in .m-x{animation:pop .45s cubic-bezier(.3,1.3,.5,1) .8s both}
.m-pkt{fill:var(--accent);opacity:0}
.m-pkt.no{fill:#8A8D94}
.in .m-pkt{animation:m-out 2.8s ease-in-out 1.2s infinite}
.in .m-pkt.no{animation:m-no 2.8s ease-in-out 1.9s infinite}
@keyframes m-out{0%{opacity:0;transform:none}10%{opacity:1}80%{opacity:1;transform:translateX(104px)}90%,100%{opacity:0;transform:translateX(104px)}}
@keyframes m-no{0%{opacity:0;transform:none}10%{opacity:1}45%{opacity:1;transform:translateX(34px)}60%,100%{opacity:0;transform:translateX(38px)}}
