body { background: #F8FAFC; color: #0f172a; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.show { opacity: 1; transform: none; }
.float { animation: float 5s ease-in-out infinite; }
.float-slow { animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.grad-text { background: linear-gradient(90deg, #0F766E, #14b8a6, #0F766E); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 4s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: #0F766E; transition: width .3s; }
.nav-link:hover::after { width: 100%; }
.blob { position: absolute; border-radius: 9999px; filter: blur(70px); opacity: .45; z-index: 0; }
.modal-bg { background: rgba(15,23,42,.55); backdrop-filter: blur(6px); }
@keyframes fadeIn { from { opacity:0; transform: translateY(14px);} to { opacity:1; transform:none; } }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; border-radius: .95rem; cursor: pointer; transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .6s ease, background .6s, color .5s, border-color .5s; }
.btn:active { transform: scale(.97) !important; transition-duration: .15s; }
.btn .arrow { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow { transform: translateX(6px); }

.btn-primary { color: #fff; background: linear-gradient(135deg, #0F766E, #14b8a6, #0F766E); background-size: 220% 220%; background-position: 0% 50%; box-shadow: 0 12px 26px -8px rgba(15,118,110,.65); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .6s ease, background-position .9s ease; }
.btn-primary:hover { transform: translateY(-4px); background-position: 100% 50%; box-shadow: 0 22px 40px -10px rgba(15,118,110,.7); }
.btn-accent { color: #0F766E; background: linear-gradient(135deg, #FEF08A, #FCD34D); box-shadow: 0 12px 26px -8px rgba(245,158,11,.55); }
.btn-accent:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 22px 40px -10px rgba(245,158,11,.65); }
.btn-outline { color: #0F766E; background: #fff; border: 1.5px solid #99f6e4; }
.btn-outline:hover { transform: translateY(-4px); background: #f0fdfa; border-color: #0F766E; box-shadow: 0 18px 32px -14px rgba(15,118,110,.45); }
.btn-ghost { color: #334155; }
.btn-ghost:hover { color: #0F766E; background: #f0fdfa; }
.btn-white { color: #0F766E; background: #fff; }
.btn-white:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -12px rgba(0,0,0,.3); }

.btn-shine::before { content: ''; position: absolute; top: 0; left: -80%; width: 55%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-22deg); z-index: -1; }
.btn-shine:hover::before { animation: sweep 1.4s ease; }
@keyframes sweep { to { left: 140%; } }

.btn-pulse { animation: ringPulse 3.4s infinite; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(20,184,166,.5); } 70% { box-shadow: 0 0 0 18px rgba(20,184,166,0); } 100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); } }
.btn-pulse-gold { animation: ringPulseGold 3.4s infinite; }
@keyframes ringPulseGold { 0% { box-shadow: 0 0 0 0 rgba(252,211,77,.7); } 70% { box-shadow: 0 0 0 18px rgba(252,211,77,0); } 100% { box-shadow: 0 0 0 0 rgba(252,211,77,0); } }

.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: ripple 1.1s ease-out; pointer-events: none; z-index: 0; }
.btn-outline .ripple, .btn-ghost .ripple, .btn-white .ripple, .btn-accent .ripple, .btn-google .ripple { background: rgba(15,118,110,.22); }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.btn-spinner { position: absolute; width: 24px; height: 24px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: spin 1s linear infinite; }
.btn.loading .btn-label { opacity: 0; }
.btn.loading .btn-spinner { opacity: 1; }
.btn.loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   AUTH MODAL
   ========================================================= */
body[data-auth="in"] .auth-out { display: none !important; }
body[data-auth="out"] .auth-in { display: none !important; }

.modal-bg { background: rgba(15,23,42,.62); backdrop-filter: blur(10px); animation: bgIn .6s ease; }
@keyframes bgIn { from { opacity: 0; } to { opacity: 1; } }
.auth-card { animation: cardIn 1s cubic-bezier(.16,.9,.3,1.05); }
@keyframes cardIn { from { opacity: 0; transform: translateY(50px) scale(.93); } to { opacity: 1; transform: none; } }

.auth-side { background: linear-gradient(135deg, #064e3b, #0F766E, #14b8a6, #0d9488); background-size: 300% 300%; animation: gradShift 18s ease infinite; }
@keyframes gradShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.bubble { position: absolute; bottom: -120px; left: var(--l); width: var(--s); height: var(--s); border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); animation: rise var(--t) linear infinite; animation-delay: var(--d); }
@keyframes rise { to { transform: translateY(-760px) rotate(180deg); opacity: 0; } }
.swap-anim { animation: swapIn .9s cubic-bezier(.2,.8,.2,1); }
@keyframes swapIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.form-swap { animation: formIn .9s cubic-bezier(.2,.8,.2,1); }
@keyframes formIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

.tab-wrap { position: relative; display: flex; background: #f1f5f9; padding: 6px; border-radius: 1rem; }
#tabIndicator { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px); background: #fff; border-radius: .75rem; box-shadow: 0 8px 18px -8px rgba(15,118,110,.5); transition: transform .8s cubic-bezier(.5,1.3,.4,1); }
.tab-btn { position: relative; z-index: 1; flex: 1; padding: .75rem 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; transition: color .6s; }
.tab-btn.active { color: #0F766E; }

/* Stepper */
.step-dot { display: flex; align-items: center; gap: .55rem; font-size: .75rem; font-weight: 700; color: #94a3b8; transition: color .6s; }
.step-dot b { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e2e8f0; color: #64748b; font-size: .8rem; transition: all .7s cubic-bezier(.2,.8,.2,1); }
.step-dot.active { color: #0F766E; }
.step-dot.active b { background: linear-gradient(135deg, #0F766E, #14b8a6); color: #fff; box-shadow: 0 8px 16px -6px rgba(15,118,110,.6); transform: scale(1.1); }
.step-dot.done b { background: #10b981; color: #fff; }
.step-line { flex: 1; height: 4px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.step-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0F766E, #14b8a6); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.step-line.full i { width: 100%; }

/* Floating-label fields */
.field { position: relative; }
.field input, .field select { width: 100%; padding: 1.4rem 1rem .5rem 2.9rem; border-radius: 1rem; border: 1.5px solid #e2e8f0; background: #f8fafc; font-size: .92rem; color: #0f172a; outline: none; transition: border-color .5s, box-shadow .6s, background .5s; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer; }
.field.has-eye input { padding-right: 3rem; }
.field input:hover, .field select:hover { border-color: #99f6e4; }
.field input:focus, .field select:focus { border-color: #0F766E; background: #fff; box-shadow: 0 0 0 5px rgba(15,118,110,.13); }
.field label { position: absolute; left: 2.9rem; top: 50%; transform: translateY(-50%); font-size: .92rem; color: #94a3b8; pointer-events: none; transition: all .4s ease; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label, .field select ~ label { top: .95rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #0F766E; }
.field .f-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1.15rem; height: 1.15rem; color: #94a3b8; transition: color .5s, transform .6s; }
.field:focus-within .f-icon { color: #0F766E; transform: translateY(-50%) scale(1.15); }
.field .chev { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: #94a3b8; pointer-events: none; }
.eye { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); padding: .45rem; border-radius: .6rem; color: #94a3b8; transition: all .4s; }
.eye:hover { color: #0F766E; background: #f0fdfa; }
.eye svg { width: 1.1rem; height: 1.1rem; }

.field-error { max-height: 0; opacity: 0; overflow: hidden; font-size: .72rem; font-weight: 600; color: #ef4444; transition: all .5s; padding-left: .4rem; }
.fw.invalid .field-error { max-height: 1.6rem; opacity: 1; margin-top: .3rem; }
.fw.invalid .field input, .fw.invalid .field select { border-color: #ef4444; background: #fef2f2; }
.fw.invalid .f-icon { color: #ef4444; }
.fw.invalid .chip span { border-color: #fca5a5; }
.shake { animation: shake .8s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

/* Class chips */
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid #e2e8f0; background: #f8fafc; font-size: .8rem; font-weight: 700; color: #475569; transition: all .5s cubic-bezier(.2,.8,.2,1); }
.chip:hover span { border-color: #5eead4; transform: translateY(-2px); }
.chip input:checked + span { background: linear-gradient(135deg, #0F766E, #14b8a6); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -8px rgba(15,118,110,.6); transform: translateY(-2px) scale(1.05); }
.chip input:focus-visible + span { outline: 3px solid rgba(15,118,110,.35); }

/* Password strength */
.seg { height: 5px; border-radius: 99px; background: #e2e8f0; transition: background .6s; }
#strengthBox[data-level="1"] .seg:nth-child(-n+1) { background: #ef4444; }
#strengthBox[data-level="2"] .seg:nth-child(-n+2) { background: #f59e0b; }
#strengthBox[data-level="3"] .seg:nth-child(-n+3) { background: #84cc16; }
#strengthBox[data-level="4"] .seg:nth-child(-n+4) { background: #10b981; }

/* Checkbox */
.chk { appearance: none; width: 1.15rem; height: 1.15rem; border: 1.5px solid #cbd5e1; border-radius: .35rem; display: inline-grid; place-content: center; cursor: pointer; transition: all .4s; flex-shrink: 0; background: #fff; }
.chk::after { content: ''; width: .55rem; height: .3rem; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .4s cubic-bezier(.2,1.6,.4,1); }
.chk:checked { background: #0F766E; border-color: #0F766E; }
.chk:checked::after { transform: rotate(-45deg) scale(1); }

/* Social buttons */
.btn-google { background: #fff; border: 1.5px solid #e2e8f0; color: #334155; }
.btn-google:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 16px 30px -14px rgba(15,23,42,.4); }
.btn-google svg { transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.btn-google:hover svg { transform: rotate(360deg) scale(1.1); }

/* Success */
.check-circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw 1.2s ease forwards; }
.check-path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .8s 1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pop { animation: pop 1s .1s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.confetti-piece { position: absolute; top: -10px; left: var(--x); width: 8px; height: 14px; background: var(--c); border-radius: 2px; opacity: 0; animation: confetti 3.8s var(--dl) ease-out forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(520px) rotate(var(--r)); } }

/* Fix: Homepage content visibility */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}