/* GateSphere UI — HeroUI-inspired design system (no build step) */
:root { --p: #006FEE; --s: #7828C8; --ok: #17C964; --warn: #F5A524; --bad: #F31260; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: Inter, ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif; }
[x-cloak] { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 500; font-size: .875rem; white-space: nowrap; transition: transform .12s ease, background-color .2s, box-shadow .2s, opacity .2s; user-select: none; cursor: pointer; border: 0; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: .8rem; border-radius: 10px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 8px 24px -10px rgba(0,111,238,.8); }
.btn-primary:hover { background: #005BC4; }
.btn-secondary { background: var(--s); color: #fff; box-shadow: 0 8px 24px -10px rgba(120,40,200,.7); }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { background: #12A150; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #C20E4D; }
.btn-flat { background: #E6F1FE; color: #005BC4; }
.btn-flat:hover { background: #CCE3FD; }
.btn-flat-danger { background: #FEE7EF; color: #C20E4D; }
.btn-flat-success { background: #E8FAF0; color: #0E793C; }
.btn-light { background: transparent; color: #3F3F46; }
.btn-light:hover { background: #F4F4F5; }
.btn-bordered { background: transparent; border: 2px solid #E4E4E7; color: #27272A; }
.btn-bordered:hover { background: #FAFAFA; }
.btn-gradient { background: linear-gradient(135deg, #006FEE 0%, #7828C8 100%); color: #fff; box-shadow: 0 10px 30px -10px rgba(120,40,200,.7); }
.btn-gradient:hover { filter: brightness(1.08); }
.btn-icon { width: 40px; padding: 0; }

/* Cards */
.card { background: #fff; border-radius: 18px; box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 0.02), 0px 2px 10px 0px rgb(0 0 0 / 0.06), 0px 0px 1px 0px rgb(0 0 0 / 0.3); }
.card-hover { transition: transform .25s ease, box-shadow .25s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0px 0px 15px 0px rgb(0 0 0 / 0.03), 0px 12px 30px 0px rgb(0 0 0 / 0.10), 0px 0px 1px 0px rgb(0 0 0 / 0.3); }
.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* Inputs (HeroUI flat variant) */
.field label { display: block; font-size: .78rem; font-weight: 500; color: #52525B; margin-bottom: 6px; }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: #F4F4F5; border: 2px solid transparent; font-size: .9rem; color: #18181B; outline: none; transition: background .2s, border-color .2s; }
.input:hover { background: #E4E4E7; }
.input:focus { background: #fff; border-color: var(--p); }
textarea.input { height: auto; padding: 10px 14px; min-height: 96px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717A' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.chip-default { background: #F4F4F5; color: #52525B; }
.chip-primary { background: #E6F1FE; color: #005BC4; }
.chip-secondary { background: #F2EAFA; color: #6020A0; }
.chip-success { background: #E8FAF0; color: #0E793C; }
.chip-warning { background: #FEFCE8; color: #936316; }
.chip-danger { background: #FEE7EF; color: #C20E4D; }

/* Tabs (HeroUI solid) */
.tabs { display: inline-flex; padding: 4px; gap: 2px; background: #F4F4F5; border-radius: 14px; }
.tab { height: 34px; padding: 0 14px; border-radius: 10px; font-size: .84rem; font-weight: 500; color: #71717A; transition: all .2s; cursor: pointer; white-space: nowrap; }
.tab.active { background: #fff; color: #18181B; box-shadow: 0 1px 6px rgba(0,0,0,.08); }

/* Table */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #71717A; font-weight: 600; background: #F4F4F5; padding: 10px 12px; }
.table th:first-child { border-radius: 10px 0 0 10px; }
.table th:last-child { border-radius: 0 10px 10px 0; }
.table td { padding: 12px; border-bottom: 1px solid #F4F4F5; color: #27272A; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #FAFAFA; }

/* Avatar */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #006FEE, #7828C8); flex-shrink: 0; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(9,9,11,.45); backdrop-filter: blur(6px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes blob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-50px) scale(1.12); } 66% { transform: translate(-30px,30px) scale(.92); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(243,18,96,.55); } 100% { box-shadow: 0 0 0 22px rgba(243,18,96,0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes dash { to { stroke-dashoffset: 0; } }
.anim-fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
.anim-scale-in { animation: scaleIn .25s cubic-bezier(.2,.7,.2,1) both; }
.anim-float { animation: floaty 6s ease-in-out infinite; }
.anim-blob { animation: blob 14s ease-in-out infinite; }
.anim-slide-in { animation: slideIn .35s cubic-bezier(.2,.7,.2,1) both; }
.pulse-ring { animation: pulseRing 1.4s ease-out infinite; }
.delay-1 { animation-delay: .1s; } .delay-2 { animation-delay: .2s; } .delay-3 { animation-delay: .3s; } .delay-4 { animation-delay: .45s; } .delay-5 { animation-delay: .6s; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.text-gradient { background: linear-gradient(90deg, #66AAF9, #C9A9E9, #F54180, #66AAF9); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradientMove 8s ease infinite; }
.skeleton { background: linear-gradient(90deg, #F4F4F5 0px, #E4E4E7 80px, #F4F4F5 160px); background-size: 800px 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
.grid-bg { background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: .88rem; font-weight: 500; color: #52525B; transition: all .18s; cursor: pointer; }
.nav-item:hover { background: #F4F4F5; color: #18181B; }
.nav-item.active { background: #006FEE; color: #fff; box-shadow: 0 8px 20px -8px rgba(0,111,238,.8); }
.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; } .scrollbar-thin::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 9px; }
/* ---------- Landing showcase animations ---------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes wordIn { from { opacity: 0; transform: translateY(60%) rotateX(-60deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.word-in { display: inline-block; animation: wordIn .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes notifDrop { 0% { opacity: 0; transform: translateY(-30px) scale(.9); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px) scale(.96); } }
.notif-drop { animation: notifDrop 5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes tapPulse { 0%, 55% { transform: scale(1); box-shadow: 0 0 0 0 rgba(23,201,100,.6); } 62% { transform: scale(.92); } 70% { transform: scale(1); box-shadow: 0 0 0 14px rgba(23,201,100,0); } 100% { transform: scale(1); } }
.tap-pulse { animation: tapPulse 5s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.row-in { animation: rowIn .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-grow { transform-origin: bottom; animation: barGrow .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.win { animation: twinkle 4s ease-in-out infinite; }
@keyframes driveIn { 0% { transform: translateX(-180px); } 35% { transform: translateX(150px); } 55% { transform: translateX(150px); } 100% { transform: translateX(560px); } }
.car-drive { animation: driveIn 9s cubic-bezier(.45,.05,.35,1) infinite; }
@keyframes barrier { 0%, 30% { transform: rotate(0deg); } 38%, 62% { transform: rotate(-78deg); } 70%, 100% { transform: rotate(0deg); } }
.barrier { transform-box: fill-box; transform-origin: 0% 50%; animation: barrier 9s ease-in-out infinite; }
@keyframes bubble { 0%, 28% { opacity: 0; transform: translateY(10px) scale(.8); } 34%, 64% { opacity: 1; transform: none; } 70%, 100% { opacity: 0; transform: translateY(-8px); } }
.bubble { transform-box: fill-box; transform-origin: center bottom; animation: bubble 9s ease infinite; }
@keyframes cloud { from { transform: translateX(-120px); } to { transform: translateX(900px); } }
.cloud { animation: cloud 40s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.spin-slow { animation: spinSlow 18s linear infinite; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
.progress-run { animation: progress 6s linear both; }
.device-phone { width: 270px; height: 550px; border-radius: 44px; padding: 12px; background: linear-gradient(145deg, #27272A, #09090B); box-shadow: 0 40px 80px -20px rgba(0,0,0,.5), inset 0 0 0 2px #3F3F46; position: relative; }
.device-phone .screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #FAFAFA; position: relative; }
.device-phone .notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 99px; background: #09090B; z-index: 5; }
.device-tablet { width: 100%; max-width: 560px; aspect-ratio: 4/3; border-radius: 30px; padding: 14px; background: linear-gradient(145deg, #27272A, #09090B); box-shadow: 0 40px 80px -20px rgba(0,0,0,.5), inset 0 0 0 2px #3F3F46; }
.device-tablet .screen { width: 100%; height: 100%; border-radius: 18px; overflow: hidden; background: #FAFAFA; }
.device-laptop { width: 100%; max-width: 620px; }
.device-laptop .lid { border-radius: 18px 18px 0 0; padding: 12px 12px 14px; background: linear-gradient(145deg, #27272A, #09090B); box-shadow: inset 0 0 0 2px #3F3F46; }
.device-laptop .screen { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: #FAFAFA; }
.device-laptop .base { height: 16px; margin: 0 -28px; border-radius: 0 0 22px 22px; background: linear-gradient(#D4D4D8, #A1A1AA); box-shadow: 0 30px 50px -20px rgba(0,0,0,.45); }
.tilt { transition: transform .3s ease-out; transform-style: preserve-3d; will-change: transform; }

/* ---------- Realistic motion (v2) ---------- */
@keyframes kb { from { transform: scale(1.06) translate3d(0,0,0); } to { transform: scale(1.18) translate3d(-2.5%,-1.5%,0); } }
.kenburns { animation: kb 28s ease-in-out infinite alternate; will-change: transform; }
.t-spring { transition: opacity .45s ease, transform .65s cubic-bezier(.34,1.45,.64,1), filter .45s ease; }
.t-out { transition: opacity .28s ease-in, transform .32s ease-in, filter .28s ease-in; }
.t-from-top { opacity: 0; transform: translateY(-46px) scale(.94); filter: blur(4px); }
.t-from-bottom { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(4px); }
.t-shrink { opacity: 0; transform: scale(.9); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-18px) scale(.98); filter: blur(3px); max-height: 0; } 60% { filter: none; } to { opacity: 1; transform: none; max-height: 90px; } }
.feed-in { animation: feedIn .7s cubic-bezier(.22,1,.36,1) both; overflow: hidden; }
.pressed { transform: scale(.92) !important; filter: brightness(.9); }
.press-t { transition: transform .18s ease, filter .18s ease; }
@keyframes recBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .2; } }
.rec { animation: recBlink 1.2s steps(1) infinite; }
.scanlines { background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; pointer-events: none; }
.vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.55) 100%); pointer-events: none; }
@keyframes noise { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-1%,1%); } 40% { transform: translate(1%,-1%); } 60% { transform: translate(-1%,-1%); } 80% { transform: translate(1%,1%); } }
.cam-jitter { animation: noise 6s steps(6) infinite; }
@keyframes scanBox { 0%,100% { opacity: 0; transform: scale(1.15); } 15%, 70% { opacity: 1; transform: scale(1); } }
.detect-box { animation: scanBox 5s ease-in-out infinite; }
.iphone { width: 292px; height: 604px; border-radius: 56px; padding: 11px; background: linear-gradient(160deg, #2c2c2e, #0b0b0c 60%); box-shadow: 0 0 0 1.5px #48484a, 0 0 0 4px #111, 0 60px 120px -30px rgba(0,0,0,.75), 0 30px 60px -30px rgba(0,111,238,.35); position: relative; }
.iphone::before { content: ''; position: absolute; right: -4px; top: 150px; width: 4px; height: 80px; border-radius: 0 3px 3px 0; background: #2c2c2e; }
.iphone::after { content: ''; position: absolute; inset: 11px; border-radius: 45px; background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 32%); pointer-events: none; z-index: 40; }
.iphone .screen { border-radius: 45px; overflow: hidden; height: 100%; background: #F2F2F7; position: relative; color: #18181B; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 98px; height: 29px; background: #000; border-radius: 20px; z-index: 35; transition: all .55s cubic-bezier(.34,1.35,.64,1); overflow: hidden; color: #fff; }
.island.open { width: 252px; height: 62px; border-radius: 30px; }
.ios-banner { background: rgba(246,246,248,.86); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border-radius: 22px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.28); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }