/* Site-wide access gate — loaded on public pages while platform is in closed beta. */

html.opes-gate-active,
html.opes-gate-active body {
  overflow: hidden !important;
  height: 100vh !important;
}

html.opes-gate-active body > *:not(#opes-access-gate):not(#opes-book-modal) {
  filter: blur(14px) saturate(85%) brightness(0.55);
  pointer-events: none !important;
  user-select: none !important;
  transform: scale(1.02);
  transform-origin: center;
}

#opes-access-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #E7ECF5;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(1000px 600px at 85% 90%, rgba(59, 130, 246, 0.18), transparent 60%),
    rgba(5, 7, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: opes-gate-fade 260ms ease-out both;
  overflow-y: auto;
  gap: 0;
}

/* Pill row above the gate card (tg 11321/11323). Clean, compact,
   same width as the card so they visually anchor to it without the
   "browser-tab" look Dennis flagged as too bulky. */
#opes-gate-tabs {
  width: min(460px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  z-index: 2;
  position: relative;
}
#opes-gate-tabs .og-tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  background: rgba(22, 27, 43, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #CBD5E1;
  font: 600 12.5px/1 'Inter', sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#opes-gate-tabs .og-tab:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.4);
  color: #f7f8fc;
  transform: translateY(-1px);
}
#opes-gate-tabs .og-tab svg {
  width: 14px; height: 14px; flex: 0 0 auto;
}
#opes-gate-tabs .og-tab-primary {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(59, 130, 246, 0.28));
  border-color: rgba(139, 92, 246, 0.5);
  color: #f7f8fc;
}
#opes-gate-tabs .og-tab-primary:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.42), rgba(59, 130, 246, 0.42));
  border-color: rgba(139, 92, 246, 0.7);
}
@media (max-width: 480px) {
  #opes-gate-tabs { gap: 8px; margin-bottom: 12px; }
  #opes-gate-tabs .og-tab { height: 36px; font-size: 12px; padding: 0 10px; }
}

/* Book-a-call modal */
#opes-book-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(5, 7, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  animation: opes-gate-fade 200ms ease-out both;
}
#opes-book-modal.is-open { display: flex; }
#opes-book-modal .bm-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(22, 27, 43, 0.96) 0%, rgba(13, 17, 30, 0.98) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  padding: 28px 26px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  color: #E7ECF5;
  position: relative;
}
#opes-book-modal .bm-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
#opes-book-modal .bm-close:hover { color: #f7f8fc; background: rgba(255, 255, 255, 0.08); }
#opes-book-modal h2 {
  margin: 0 0 4px;
  font-size: 20px; font-weight: 800; letter-spacing: -0.015em;
  color: #f7f8fc;
}
#opes-book-modal .bm-sub {
  margin: 0 0 18px;
  font-size: 13px; color: #94a3b8; line-height: 1.5;
}
#opes-book-modal .bm-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
#opes-book-modal .bm-nav button {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #E7ECF5;
  font-size: 18px; line-height: 1;
  cursor: pointer;
}
#opes-book-modal .bm-nav button:disabled { opacity: 0.4; cursor: not-allowed; }
#opes-book-modal .bm-nav-title {
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
}
#opes-book-modal .bm-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
#opes-book-modal .bm-cal-h {
  text-align: center; font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #64748b; font-weight: 700;
  padding: 6px 0;
}
#opes-book-modal .bm-cal-d {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #475569;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
#opes-book-modal .bm-cal-d.is-empty { background: transparent; border: 0; }
#opes-book-modal .bm-cal-d.is-today { outline: 1px solid rgba(139, 92, 246, 0.4); }
#opes-book-modal .bm-cal-d.is-open {
  color: #E7ECF5;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.35);
  cursor: pointer;
}
#opes-book-modal .bm-cal-d.is-open:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.55);
}
#opes-book-modal .bm-cal-d.is-selected {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(59, 130, 246, 0.4));
  border-color: rgba(168, 85, 247, 0.7);
  color: #fff;
}
#opes-book-modal .bm-cal-d.is-full {
  color: #475569;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.15);
  cursor: not-allowed;
}
#opes-book-modal .bm-cal-d.is-past {
  color: #3f4964;
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
  opacity: 0.5;
  text-decoration: line-through;
}
#opes-book-modal .bm-cal-d.is-past .bm-dot {
  text-decoration: none;
  opacity: 0.7;
}
#opes-book-modal .bm-cal-d .bm-dot {
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  font-size: 8.5px; letter-spacing: 0.04em;
  color: inherit; opacity: 0.8;
}
#opes-book-modal .bm-legend {
  display: flex; gap: 14px;
  font-size: 10.5px; color: #64748b;
  margin-bottom: 18px; flex-wrap: wrap;
}
#opes-book-modal .bm-legend span { display: inline-flex; align-items: center; gap: 5px; }
#opes-book-modal .bm-legend i {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
}
#opes-book-modal .bm-legend .b-open  { background: rgba(139, 92, 246, 0.35); }
#opes-book-modal .bm-legend .b-full  { background: rgba(239, 68, 68, 0.35); }
#opes-book-modal .bm-legend .b-empty { background: rgba(255, 255, 255, 0.08); }

#opes-book-modal .bm-slots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
#opes-book-modal .bm-slot {
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #E7ECF5;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
}
#opes-book-modal .bm-slot:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
}
#opes-book-modal .bm-slot.is-selected {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(59, 130, 246, 0.35));
  border-color: rgba(168, 85, 247, 0.7);
}
#opes-book-modal .bm-slot.is-taken {
  opacity: 0.4; cursor: not-allowed; text-decoration: line-through;
}
#opes-book-modal .bm-field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
}
#opes-book-modal .bm-field label {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #94a3b8; font-weight: 700;
}
#opes-book-modal .bm-field input,
#opes-book-modal .bm-field textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  font: inherit; font-size: 14px;
  resize: vertical;
}
#opes-book-modal .bm-field input:focus,
#opes-book-modal .bm-field textarea:focus {
  outline: none; border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.06);
}
#opes-book-modal .bm-error {
  color: #F87171; font-size: 12.5px; margin: 4px 0 10px;
  display: none;
}
#opes-book-modal .bm-error.is-show { display: block; }
#opes-book-modal .bm-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #A855F7 0%, #6366F1 55%, #3B82F6 100%);
  color: #fff;
  font: 700 14px/1 'Inter', sans-serif; letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
}
#opes-book-modal .bm-submit:disabled { opacity: 0.6; cursor: not-allowed; }
#opes-book-modal .bm-success {
  padding: 18px 18px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #BBF7D0;
  font-size: 14px; line-height: 1.55;
  margin: 10px 0 14px;
}
#opes-book-modal .bm-success strong { color: #f0fdf4; }

@keyframes opes-gate-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

#opes-access-gate .og-card {
  width: min(460px, 100%);
  position: relative;
  padding: 36px 32px 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22, 27, 43, 0.92) 0%, rgba(13, 17, 30, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(139, 92, 246, 0.12);
}

#opes-access-gate .og-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(59, 130, 246, 0.3) 50%, rgba(99, 102, 241, 0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

#opes-access-gate .og-brand {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#opes-access-gate .og-logo {
  height: 26px;
  width: auto;
  display: block;
}

#opes-access-gate .og-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #C4B5FD;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  margin-bottom: 14px;
}

#opes-access-gate .og-eyebrow .og-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A855F7;
  box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6);
  animation: opes-gate-pulse 1.8s ease-in-out infinite;
}

@keyframes opes-gate-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

#opes-access-gate h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #F7F8FC;
}

#opes-access-gate h1 .og-grad {
  background: linear-gradient(135deg, #A855F7 0%, #6366F1 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#opes-access-gate .og-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #9AA3B5;
}

#opes-access-gate .og-field {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0 14px;
  height: 52px;
  transition: border-color 160ms ease, background 160ms ease;
}

#opes-access-gate .og-field:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

#opes-access-gate.is-error .og-field {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.06);
  animation: opes-gate-shake 380ms ease;
}

@keyframes opes-gate-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

#opes-access-gate .og-field svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #7E8699;
}

#opes-access-gate .og-field input {
  flex: 1;
  min-width: 0;
  margin: 0 10px;
  border: 0;
  background: transparent;
  outline: none;
  color: #F7F8FC;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.16em;
}

#opes-access-gate .og-field input::placeholder,
#opes-access-gate .og-field textarea::placeholder {
  color: #4E5668;
  letter-spacing: 0;
  font-family: 'Inter', sans-serif;
}

#opes-access-gate .og-field-next { margin-top: 10px; }

#opes-access-gate .og-field-area {
  align-items: flex-start;
  height: auto;
  padding: 12px 14px;
}

#opes-access-gate .og-field textarea {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: #F7F8FC;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  min-height: 56px;
  max-height: 180px;
  width: 100%;
}

#opes-access-gate .og-field input[type="email"],
#opes-access-gate .og-field input[type="text"] {
  letter-spacing: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

#opes-access-gate .og-eyebrow-ok {
  color: #86EFAC;
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.32);
}

#opes-access-gate .og-pulse-ok {
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation-name: opes-gate-pulse-ok;
}

@keyframes opes-gate-pulse-ok {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#opes-access-gate .og-eye {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  color: #7E8699;
  background: transparent;
  border: 0;
  transition: color 140ms ease, background 140ms ease;
}

#opes-access-gate .og-eye:hover {
  color: #E7ECF5;
  background: rgba(255, 255, 255, 0.05);
}

#opes-access-gate .og-error {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: #F87171;
  min-height: 16px;
  display: none;
}

#opes-access-gate.is-error .og-error { display: block; }

#opes-access-gate .og-unlock {
  margin-top: 18px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #A855F7 0%, #6366F1 55%, #3B82F6 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 10px 24px rgba(99, 102, 241, 0.32);
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#opes-access-gate .og-unlock:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 14px 30px rgba(99,102,241,0.42); }
#opes-access-gate .og-unlock:active { transform: translateY(1px); }
#opes-access-gate .og-unlock[disabled] { opacity: 0.7; cursor: wait; }

#opes-access-gate .og-unlock svg { width: 16px; height: 16px; }

#opes-access-gate .og-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: #6B7486;
}

#opes-access-gate .og-hint a {
  color: #4ADE80;
  text-decoration: none;
  border-bottom: 1px dashed rgba(74, 222, 128, 0.45);
  transition: color 140ms ease, border-color 140ms ease;
}

#opes-access-gate .og-hint a:hover {
  color: #86EFAC;
  border-color: rgba(134, 239, 172, 0.7);
}

#opes-access-gate .og-note {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #FCD34D;
  font-size: 12.5px;
  line-height: 1.5;
}

#opes-access-gate .og-note svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: #FBBF24;
}

#opes-access-gate .og-note strong {
  color: #FDE68A;
  font-weight: 700;
}

#opes-access-gate .og-divider {
  margin: 22px 0 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

#opes-access-gate .og-status {
  display: flex;
  justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #6B7486;
  text-transform: uppercase;
}

#opes-access-gate .og-status .og-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22D3A7;
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(34, 211, 167, 0.6);
  vertical-align: middle;
}

@media (max-width: 540px) {
  #opes-access-gate .og-card { padding: 28px 22px 22px; }
  #opes-access-gate h1 { font-size: 22px; }
  #opes-access-gate .og-sub { font-size: 13px; }
}
