/* =========================================================
   PAYMENT GATEWAY PAGE — architecture, flows, status, zones
   ========================================================= */

/* ---------- Device trio hero panel ---------- */
.trio {
    position: relative; border-radius: 20px; overflow: hidden; isolation: isolate;
    height: 620px;
    background: radial-gradient(90% 90% at 50% 20%, #1B4A73 0%, #0F2236 55%, #0B1624 100%);
}
.trio::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.2px); background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent); mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}
.trio img { position: absolute; filter: drop-shadow(0 40px 50px rgba(0,0,0,.5)); }
.trio .tr-laptop { left: 50%; top: 70px; width: 600px; margin-left: -300px; animation: productFloat 7s ease-in-out infinite; }
.trio .tr-pos { left: 7%; top: 170px; width: 220px; animation: productFloat 6s ease-in-out -2s infinite; }
.trio .tr-phone { right: 8%; top: 120px; width: 230px; animation: productFloat 6.5s ease-in-out -4s infinite; }
.trio .chips { top: 24px; left: 24px; }
.trio .chips .chip { opacity: 1; transform: none; }
.trio-label { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.8); }
@media (max-width: 991.98px) {
    .trio { height: 520px; }
    .trio .tr-laptop { width: 440px; margin-left: -220px; top: 110px; }
    .trio .tr-pos { width: 150px; left: 3%; top: 230px; }
    .trio .tr-phone { width: 160px; right: 3%; top: 190px; }
}
@media (max-width: 640px) {
    .trio { height: 440px; }
    .trio .tr-laptop { width: 300px; margin-left: -150px; top: 150px; }
    .trio .tr-pos { width: 110px; left: -4px; top: 250px; }
    .trio .tr-phone { width: 120px; right: -4px; top: 220px; }
    .trio .chips .chip:nth-child(n+2) { display: none; }
}

/* ---------- Architecture diagram ---------- */
.arch {
    position: relative; background: var(--cream); border-radius: 20px; padding: 40px 32px 32px;
}
.arch-cols { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr .9fr 1.1fr 1.15fr; gap: 64px; align-items: center; }
.arch-col h4 { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 14px; }
.arch-col .stack { display: grid; gap: 12px; }
.anode {
    position: relative; display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 1px 0 rgba(23,44,69,.04), 0 10px 24px -16px rgba(23,44,69,.35);
    border: 1px solid var(--line);
    transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s;
}
.anode .material-symbols-outlined { width: 38px; height: 38px; border-radius: 11px; background: var(--cream); color: var(--orange); font-size: 19px; }
.anode b { display: block; font-size: 14.5px; font-weight: 500; letter-spacing: -.01em; }
.anode small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.anode.core { background: var(--ink); color: #fff; border-color: var(--ink); }
.anode.core .material-symbols-outlined { background: rgba(255,255,255,.1); color: #BEF1DE; }
.anode.core small { color: rgba(255,255,255,.65); }
.anode.ext { background: #fff; border-style: dashed; }
.anode.lit { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(31,102,148,.12), 0 10px 24px -16px rgba(23,44,69,.35); transform: translateY(-2px); }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.arch-svg .wire { fill: none; stroke: rgba(31,102,148,.28); stroke-width: 1.5; }
.arch-svg .pkt { fill: var(--orange); }
.arch-data {
    position: relative; z-index: 1; margin-top: 28px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
    padding: 14px; border-radius: 14px; border: 1px dashed rgba(31,102,148,.35); background: rgba(255,255,255,.55);
}
.arch-data span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.arch-data .material-symbols-outlined { color: var(--green); font-size: 18px; }
.arch-data em { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 1100px) { .arch-cols { gap: 40px; } }
@media (max-width: 991.98px) {
    .arch { padding: 28px 20px; }
    .arch-cols { grid-template-columns: 1fr; gap: 28px; }
    .arch-svg { display: none; }
    .arch-col .stack { grid-template-columns: 1fr 1fr; }
    .arch-col + .arch-col::before {
        content: ""; display: block; width: 2px; height: 22px; margin: -22px auto 10px; background: repeating-linear-gradient(to bottom, var(--orange) 0 4px, transparent 4px 8px);
    }
}
@media (max-width: 640px) { .arch-col .stack { grid-template-columns: 1fr; } }

/* ---------- Sequence (process flow) ---------- */
.seq { --lanes: 4; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: relative; }
.seq-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.seq-top .seg { margin: 0; }
.seq-replay { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--orange); }
.seq-replay .material-symbols-outlined { font-size: 18px; }
.seq-lanes, .seq-row { display: grid; grid-template-columns: repeat(var(--lanes), 1fr); }
.seq-lanes { position: sticky; top: 0; }
.seq-lane {
    text-align: center; padding: 12px 8px; margin: 0 8px; border-radius: 12px; background: var(--cream);
    font-size: 14px; font-weight: 500;
}
.seq-lane small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.seq-lane.gw { background: var(--ink); color: #fff; }
.seq-lane.gw small { color: rgba(255,255,255,.6); }
.seq-body { position: relative; margin-top: 8px; padding-bottom: 8px; }
.seq-body::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(to right, transparent calc(50% / var(--lanes) - .5px), var(--line) calc(50% / var(--lanes) - .5px), var(--line) calc(50% / var(--lanes) + .5px), transparent calc(50% / var(--lanes) + .5px));
    background-size: calc(100% / var(--lanes)) 100%;
}
.seq-row { position: relative; height: 54px; }
.seq-row[hidden] { display: none; }
.seq-arrow {
    position: relative; align-self: center; height: 2px; margin: 0 calc(50% / 1 * 0);
    opacity: 0; transition: opacity .4s ease;
}
.seq-arrow .line {
    position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink);
    transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.seq-arrow.back .line { transform-origin: right; background: repeating-linear-gradient(to right, var(--orange) 0 6px, transparent 6px 11px); }
.seq-arrow .line::after {
    content: ""; position: absolute; right: -1px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--ink); border-right: 0;
}
.seq-arrow.back .line::after { right: auto; left: -1px; border-left: 0; border-right: 9px solid var(--orange); }
.seq-arrow .lbl {
    position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap;
    font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 0 6px;
}
.seq-arrow .num {
    width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
    display: grid; place-items: center; flex-shrink: 0;
}
.seq-arrow.back .num { background: var(--orange); }
.seq-row.on .seq-arrow { opacity: 1; }
.seq-row.on .seq-arrow .line { transform: scaleX(1); }
.seq-row.ok .num { background: var(--green); }
.seq-row.ok .line { background: repeating-linear-gradient(to right, var(--green) 0 6px, transparent 6px 11px); }
.seq-row.ok .line::after { border-right-color: var(--green); }
.seq-row.bad .num { background: #B42318; }
.seq-row.bad .line { background: repeating-linear-gradient(to right, #B42318 0 6px, transparent 6px 11px); }
.seq-row.bad .line::after { border-right-color: #B42318; }
.seq-note { position: absolute; z-index: 1; align-self: center; justify-self: center; font-size: 12.5px; padding: 7px 12px; border-radius: 10px; background: var(--amber-tint); color: #7A5402; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.seq-row.on .seq-note { opacity: 1; }
.seq-meta { display: none; }
.seq-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.seq-foot .material-symbols-outlined { color: var(--orange); font-size: 18px; margin-top: 1px; }
@media (max-width: 860px) {
    .seq { padding: 18px; }
    .seq-lanes, .seq-body::before { display: none; }
    .seq-row { display: block; height: auto; margin-bottom: 8px; opacity: .25; transition: opacity .4s; }
    .seq-row.on { opacity: 1; }
    .seq-arrow { display: none; }
    .seq-note { position: static; display: block; white-space: normal; opacity: 1; }
    .seq-meta { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--cream); }
    .seq-meta .num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
    .seq-row.ok .seq-meta .num { background: var(--green); } .seq-row.bad .seq-meta .num { background: #B42318; }
    .seq-meta b { display: block; font-size: 14.5px; font-weight: 500; }
    .seq-meta small { font-size: 12.5px; color: var(--muted); }
}

/* ---------- Status model ---------- */
.states { background: var(--cream); border-radius: 20px; padding: 36px 32px; }
.states-main { display: flex; align-items: center; justify-content: space-between; gap: 0; }
.st {
    position: relative; z-index: 1; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; width: 120px;
}
.st i {
    width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--line);
    display: grid; place-items: center; transition: all .4s var(--ease);
}
.st .material-symbols-outlined { color: var(--grey); font-size: 22px; transition: color .3s; }
.st b { font-size: 14px; font-weight: 500; }
.st small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.st.on i { background: var(--ink); border-color: var(--ink); transform: scale(1.08); box-shadow: 0 0 0 6px rgba(23,44,69,.08); }
.st.on .material-symbols-outlined { color: #BEF1DE; }
.st.done i { border-color: var(--green); }
.st.done .material-symbols-outlined { color: var(--green); }
.st-link { flex: 1; height: 2px; background: var(--line); position: relative; margin-top: -48px; overflow: hidden; border-radius: 2px; }
.st-link::after { content: ""; position: absolute; inset: 0; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.st-link.done::after { transform: scaleX(1); }
.states-alt { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 30px; padding-top: 24px; border-top: 1px dashed rgba(23,44,69,.15); }
.states-alt span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; }
.states-alt span i { width: 8px; height: 8px; border-radius: 50%; }
.states-alt .r i { background: #B42318; } .states-alt .a i { background: #D99A0B; } .states-alt .g i { background: var(--grey); }
@media (max-width: 860px) {
    .states { padding: 24px 18px; }
    .states-main { flex-direction: column; align-items: stretch; gap: 0; }
    .st { flex-direction: row; width: auto; text-align: left; gap: 14px; }
    .st > span { display: block; }
    .st-link { width: 2px; height: 22px; flex: none; margin: 4px 0 4px 25px; }
    .st-link::after { transform: scaleY(0); transform-origin: top; }
    .st-link.done::after { transform: scaleY(1); }
}

/* ---------- Security zones stack ---------- */
.zones { position: relative; display: grid; gap: 0; padding: 8px 0; }
.zone {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px;
    background: #fff; border: 1px solid var(--line); z-index: 1;
}
.zone .tag { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.zone b { display: block; font-size: 15px; font-weight: 500; }
.zone small { display: block; font-size: 12.5px; color: var(--muted); }
.zone.dmz { background: #EAF3FA; border-color: rgba(31,102,148,.3); }
.zone.app { background: var(--ink); color: #fff; border-color: var(--ink); }
.zone.app small { color: rgba(255,255,255,.65); }
.zone.app .tag { background: #BEF1DE; color: var(--ink); }
.zone-gap { position: relative; height: 34px; display: flex; align-items: center; justify-content: center; }
.zone-gap::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; border-top: 1.5px dashed rgba(180,35,24,.45); }
.zone-gap span {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    background: #fff; border: 1px solid rgba(180,35,24,.3); color: #B42318; font-size: 11.5px; font-family: var(--mono); letter-spacing: .04em;
}
.zone-gap .material-symbols-outlined { font-size: 13px; }
.zones .packet {
    position: absolute; z-index: 2; right: 26px; top: 20px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--orange); box-shadow: 0 0 0 5px rgba(31,102,148,.18);
    animation: packetDown 6s cubic-bezier(.6,0,.4,1) infinite;
}
@keyframes packetDown {
    0% { transform: translateY(0); opacity: 0; } 6% { opacity: 1; }
    90% { opacity: 1; } 100% { transform: translateY(var(--drop, 420px)); opacity: 0; }
}

.st > span { display: block; }
.st small { display: block; margin-top: 2px; }

.seq-body::before { background-image: linear-gradient(to right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)); }
.states-main { align-items: flex-start; }
.st-link { margin-top: 26px; }
@media (max-width: 860px) { .st-link { margin-top: 4px; } }

.trio .tr-pos { top: 250px; }
@media (max-width: 991.98px) { .trio .tr-pos { top: 250px; } }
@media (max-width: 640px) { .trio .tr-pos { top: 250px; } }
@media (max-width: 640px) { .trio-label { display: none; } .trio .tr-laptop { top: 120px; } .trio .tr-pos { top: 215px; } .trio .tr-phone { top: 175px; } }

/* ===== Mobile: payment gateway motion sections ===== */
@media (max-width: 640px) {
    /* device trio: laptop centered, POS + phone in front */
    .trio { height: 380px; }
    .trio .tr-laptop { left: 50%; width: 92%; margin-left: -46%; top: 64px; }
    .trio .tr-pos { width: 84px; left: 10px; top: auto; bottom: 22px; }
    .trio .tr-phone { width: 104px; right: 10px; top: auto; bottom: 14px; }
    .trio .chips { left: 14px; top: 14px; right: 14px; }

    /* architecture: compact cards + animated flow connectors */
    .arch { padding: 20px 14px; }
    .arch-cols { gap: 34px; }
    .arch-col h4 { text-align: center; margin-bottom: 10px; }
    .arch-col .stack { grid-template-columns: 1fr 1fr; gap: 8px; }
    .arch-col:first-child .stack { grid-template-columns: repeat(3, 1fr); }
    .arch-col:nth-child(2) .stack { grid-template-columns: 1fr; }
    .anode { flex-direction: column; text-align: center; gap: 8px; padding: 12px 8px; }
    .anode .material-symbols-outlined { width: 34px; height: 34px; }
    .anode b { font-size: 13px; line-height: 1.25; }
    .anode small { display: none; }
    .arch-col:nth-child(2) .anode { flex-direction: row; text-align: left; padding: 14px; }
    .arch-col:nth-child(2) .anode small { display: block; }
    .arch-col + .arch-col::before {
        width: 2px; height: 26px; margin: -30px auto 8px; position: relative;
        background: repeating-linear-gradient(to bottom, rgba(31,102,148,.45) 0 4px, transparent 4px 8px);
        background-size: 2px 8px; animation: wireFlow .6s linear infinite;
    }
    .arch-col + .arch-col::after {
        content: ""; position: absolute; left: 50%; width: 9px; height: 9px; margin: -40px 0 0 -4.5px; border-radius: 50%;
        background: var(--orange); box-shadow: 0 0 0 4px rgba(31,102,148,.18);
        animation: dotDrop 1.6s cubic-bezier(.5,0,.5,1) infinite;
    }
    .arch-col { position: relative; }
    .arch-data { flex-direction: column; gap: 8px; margin-top: 22px; }

    /* sequences: no duplicated notes, highlight the newest step */
    .seq-note { display: none !important; }
    .seq-row.on .seq-meta { box-shadow: inset 3px 0 0 var(--orange); }
    .seq-row.ok.on .seq-meta { box-shadow: inset 3px 0 0 var(--green); }
    .seq-row.bad.on .seq-meta { box-shadow: inset 3px 0 0 #B42318; }
    .seq-row { transform: translateX(-6px); transition: opacity .4s, transform .5s var(--ease); }
    .seq-row.on { transform: none; }

    /* status model */
    .states { padding: 20px 16px; }
    .states-alt span { height: auto; padding: 8px 12px; font-size: 12.5px; }
}
@keyframes wireFlow { to { background-position: 0 8px; } }
@keyframes dotDrop { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }

/* ---------- SEO rewrite: keyword kicker, trust line, notes, comparison table ---------- */
.pg-note { margin-top: 28px; max-width: 760px; color: var(--grey); font-size: 15px; line-height: 1.6; }
.pg-note a, .section-head .lead a, .split-text .lead a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.pg-compare .panel-inner { overflow-x: auto; }
.pg-compare .ptable { min-width: 640px; }
.pg-compare .ptable td:first-child { color: var(--grey); white-space: nowrap; }
.pg-compare .ptable td:last-child { font-weight: 500; }
.pg-compare { margin-top: 0; } .pg-compare .panel-inner { min-height: 0; }
