/* ==========================================================
   Gateway (index.html) — the first screen is split in two halves:
   "Individual customers" and "Corporate clients".
   Uses the tokens and shared pieces from style.css.
   ========================================================== */

body.page-gw { background: var(--g950); color: #fff; }

/* ---------- top bar (logo + language) ---------- */
.gw-top {
  position: absolute; z-index: 30; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 3vw, 44px); pointer-events: none;
}
.gw-top::before {
  content: ""; position: absolute; inset: 0 0 -46px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 13, 3, .82), transparent);
}
.gw-top > * { pointer-events: auto; }
.gw-prompt {
  position: absolute; inset-inline: 0; top: 30px; margin: 0; text-align: center; pointer-events: none;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--g200);
}
html:lang(ar) .gw-prompt { letter-spacing: 0; text-transform: none; font-size: 1.05rem; }

/* ---------- the two halves ---------- */
.gw { position: relative; display: flex; min-height: 100vh; min-height: 100svh; }
.gw-panel {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; color: #fff;
  transition: opacity .7s ease, filter .7s ease; animation: gwIn .9s cubic-bezier(.2, .7, .2, 1) backwards;   /* "backwards": the entrance must not freeze opacity/transform afterwards */
}
.gw-panel + .gw-panel { animation-delay: .12s; }
@keyframes gwIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.gw-bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), filter .6s;
}
.gw-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; transition: opacity .5s;
  background:
    linear-gradient(0deg, rgba(20, 13, 3, .94) 0%, rgba(20, 13, 3, .62) 38%, rgba(20, 13, 3, .26) 100%),
    linear-gradient(180deg, rgba(20, 13, 3, .55), transparent 28%);
}
.gw-panel:hover .gw-bg, .gw-panel:focus-visible .gw-bg { transform: scale(1.08); }
.gw-panel:hover::before, .gw-panel:focus-visible::before { opacity: .86; }
.gw-panel:focus-visible { outline-offset: -6px; }
.gw-panel + .gw-panel { box-shadow: inset 1px 0 0 rgba(217, 190, 116, .35); }
[dir="rtl"] .gw-panel + .gw-panel { box-shadow: inset -1px 0 0 rgba(217, 190, 116, .35); }

.gw-body { width: 100%; max-width: 660px; padding: clamp(28px, 5vw, 76px); padding-block-end: clamp(78px, 12vh, 124px); }
.gw-co .gw-body { padding-inline-start: calc(clamp(28px, 5vw, 76px) + clamp(44px, 4.8vw, 70px)); }   /* clear of the logo coin on the seam */
.gw-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.2rem;
  background: var(--g400); color: var(--g950); box-shadow: 0 10px 30px -10px rgba(194, 154, 58, .7);
}
.gw-icon svg { width: 28px; height: 28px; }
.gw-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.5rem, 5.4vw, 4.8rem); line-height: 1.08; margin: 0 0 .3em; color: #fff; letter-spacing: -.01em; }
html:lang(ar) .gw-title { line-height: 1.3; letter-spacing: 0; }
.gw-sub { font-size: clamp(1rem, 1.45vw, 1.2rem); color: var(--g200); max-width: 36ch; margin: 0 0 1.3rem; }
.gw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.6rem; }
.gw-chips span {
  padding: .3em .95em; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--g100);
  background: rgba(246, 238, 218, .13); border: 1px solid rgba(217, 190, 116, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.gw-cta {
  display: inline-flex; align-items: center; gap: .7em; padding: .9em 1.8em; border-radius: 999px; font-weight: 700; font-size: 1rem;
  background: var(--g400); color: var(--g950); box-shadow: 0 12px 30px -12px rgba(194, 154, 58, .8); transition: gap .3s, background .3s, transform .3s;
}
.gw-panel:hover .gw-cta, .gw-panel:focus-visible .gw-cta { gap: 1.1em; background: var(--g300); transform: translateY(-2px); }

/* logo coin sitting on the seam between the two halves */
.gw-seam {
  position: absolute; z-index: 25; left: 50%; top: 50%; width: clamp(92px, 9.5vw, 136px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--g50); padding: 6px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--g500), 0 22px 60px rgba(0, 0, 0, .55); transition: opacity .35s, transform .6s;
}
.gw-seam img { width: 100%; height: 100%; object-fit: contain; }

.gw-foot {
  position: absolute; z-index: 30; inset-inline: 0; bottom: 0; padding: 26px 16px 14px; text-align: center; pointer-events: none;
  font-size: .82rem; letter-spacing: .04em; color: var(--g300); background: linear-gradient(0deg, rgba(20, 13, 3, .75), transparent);
}

/* ---------- leaving: only transform / opacity / clip-path move, so it stays smooth ----------
   1. text, logo coin and top bar fade away, the chosen photo drifts closer, the other half dims
   2. a circle in the destination page's own colour grows from the "Enter" button until it fills the screen
      (the page then opens with a cover of the same colour that dissolves — see style.css)
   The timing lives in gateway.js. */
.gw-curtain { position: fixed; inset: 0; z-index: 60; pointer-events: none; visibility: hidden; background: #1c1304; clip-path: circle(0 at 50% 50%); }
.gw-curtain.light { background: #fbf7ec; }      /* same colours as html[data-enter] in style.css */
.gw-curtain.dark  { background: #1c1304; }
.gw-top, .gw-foot { transition: opacity .4s ease; }
.gw-body, .gw-cta { transition: opacity .4s ease, transform .6s cubic-bezier(.2, .7, .2, 1), gap .3s, background .3s; }
.gw-leaving .gw-top, .gw-leaving .gw-foot { opacity: 0; }
.gw.leaving .gw-body { opacity: 0; transform: translateY(-16px); }
.gw.leaving .gw-panel.chosen .gw-cta { transform: scale(.94); }
.gw.leaving .gw-seam { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.gw.leaving .gw-panel { pointer-events: none; }
.gw.leaving .gw-panel:not(.chosen) { opacity: .4; filter: saturate(.5); }
.gw.leaving .gw-panel.chosen .gw-bg { transform: scale(1.16); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }

/* ---------- phones: the halves stack ---------- */
@media (max-width: 1000px) {
  .gw-prompt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* kept for screen readers */
}
@media (max-width: 800px) {
  .gw { flex-direction: column; }
  .gw-panel { flex: 1 1 50%; min-height: 50vh; min-height: 50svh; box-shadow: none !important; }
  .gw-panel + .gw-panel { border-top: 1px solid rgba(217, 190, 116, .4); }
  .gw-body, .gw-co .gw-body { max-width: none; padding: 24px 22px; padding-block-end: 34px; }
  .gw-panel.gw-ind .gw-body { padding-block-start: 96px; }
  .gw-icon { width: 46px; height: 46px; border-radius: 13px; margin-bottom: .8rem; }
  .gw-icon svg { width: 23px; height: 23px; }
  .gw-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .gw-sub { font-size: .95rem; margin-bottom: .9rem; }
  .gw-chips { margin-bottom: 1rem; gap: 6px; }
  .gw-chips span { font-size: .76rem; }
  .gw-cta { padding: .75em 1.5em; font-size: .94rem; }
  .gw-seam { width: 84px; }
  .gw-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gw-panel { animation: none; transition: none; }
  .gw-bg { transition: none; }
  .gw-curtain { display: none; }
}
