/* ASES ambient layer: movement stays behind the readable, stable content. */
:root { --ease-soft:cubic-bezier(.22,1,.36,1); --panel:rgba(255,255,255,.86); }
body { isolation:isolate; background:#f1f4fa; }
.bg-orbs { display:block; pointer-events:none; z-index:-1; background:linear-gradient(145deg,#f0f4fc 0%,#f6f5f9 50%,#f6eeee 100%); }
.bg-orbs::after { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 50% 45%,#ffffff6b,transparent 70%); }
.bg-orbs span { filter:blur(72px); opacity:.58; animation:cloud-drift 24s ease-in-out infinite alternate; }
.bg-orbs span:nth-child(1) { width:62vw; height:64vh; min-width:480px; background:radial-gradient(ellipse,#9bb8e9 0%,#c2d4ed 48%,transparent 72%); top:-18vh; left:-17vw; }
.bg-orbs span:nth-child(2) { width:52vw; height:70vh; min-width:400px; background:radial-gradient(ellipse,#dca6ac 0%,#ecd0d4 46%,transparent 72%); top:23vh; right:-19vw; bottom:auto; opacity:.55; animation-delay:-9s; animation-duration:28s; }
.bg-orbs span:nth-child(3) { width:52vw; height:58vh; min-width:380px; background:radial-gradient(ellipse,#9bc9e1 0%,#c8e2eb 45%,transparent 72%); top:58vh; left:8vw; right:auto; opacity:.38; animation-delay:-16s; animation-duration:32s; }
.ambient-ring { position:absolute; width:72vw; height:32vw; min-width:560px; min-height:230px; top:4vh; right:-22vw; border:1px solid #ffffffa8; border-bottom-color:#8ba8d22b; border-radius:50%; box-shadow:0 1px 0 #ffffff60,inset 0 -1px 0 #c9d9ee2e; transform:rotate(-28deg); animation:ring-drift 30s ease-in-out infinite alternate; }
.ambient-ring.second { top:auto; bottom:-14vw; left:-28vw; right:auto; width:80vw; height:43vw; opacity:.65; animation-delay:-15s; }
@keyframes cloud-drift { from { transform:translate3d(0,0,0) scale(1); } to { transform:translate3d(5vw,4vh,0) scale(1.12); } }
@keyframes ring-drift { from { transform:translate3d(0,0,0) rotate(-28deg); } to { transform:translate3d(-2vw,3vh,0) rotate(-21deg); } }
.site-header { background:#ffffff66; border-bottom-color:#ffffffa8; -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px); }
.directory-intro { padding-top:48px; padding-bottom:30px; }
.directory-intro h2 { text-shadow:0 2px 16px #fff9; }
.directory-count { border-color:#bc7d84; }
.search-panel,.profile-editor,.timeline-panel { background:linear-gradient(140deg,#ffffffeb,#ffffffe0); border:1px solid #ffffffed; box-shadow:0 12px 40px #31466b08,inset 0 1px 0 #fff; }
.search-panel { border-radius:23px; }
.search-box { background:#f5f7fbbe; border:1px solid #d8e0edb0; transition:background .25s,box-shadow .35s var(--ease-soft),border-color .25s; }
.search-box:focus-within { background:#fff; border-color:#8ca7d2; box-shadow:0 0 0 4px #527eb310,0 4px 18px #456fb00a; }
.card { background:linear-gradient(145deg,#fffffff2,#ffffffcc); border:1px solid #ffffffed; border-radius:21px; box-shadow:0 6px 22px #344a7406,inset 0 1px 0 #fff; transition:transform .45s var(--ease-soft),box-shadow .45s var(--ease-soft),border-color .3s; }
.card:hover { transform:none; border-color:#ffffffed; box-shadow:0 6px 22px #344a7406,inset 0 1px 0 #fff; }
.shared-keywords { background:#eaf0f98a; }
.match-reasons { background:#f5e9eb8f; }
.tag { background:#eef1f6ae; }
.card-timeline { border-color:#dfe5efb3; }
.bottom-nav { background:#ffffffe0; border:1px solid #ffffffed; border-radius:21px; box-shadow:0 12px 44px #2a3e6b14,0 2px 8px #2a3e6b07,inset 0 1px 0 #fff; -webkit-backdrop-filter:blur(22px); backdrop-filter:blur(22px); }
.bottom-nav::before,.gate-tabs::before { content:''; position:absolute; inset:6px auto 6px 6px; width:calc((100% - 12px) / 2); border-radius:15px; background:linear-gradient(145deg,#e7eefb,#f2f5fc); box-shadow:0 2px 8px #314f8208,inset 0 1px 0 #fff; transform:translateX(0); transition:transform .45s var(--ease-soft); pointer-events:none; }
.bottom-nav:has(#profileNavBtn.active)::before { transform:translateX(100%); }
.bottom-nav button { position:relative; z-index:1; background:transparent; transition:color .25s,transform .2s var(--ease-soft); }
.bottom-nav button.active { background:transparent; }
.btn-primary,.btn-secondary,.gate-tab,.bottom-nav-item,.clear-search { position:relative; overflow:hidden; touch-action:manipulation; transition:transform .25s var(--ease-soft),box-shadow .3s var(--ease-soft),background .25s,color .25s; }
.btn-primary { background:linear-gradient(135deg,#4568a8,#2b3e79); border:1px solid #ffffff26; box-shadow:0 4px 12px #2e478b18,inset 0 1px 0 #ffffff24; }
.btn-primary:hover { background:linear-gradient(135deg,#4568a8,#2b3e79); box-shadow:0 4px 12px #2e478b18,inset 0 1px 0 #ffffff24; }
.btn-secondary { background:#ffffff65; }
.btn-primary:active,.btn-secondary:active,.gate-tab:active,.bottom-nav-item:active,.clear-search:active { transform:translateY(1px) scale(.975); }
.btn-primary:active { box-shadow:0 1px 4px #2e478b14,inset 0 2px 4px #182d681a; }
.form-field input,.form-field textarea,.form-field select,.filters select { transition:border-color .25s,background .25s,box-shadow .3s var(--ease-soft); }
.form-field input:focus,.form-field textarea:focus,.form-field select:focus,.filters select:focus-visible { border-color:#8ca7d2; box-shadow:0 0 0 4px #527eb310; background:#fff; }
.gate { background:#f5f6fa33; backdrop-filter:none; }
.gate-card.gate-card-wide { position:relative; background:linear-gradient(140deg,#fffffff5,#ffffffd4); border:1px solid #ffffffed; border-radius:28px; box-shadow:0 28px 90px #344b7810,0 3px 12px #344b7805,inset 0 1px 0 #fff; }
.gate-logo { box-shadow:0 6px 18px #344b7809; }
.gate-tabs { position:relative; background:#eaf0f79c; }
.gate-tabs::before { inset:4px auto 4px 4px; width:calc((100% - 8px) / 2); border-radius:9px; background:#fff; }
.gate-tabs:has(#registerTab.active)::before { transform:translateX(100%); }
.gate-tab { position:relative; z-index:1; }
.gate-tab.active { background:transparent; box-shadow:none; }
.modal-card { background:linear-gradient(145deg,#fff,#f7f9fc); border-color:#fff; box-shadow:0 24px 80px #152c6929; }
.touch-aura { position:absolute; width:110px; height:110px; margin:-55px 0 0 -55px; pointer-events:none; border-radius:50%; background:radial-gradient(circle,#6e95d32b,transparent 70%); animation:touch-bloom .55s var(--ease-soft) forwards; }
.btn-primary .touch-aura { background:radial-gradient(circle,#ffffff5c,transparent 70%); }
@keyframes touch-bloom { from { transform:scale(.2); opacity:1; } to { transform:scale(2.5); opacity:0; } }
html[data-page-hidden] .bg-orbs span,html[data-page-hidden] .ambient-ring { animation-play-state:paused; }
@media(hover:hover) and (pointer:fine) {
  .card:hover { transform:translateY(-4px); border-color:#c9d7edcc; box-shadow:0 18px 42px #344a7410,0 4px 12px #344a7405,inset 0 1px 0 #fff; }
  .btn-primary:hover { transform:translateY(-1px); box-shadow:0 8px 20px #2e478b26,inset 0 1px 0 #ffffff30; }
  .btn-secondary:hover { background:#fff; transform:translateY(-1px); box-shadow:0 4px 12px #344a7409; }
  .btn-primary:active,.btn-secondary:active { transform:translateY(1px) scale(.975); }
}
@media(max-width:600px) {
  .directory-intro { padding-top:30px; padding-bottom:24px; }
  .bg-orbs span { filter:blur(48px); }
  .bg-orbs span:nth-child(1) { left:-65vw; top:-10vh; }
  .bg-orbs span:nth-child(2) { right:-70vw; top:25vh; }
  .bg-orbs span:nth-child(3) { left:-45vw; }
  .ambient-ring { right:-100vw; top:12vh; opacity:.7; }
  .search-panel { border-radius:21px; }
  .filters select,.clear-search,.account-actions .btn-secondary,.gate-tab,.btn-secondary { min-height:44px; }
  .form-field input,.form-field textarea,.form-field select,#q { font-size:16px; }
  .gate-card.gate-card-wide { border-radius:25px; }
}
/* Keep the ambient scene visible at sign-in without exposing the app beneath. */
body:has(#gate:not(.hidden)) > .site-header,
body:has(#gate:not(.hidden)) > .app-view,
body:has(#gate:not(.hidden)) > .site-footer,
body:has(#gate:not(.hidden)) > .bottom-nav { visibility:hidden; }
