/* ==========================================================================
   gate.css — preference gate on the services page
   Markup sits in the HTML but is hidden until JS turns it on, so anyone
   without JavaScript sees the page normally rather than a permanent wall.
   ========================================================================== */

.gate{
  position:fixed;inset:0;z-index:200;
  display:none;align-items:center;justify-content:center;
  padding:24px;
  background:rgba(7,12,22,.72);
  -webkit-backdrop-filter:blur(14px) saturate(.9);
  backdrop-filter:blur(14px) saturate(.9);
  opacity:0;transition:opacity .32s ease;
}
.gate.on{display:flex}
.gate.visible{opacity:1}
.gate.closing{opacity:0}

.gate-card{
  width:100%;max-width:560px;
  border:1px solid var(--hairline);border-radius:18px;
  background:linear-gradient(180deg,rgba(77,159,255,.09),var(--panel) 62%);
  padding:44px 40px 36px;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7);
  transform:translateY(14px) scale(.98);
  transition:transform .38s cubic-bezier(.22,.8,.26,1);
}
.gate.visible .gate-card{transform:none}

.gate-mark{display:flex;justify-content:center;margin-bottom:22px}
.gate-eyebrow{
  font-family:var(--mono);font-size:12.5px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--signal);text-align:center
}
.gate-card h2{
  font-family:var(--display);font-weight:700;
  font-size:clamp(21px,2.6vw,27px);letter-spacing:-.02em;line-height:1.28;
  text-align:center;margin-top:14px
}
.gate-sub{
  color:var(--slate);font-size:15px;text-align:center;
  margin-top:12px;max-width:42ch;margin-left:auto;margin-right:auto
}

.gate-opts{display:grid;gap:12px;margin-top:30px}
.gate-opt{
  width:100%;text-align:left;cursor:pointer;
  border:1px solid var(--hairline);border-radius:12px;
  background:rgba(13,21,38,.85);color:var(--paper);
  padding:20px 22px;font-family:inherit;
  display:flex;align-items:center;gap:16px;
  transition:border-color .2s,background .2s,transform .12s;
}
.gate-opt:hover{border-color:var(--signal);background:rgba(77,159,255,.08)}
.gate-opt:active{transform:translateY(1px)}
.gate-opt .ic{
  flex:0 0 auto;width:38px;height:38px;border-radius:9px;
  border:1px solid var(--hairline);background:var(--ink);
  display:flex;align-items:center;justify-content:center;
  color:var(--signal);font-family:var(--mono);font-size:15px
}
.gate-opt .t{font-family:var(--display);font-weight:600;font-size:16.5px}
.gate-opt .d{color:var(--slate);font-size:13.5px;margin-top:4px;line-height:1.5}

.gate-skip{
  display:block;margin:22px auto 0;background:none;border:0;cursor:pointer;
  font-family:var(--mono);font-size:12.5px;letter-spacing:.08em;
  color:#6B7A94;text-transform:uppercase;padding:6px 10px;
  transition:color .2s
}
.gate-skip:hover{color:var(--sky)}

body.gate-open{overflow:hidden}

/* ---------- the answer actually does something ---------- */
.pref-note{
  display:none;
  margin-top:26px;border:1px solid rgba(77,159,255,.4);border-radius:12px;
  background:linear-gradient(135deg,rgba(77,159,255,.1),var(--panel) 70%);
  padding:20px 24px
}
.pref-note.show{display:block}
.pref-note .tag{
  font-family:var(--mono);font-size:11.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--signal)
}
.pref-note p{color:var(--paper);font-size:15px;margin-top:8px;max-width:70ch}
.pref-note a{color:var(--sky);text-decoration:underline;text-underline-offset:3px}

/* a soft highlight on whichever tier fits their answer */
.tier-pick{
  outline:1.5px solid rgba(77,159,255,.55);
  outline-offset:5px;border-radius:16px;
}

/* ==========================================================================
   MOBILE: non-blocking bottom sheet
   Google's intrusive-interstitial rule is mobile-only. On phones the gate
   becomes a compact sheet that covers well under a third of the screen,
   never blocks scrolling, and has an obvious close button — which is what
   Google asks for. Desktop keeps the full blocking gate, where the rule
   does not apply.
   ========================================================================== */
@media(max-width:900px){
  .gate.gate-sheet{
    top:auto;bottom:0;left:0;right:0;
    display:none;align-items:flex-end;
    padding:0;
    background:none;
    -webkit-backdrop-filter:none;backdrop-filter:none;
    pointer-events:none;
  }
  .gate.gate-sheet.on{display:flex}
  .gate.gate-sheet .gate-card{
    pointer-events:auto;
    max-width:none;border-radius:16px 16px 0 0;
    border-left:0;border-right:0;border-bottom:0;
    padding:18px 18px calc(16px + env(safe-area-inset-bottom));
    background:linear-gradient(180deg,rgba(77,159,255,.12),var(--panel) 70%);
    box-shadow:0 -18px 50px -12px rgba(0,0,0,.75);
    transform:translateY(100%);
    transition:transform .36s cubic-bezier(.22,.8,.26,1);
    position:relative;
  }
  .gate.gate-sheet.visible .gate-card{transform:none}
  .gate.gate-sheet.closing .gate-card{transform:translateY(100%)}

  /* trim everything that isn't the question or the answers */
  .gate.gate-sheet .gate-mark,
  .gate.gate-sheet .gate-sub,
  .gate.gate-sheet .gate-opt .d{display:none}

  .gate.gate-sheet .gate-eyebrow{text-align:left;font-size:11.5px}
  .gate.gate-sheet .gate-card h2{
    text-align:left;font-size:16.5px;line-height:1.35;
    margin-top:7px;padding-right:34px
  }
  .gate.gate-sheet .gate-opts{margin-top:15px;gap:9px}
  .gate.gate-sheet .gate-opt{padding:13px 15px;gap:11px}
  .gate.gate-sheet .gate-opt .ic{width:30px;height:30px;font-size:13px}
  .gate.gate-sheet .gate-opt .t{font-size:14.5px}
  .gate.gate-sheet .gate-skip{margin-top:12px;font-size:11.5px}

  /* obvious, thumb-sized close control */
  .gate-close{
    position:absolute;top:12px;right:12px;
    width:34px;height:34px;border-radius:50%;
    border:1px solid var(--hairline);background:var(--ink);
    color:var(--slate);font-size:17px;line-height:1;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:color .2s,border-color .2s
  }
  .gate-close:hover,.gate-close:focus-visible{color:var(--paper);border-color:var(--signal)}
}

/* the close button only exists on the mobile sheet */
.gate-close{display:none}
@media(max-width:900px){.gate.gate-sheet .gate-close{display:flex}}

@media(max-width:560px){
  .gate:not(.gate-sheet) .gate-card{padding:34px 24px 28px;border-radius:16px}
  .gate:not(.gate-sheet) .gate-opt{padding:17px 18px;gap:13px}
  .gate:not(.gate-sheet) .gate-opt .ic{width:34px;height:34px}
}

@media(prefers-reduced-motion:reduce){
  .gate,.gate-card{transition:none}
  .gate-card{transform:none}
  .gate.gate-sheet .gate-card{transform:none}
}
