/* ============================================================
   TLKSHOP private-access gate — tlkgate.css
   A restrained, premium access experience shown in place of the
   TLKSHOP case study for unauthenticated visitors. No protected
   content lives here; this is the public gate skin only.
   Desktop = full-bleed cinematic stage. Mobile = fits the phone
   frame, respects safe-areas and the on-screen keyboard.
   All ambient motion is disabled under prefers-reduced-motion.
   ============================================================ */

.tlkg {
  /* scoped tokens (kept local so the gate is self-contained) */
  --tlkg-bg0: #05060a;
  --tlkg-bg1: #0a0b12;
  --tlkg-violet: #8335C1;     /* AI / product-intelligence purple */
  --tlkg-violet-lt: #B57BE8;  /* brighter accent (matches TLKSHOP "engine." purple) */
  --tlkg-indigo: #3d2b8f;
  --tlkg-line: rgba(255,255,255,0.10);
  --tlkg-line-2: rgba(255,255,255,0.16);
  --tlkg-ok: #35D07F;
  --tlkg-err: #FF5C7A;
  --tlkg-panelw: 480px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% -10%, var(--tlkg-bg1) 0%, var(--tlkg-bg0) 60%, #000 100%);
  color: var(--fg-on-dark, #fff);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ---- ambient background layers ---------------------------------- */
.tlkg-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.tlkg-orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5;
  will-change: transform; mix-blend-mode: screen;
}
.tlkg-orb--a { width: 46vw; height: 46vw; left: -8vw; top: -12vw;
  background: radial-gradient(circle, rgba(131,53,193,0.55), transparent 68%); animation: tlkg-drift-a 26s ease-in-out infinite; }
.tlkg-orb--b { width: 40vw; height: 40vw; right: -10vw; top: 20%;
  background: radial-gradient(circle, rgba(61,43,143,0.55), transparent 68%); animation: tlkg-drift-b 32s ease-in-out infinite; }
.tlkg-orb--c { width: 34vw; height: 34vw; left: 30%; bottom: -14vw;
  background: radial-gradient(circle, rgba(181,123,232,0.32), transparent 70%); animation: tlkg-drift-c 30s ease-in-out infinite; }
.tlkg-grid {
  position: absolute; inset: -2px; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 30%, #000 40%, transparent 78%);
          mask-image: radial-gradient(120% 80% at 50% 30%, #000 40%, transparent 78%);
}
.tlkg-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(181,123,232,0.06) 46%, transparent);
  animation: tlkg-scan 9s linear infinite;
}
@keyframes tlkg-drift-a { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4vw,3vw,0) scale(1.08); } }
@keyframes tlkg-drift-b { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-3vw,4vw,0) scale(1.1); } }
@keyframes tlkg-drift-c { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(2vw,-3vw,0) scale(1.06); } }
@keyframes tlkg-scan { 0% { transform: translateY(-40%); } 100% { transform: translateY(320%); } }

/* ---- layout ----------------------------------------------------- */
.tlkg-in {
  position: relative; z-index: 1;
  width: 100%;
  padding: clamp(24px, 5vw, 64px) var(--gutter-desktop, 64px);
  display: flex; justify-content: center;
}
.tlkg-panel {
  width: 100%; max-width: var(--tlkg-panelw);
  padding: clamp(28px, 3.4vw, 44px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20,18,32,0.72), rgba(10,10,16,0.82));
  border: 1px solid var(--tlkg-line);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 80px -30px rgba(0,0,0,0.85),
    0 0 0 1px rgba(131,53,193,0.06);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
          backdrop-filter: blur(14px) saturate(115%);
  animation: tlkg-rise .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes tlkg-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- lock indicator --------------------------------------------- */
.tlkg-indicator {
  position: relative; width: 68px; height: 68px; margin: 0 auto clamp(18px, 2.4vw, 26px);
  display: grid; place-items: center;
}
.tlkg-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--tlkg-line-2);
  background: radial-gradient(circle at 50% 38%, rgba(131,53,193,0.28), rgba(255,255,255,0.02) 70%);
  box-shadow: 0 0 0 6px rgba(131,53,193,0.06), 0 10px 30px -12px rgba(131,53,193,0.5);
  transition: border-color .5s ease, box-shadow .5s ease, background .5s ease;
}
.is-success .tlkg-ring, .tlkg-indicator.is-open .tlkg-ring {
  border-color: rgba(53,208,127,0.6);
  background: radial-gradient(circle at 50% 38%, rgba(53,208,127,0.26), rgba(255,255,255,0.02) 70%);
  box-shadow: 0 0 0 6px rgba(53,208,127,0.10), 0 10px 30px -12px rgba(53,208,127,0.55);
}
/* CSS padlock: body + shackle (arc). Shackle lifts on unlock. */
.tlkg-lock { position: relative; width: 30px; height: 38px; color: var(--tlkg-violet-lt); }
.tlkg-lock::before { /* shackle */
  content: ''; position: absolute; left: 50%; top: 0; width: 18px; height: 18px;
  transform: translateX(-50%);
  border: 3px solid currentColor; border-bottom: none; border-radius: 9px 9px 0 0;
  transition: transform .55s cubic-bezier(.2,.9,.2,1);
  transform-origin: 3px 16px;
}
.tlkg-lock::after { /* body */
  content: ''; position: absolute; left: 50%; bottom: 0; width: 30px; height: 23px;
  transform: translateX(-50%);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--tlkg-violet-lt), var(--tlkg-violet));
  box-shadow: 0 4px 14px -4px rgba(131,53,193,0.7);
}
.tlkg-lock.is-open { color: var(--tlkg-ok); }
.tlkg-lock.is-open::before { transform: translateX(-58%) rotate(-32deg); }
.tlkg-lock.is-open::after { background: linear-gradient(180deg, #66e0a0, var(--tlkg-ok)); box-shadow: 0 4px 14px -4px rgba(53,208,127,0.7); }

/* ---- copy ------------------------------------------------------- */
.tlkg-copy { text-align: center; }
.tlkg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: var(--track-label, 0.18em); text-transform: uppercase;
  color: var(--tlkg-violet-lt); margin: 0 0 14px;
}
.tlkg-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tlkg-violet-lt);
  box-shadow: 0 0 0 0 rgba(181,123,232,0.6); animation: tlkg-pulse 2.4s ease-out infinite; }
@keyframes tlkg-pulse { 0% { box-shadow: 0 0 0 0 rgba(181,123,232,0.55); } 70%,100% { box-shadow: 0 0 0 8px rgba(181,123,232,0); } }
.tlkg-h {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 3.4vw, 3rem); line-height: 0.98;
  letter-spacing: var(--track-display, -0.01em); text-transform: none;
  margin: 0 0 14px; color: #fff;
}
.tlkg-sub {
  font-size: 1.0625rem; line-height: 1.55; color: var(--fg-on-dark-2, #B7BCC6);
  margin: 0 auto 22px; max-width: 34ch;
}
.tlkg-mailcta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--tlkg-line-2);
  background: rgba(255,255,255,0.03);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.tlkg-mailcta:hover {
  border-color: rgba(181,123,232,0.55);
  background: rgba(131,53,193,0.16);
  box-shadow: 0 10px 30px -14px rgba(131,53,193,0.8);
  transform: translateY(-1px);
}
.tlkg-mailcta:focus-visible { outline: 2px solid var(--tlkg-violet-lt); outline-offset: 3px; }

/* ---- form ------------------------------------------------------- */
.tlkg-form {
  margin-top: clamp(22px, 2.6vw, 30px);
  padding-top: clamp(20px, 2.4vw, 26px);
  border-top: 1px solid var(--tlkg-line);
  text-align: left;
}
.tlkg-form-label {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-on-dark-3, #767C88); margin: 0 0 16px; text-align: center;
}
.tlkg-field { margin-bottom: 14px; }
.tlkg-lbl {
  display: block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-on-dark-2, #B7BCC6); margin: 0 0 7px;
}
.tlkg-input {
  width: 100%; box-sizing: border-box;
  height: 50px; padding: 0 15px;
  font-family: var(--font-sans); font-size: 1rem; color: #fff;
  background: rgba(8,8,13,0.72);
  border: 1px solid var(--tlkg-line-2); border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  -webkit-appearance: none; appearance: none;
}
.tlkg-input::placeholder { color: var(--fg-on-dark-3, #767C88); }
.tlkg-input:focus {
  outline: none; border-color: rgba(181,123,232,0.65);
  background: rgba(12,10,20,0.9);
  box-shadow: 0 0 0 3px rgba(131,53,193,0.28);
}
.tlkg-input[aria-invalid="true"] { border-color: rgba(255,92,122,0.6); }
.tlkg-input:disabled { opacity: 0.6; }
/* neutralize autofill's white fill on the dark field */
.tlkg-input:-webkit-autofill,
.tlkg-input:-webkit-autofill:hover,
.tlkg-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(12,10,20,0.96) inset;
  caret-color: #fff;
  transition: background-color 9999s ease-out 0s;
}
.tlkg-pwwrap { position: relative; }
.tlkg-input--pw { padding-right: 48px; }
.tlkg-pwtoggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 9px; cursor: pointer;
  color: var(--fg-on-dark-2, #B7BCC6);
  transition: color .2s ease, background .2s ease;
}
.tlkg-pwtoggle:hover { color: #fff; background: rgba(255,255,255,0.06); }
.tlkg-pwtoggle:focus-visible { outline: 2px solid var(--tlkg-violet-lt); outline-offset: 1px; }

.tlkg-msg {
  min-height: 20px; margin: 4px 0 14px;
  font-size: 0.86rem; line-height: 1.35; color: var(--fg-on-dark-2, #B7BCC6);
}
.tlkg-msg span { display: inline-flex; align-items: center; gap: 6px; }
.tlkg-msg.is-error { color: var(--tlkg-err); }
.tlkg-msg.is-ok { color: var(--tlkg-ok); }

.tlkg-submit {
  width: 100%; height: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  border: 0; border-radius: 13px;
  background: linear-gradient(180deg, var(--tlkg-violet-lt), var(--tlkg-violet));
  box-shadow: 0 14px 34px -14px rgba(131,53,193,0.9), 0 1px 0 rgba(255,255,255,0.12) inset;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
.tlkg-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 18px 40px -14px rgba(131,53,193,1); }
.tlkg-submit:active:not(:disabled) { transform: translateY(0); }
.tlkg-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tlkg-submit:disabled { cursor: default; }
.tlkg-submit.is-loading { opacity: 0.85; }
.tlkg-submit.is-ok { background: linear-gradient(180deg, #66e0a0, var(--tlkg-ok)); box-shadow: 0 14px 34px -14px rgba(53,208,127,0.9); }
.tlkg-spin {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: tlkg-spin .7s linear infinite;
}
@keyframes tlkg-spin { to { transform: rotate(360deg); } }

/* ---- verifying / unlocking veil --------------------------------- */
.tlkg-veil-in {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.tlkg-veil .tlkg-lock { width: 34px; height: 44px; }
.tlkg-veil-t {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-on-dark-2, #B7BCC6);
}

/* ================================================================
   MOBILE — fits inside the phone frame (.phone > .app-main).
   Uses rem so it scales with the fluid mobile root, and honours
   safe-areas + the on-screen keyboard.
   ================================================================ */
.tlkg--mobile {
  min-height: 100%;
  align-items: stretch;
  background: radial-gradient(130% 80% at 50% -6%, #0a0b12 0%, #05060a 58%, #000 100%);
}
.tlkg--mobile .tlkg-in {
  padding: 1.75rem 1.25rem;
  padding-top: calc(1.75rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  align-items: center;
}
.tlkg--mobile .tlkg-panel {
  max-width: 26rem;
  padding: 1.6rem 1.35rem;
  border-radius: 1.25rem;
}
.tlkg--mobile .tlkg-indicator { width: 3.6rem; height: 3.6rem; margin-bottom: 1rem; }
.tlkg--mobile .tlkg-lock { width: 1.7rem; height: 2.15rem; }
.tlkg--mobile .tlkg-h { font-size: 1.9rem; }
.tlkg--mobile .tlkg-sub { font-size: 0.95rem; max-width: 30ch; }
.tlkg--mobile .tlkg-input { height: 2.9rem; font-size: 1rem; border-radius: 0.7rem; } /* 16px font-size avoids iOS zoom */
.tlkg--mobile .tlkg-submit { height: 3rem; border-radius: 0.8rem; }
.tlkg--mobile .tlkg-orb { filter: blur(42px); }

/* ================================================================
   ACCESSIBILITY — reduced motion kills all ambient + decorative
   animation but keeps the interface fully functional.
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .tlkg-orb, .tlkg-scan, .tlkg-eyebrow-dot, .tlkg-panel { animation: none !important; }
  .tlkg-spin { animation-duration: 1.4s; } /* keep a slow spinner as the only motion (loading feedback) */
  .tlkg-lock::before, .tlkg-ring, .tlkg-submit, .tlkg-mailcta, .tlkg-input, .tlkg-pwtoggle { transition: none !important; }
}
