/* gateway.talivio.com additions on top of mosa-site.css (shared with mosa.talivio.com, keep that file identical).
   Gateway's own element: the cut-corner square gateway node the hop trail ends at. */

.gw-logo__sub { font: 600 12px/1 'JetBrains Mono', monospace; letter-spacing: .22em; color: var(--ms-blue-ink); margin-left: 2px; }
.gw-ext { width: 14px !important; height: 14px !important; opacity: .7; }
.gw-signin { font-size: 14.5px; font-weight: 600; color: var(--ms-ink-2); text-decoration: none; white-space: nowrap; }
.gw-signin:hover { color: var(--ms-ink); }
@media (max-width: 1279px) { .gw-signin { display: none; } }

/* hero: text left, scene right */
.gw-hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.gw-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.gw-hero .ms-h1 { font-size: clamp(44px, 6vw, 92px); }
.gw-scene { position: relative; display: grid; grid-template-columns: 0.62fr 0.18fr 1fr 0.18fr 0.5fr; align-items: center; min-height: 520px; }
.gw-scene__glow { position: absolute; inset: 10% 5% 10% 20%; background: radial-gradient(circle, var(--ms-glow), transparent 65%); pointer-events: none; }
.gw-scene__small { display: grid; gap: 16px; position: relative; }
.gw-scene__small .ms-phone { max-width: 150px; padding: 6px; border-radius: 22px; }
.gw-scene__small .ms-phone__scr { border-radius: 17px; font-size: 8px; }
.gw-scene__main { position: relative; }
.gw-scene__main .ms-phone { max-width: 270px; }
.gw-link { position: relative; height: 2px; border-top: 2px dashed var(--ms-blue); }
.gw-link__lbl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 11px/1 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ms-ink-2); }
.gw-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gw-node__sq { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; background: var(--ms-bg-3); color: var(--ms-blue-ink); box-shadow: inset 0 0 0 2px var(--ms-blue); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.gw-node__sq .ms-i { width: 38px; height: 38px; }
.gw-node__host { font: 500 11.5px/1.3 'JetBrains Mono', monospace; color: var(--ms-ink-2); text-align: center; }
.gw-live { display: inline-flex; align-items: center; gap: 8px; font: 700 11.5px/1 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ms-green); }
.gw-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ms-green); box-shadow: 0 0 0 4px var(--ms-green-bg); }
.gw-node .gw-live { position: absolute; top: -34px; }
.gw-qr { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--ms-card); padding: 26px 28px; margin: 24px 0 0 auto; max-width: 520px; }
.gw-qr h2 { font: 800 26px/1.15 Outfit, sans-serif; margin: 0 0 8px; color: var(--ms-ink); }
.gw-qr p { margin: 0; color: var(--ms-ink-2); }
.gw-qr__code { flex: none; width: 132px; height: 132px; background: #fff; padding: 8px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.gw-qr__code img { width: 100%; height: auto; image-rendering: pixelated; }
@media (max-width: 1100px) {
    .gw-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .gw-scene { min-height: 0; margin-top: 16px; }
}
@media (max-width: 680px) {
    .gw-scene { grid-template-columns: 1fr 0.25fr 0.8fr; row-gap: 40px; }
    .gw-scene__small { display: none; }
    .gw-scene > .gw-link:first-of-type { display: none; }
    .gw-scene__main .ms-phone { max-width: 220px; }
    .gw-node__sq { width: 64px; height: 64px; }
    .gw-qr { flex-direction: column; align-items: flex-start; }
}

/* phone screen: Internet Gateway card (big phone) */
.gw-igw { margin: 14px 12px; background: #182131; padding: 14px; border-radius: 6px; }
.gw-igw__row { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #e5e7eb; }
.gw-igw__row .ms-sw { margin-left: auto; }
.gw-igw__row .ms-i { width: 18px; height: 18px; color: #9ca3af; }
.gw-igw__left { margin-top: 12px; font: 600 13px/1 'JetBrains Mono', monospace; letter-spacing: .08em; color: #e5e7eb; }
.gw-igw__sub { margin-top: 4px; font-size: 11px; color: #9ca3af; }

/* privacy band (deepest tone) */
.gw-band { background: #07090d; color: #f3f4f6; }
[data-theme="light"] .gw-band { background: #0f1520; }
.gw-band .ms-h2, .gw-band .ms-eyebrow { color: #f3f4f6; }
.gw-sees { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.gw-col { background: #121a27; padding: 22px 24px; }
.gw-col h3 { margin: 0 0 10px; font: 700 16px/1.3 Outfit, sans-serif; color: #f3f4f6; }
.gw-col ul { margin: 0; padding: 0; list-style: none; }
.gw-col li { padding: 10px 0; color: #c9d1dc; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07); font-size: 15.5px; }
.gw-col li:last-child { box-shadow: none; }
.gw-col--no h3 { color: #4ade80; }
.gw-relay { background: #141d2b; }
.gw-relay .ms-kv dd { color: #f3f4f6; }
.gw-relay .ms-kv dt { color: #9ca3af; }
.gw-bar { display: inline-block; width: 120px; height: 10px; margin-right: 8px; vertical-align: middle; background: repeating-linear-gradient(90deg, #6aaef0 0 6px, transparent 6px 8px); }
.gw-amber { margin-top: 22px; padding: 14px 18px; border-left: 3px solid #fbbf24; background: rgba(245, 158, 11, .08); color: #e5e7eb; font-size: 15.5px; }
@media (max-width: 1080px) { .gw-sees { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gw-relay { grid-column: 1 / -1; } }
@media (max-width: 560px) { .gw-sees { grid-template-columns: minmax(0, 1fr); } }

/* bridge rows */
.gw-bridges { display: grid; gap: 12px; }
.gw-bridge { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 22px; align-items: center; background: var(--ms-bg-3); padding: 20px 26px; text-decoration: none; color: inherit; }
a.gw-bridge:hover { background: var(--ms-card-2); }
.gw-bridge__ini { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--ms-btn); color: #fff; font: 700 20px/1 'JetBrains Mono', monospace; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.gw-bridge h2 { margin: 0 0 4px; font: 700 21px/1.2 Outfit, sans-serif; color: var(--ms-ink); }
.gw-bridge p { margin: 0; color: var(--ms-ink-2); font-size: 15.5px; }
@media (max-width: 640px) { .gw-bridge { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; } .gw-bridge > :last-child { grid-column: 2; } }

/* two big routes (developers / self-host) */
.gw-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.gw-two > div { background: var(--ms-bg-3); padding: 36px; min-width: 0; }
.gw-two h2 { margin: 0 0 12px; }
.gw-two p { color: var(--ms-ink-2); margin: 0; }
.gw-code { margin-top: 26px; background: #0a0f17; color: #c9d1dc; font: 500 13px/1.6 'JetBrains Mono', monospace; overflow-x: auto; }
.gw-code__bar { display: flex; gap: 5px; padding: 10px 14px; background: #141d2b; }
.gw-code__bar i { width: 8px; height: 8px; background: rgba(255, 255, 255, .5); display: block; }
.gw-code pre { margin: 0; padding: 16px 18px; white-space: pre; }
.gw-code .k { color: #6aaef0; }
.gw-code .s { color: #4ade80; }
.gw-own { display: flex; align-items: center; gap: 0; margin-top: 30px; }
.gw-own .gw-link { flex: 1; }
.gw-own__phone { width: 44px; height: 76px; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--ms-ink-2); flex: none; }
@media (max-width: 960px) { .gw-two { grid-template-columns: minmax(0, 1fr); } .gw-two > div { padding: 28px 22px; } }

/* endpoint table (self-host) */
.gw-api td:first-child { width: 72px; }
.gw-api code { font: 500 14px/1.4 'JetBrains Mono', monospace; color: var(--ms-ink); overflow-wrap: anywhere; }
.gw-verb { font: 700 11.5px/1 'JetBrains Mono', monospace; letter-spacing: .08em; padding: 5px 8px; background: rgba(59, 143, 224, .14); color: var(--ms-blue-ink); }
@media (max-width: 760px) { .gw-api tr { display: grid; grid-template-columns: auto minmax(0, 1fr); } .gw-api td:last-child { grid-column: 1 / -1; padding-top: 0; } }

/* auth: split layout */
.gw-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 72px); }
.gw-auth__side { background: var(--ms-bg-2); padding: 72px 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.gw-auth__side .ms-h2 { font-size: clamp(32px, 3.4vw, 52px); }
.gw-auth__main { padding: 72px 64px; display: flex; flex-direction: column; justify-content: center; }
.gw-auth__box { width: 100%; max-width: 440px; margin: 0 auto; }
.gw-auth__box h1 { font: 800 clamp(30px, 3vw, 40px)/1.1 Outfit, sans-serif; color: var(--ms-ink); margin: 0 0 8px; }
.gw-auth__box > p { color: var(--ms-ink-2); margin: 0 0 28px; }
.gw-field { display: block; margin-bottom: 18px; }
.gw-field span { display: block; font: 600 12px/1 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ms-ink-2); margin-bottom: 8px; }
.gw-field input, .gw-field textarea, .gw-field select { width: 100%; box-sizing: border-box; padding: 13px 14px; background: var(--ms-bg-3); color: var(--ms-ink); border: 0; box-shadow: inset 0 0 0 1px var(--ms-faint); font: 400 16px/1.4 Inter, sans-serif; }
.gw-field input:focus, .gw-field textarea:focus, .gw-field select:focus { outline: 2px solid var(--ms-blue); outline-offset: 0; }
.gw-auth .ms-btn { width: 100%; justify-content: center; }
.gw-auth__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 14.5px; }
.gw-auth__links a { color: var(--ms-blue-ink); }
.gw-alert { padding: 12px 16px; margin-bottom: 18px; font-size: 15px; background: var(--ms-amber-bg); color: var(--ms-ink); }
.gw-alert--ok { background: var(--ms-green-bg); }
@media (max-width: 960px) {
    .gw-auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .gw-auth__side { padding: 40px 22px; }
    .gw-auth__main { padding: 40px 22px 72px; }
}

/* tuning against the approved mockup (07.11) */
.gw-scene { grid-template-columns: 0.5fr 0.32fr 0.95fr 0.32fr 0.5fr; }
.gw-scene__small .ms-phone { max-width: 132px; }
.gw-link__lbl { white-space: normal; width: 104px; text-align: center; line-height: 1.45; font-size: 10.5px; }
.gw-scene__main, .gw-scene__small { z-index: 1; }
.gw-signin-form { display: contents; } button.gw-signin { background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
/* phones: the GATEWAY word makes the logo wider than MOSA's, so "Get MOSA" moves into the menu drawer */
@media (max-width: 480px) { .ms-hdr .ms-tools > .ms-btn { display: none; } }
@media (max-width: 480px) {
    .ms-hdr__in { gap: 12px; }
    .ms-hdr .ms-logo { gap: 8px; }
    .ms-hdr .ms-logo__word { font-size: 25px; }
    .gw-logo__sub { font-size: 10px; letter-spacing: .14em; }
}
@media (max-width: 480px) { .ms-hdr .ms-menu .ms-ctl > svg:last-child { display: none; } .ms-hdr .ms-menu .ms-ctl { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 680px) { .gw-scene > .gw-scene__small + .gw-link { display: none; } .gw-scene .gw-link__lbl { display: none; } .gw-scene { grid-template-columns: 1fr 0.3fr 0.7fr; } }

/* --- hero phones at real proportions (07.11, Eren): the two mesh phones were squeezed into 132 px boxes while their
   text kept full size. Now they are full app screens (same phone as the main one) scaled as a whole with `zoom`,
   slightly overlapped, so the scene reads as three real phones with depth. --- */
.gw-scene { grid-template-columns: 0.9fr 0.28fr 1fr 0.28fr 0.45fr; }
.gw-scene__small { display: block; position: relative; height: 430px; }
.gw-scene__small .gw-mini { position: absolute; width: 300px; max-width: none; padding: 10px; border-radius: 38px; zoom: .6; }
.gw-scene__small .gw-mini .ms-phone__scr { border-radius: 29px; font-size: 13.5px; }
.gw-scene__small .gw-mini--a { left: 0; top: 0; z-index: 2; }
.gw-scene__small .gw-mini--b { left: 90px; top: 170px; z-index: 1; filter: brightness(.82); }
.gw-scene__main .ms-phone { max-width: 270px; }
@media (max-width: 1280px) { .gw-scene__small .gw-mini { zoom: .52; } .gw-scene__small { height: 380px; } }
/* spacing so the hop labels and the second mesh phone stay visible */
.gw-scene { grid-template-columns: 0.92fr 0.36fr 0.95fr 0.36fr 0.45fr; }
.gw-scene__small .gw-mini { zoom: .55; }
.gw-scene__small .gw-mini--b { left: 46px; top: 230px; }
.gw-scene__small { height: 470px; }
.gw-link { z-index: 3; }
.gw-link__lbl { width: 86px; }
@media (max-width: 1280px) { .gw-scene__small .gw-mini { zoom: .48; } .gw-scene__small { height: 420px; } }
.gw-scene .gw-link__lbl { background: var(--ms-bg); padding: 3px 4px; }
