/* ============================================================
   TENSA — style.css
   Shared styles: reset · variables · navbar · auth · footer
   ============================================================ */

/* ─── RESET ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── VARIABLES ─── */
:root {
  --pink: #25D366;
  --pink-dark: #c4093a;
  --pink-glow: rgba(241, 12, 69, 0.40);
  --pink-glow-soft: rgba(241, 12, 69, 0.12);
  --black: #000000;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --white-60: rgba(255, 255, 255, 0.6);
  --white-30: rgba(255, 255, 255, 0.3);
  --font-head: 'Inter Tight', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: monospace;
  --nav-h: 72px;
  --max-w: 1200px;
  --radius: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── BASE ─── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 2px;
}

/* ─── BACKGROUND GLOW ─── */
.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(241, 12, 69, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.3s var(--ease), backdrop-filter 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  color: var(--white);
}

.nav-logo-img {
  width: clamp(60px, 10vw, 80px);
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white-60);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--white);
  background: var(--surface-hover);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--white-30);
}

.lang-btn {
  color: inherit;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s;
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.active {
  color: var(--pink);
  font-weight: 700;
}

.lang-divider {
  opacity: 0.2;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: btn-ripple 0.5s linear;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

@keyframes btn-ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-mid);
  color: var(--white);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-solid {
  background: var(--pink);
  color: var(--white);
  border: 1px solid transparent;
}

.btn-solid:hover {
  background: var(--pink-dark);
  box-shadow: 0 0 28px var(--pink-glow);
  transform: translateY(-1px);
}

/* ════════════════════════════════════════
   AUTH — SHARED LAYOUT
════════════════════════════════════════ */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) 20px 56px;
  position: relative;
  z-index: 2;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
}

.card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  margin-bottom: 36px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 14px var(--pink);
  animation: dot-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dot-pulse {

  0%,
  100% {
    box-shadow: 0 0 14px var(--pink);
  }

  50% {
    box-shadow: 0 0 28px var(--pink);
    transform: scale(1.15);
  }
}

.card h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.sub {
  color: var(--white-60);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* ─── Form fields ─── */
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--white-30);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
}

.input-wrap {
  position: relative;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.95rem;
  padding: 12px 16px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.input-wrap input[type="password"],
.input-wrap input[type="text"] {
  padding-right: 44px;
}

input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(241, 12, 69, 0.2);
}

input.is-error {
  border-color: var(--pink) !important;
  box-shadow: 0 0 8px rgba(241, 12, 69, 0.3) !important;
}

input.is-success {
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

/* Phone hint */
.phone-hint {
  font-size: 0.72rem;
  color: var(--white-30);
  margin-top: 5px;
}

/* Password strength */
.pwd-strength {
  margin-top: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pwd-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s, background 0.3s;
}

.pwd-strength-label {
  font-size: 0.7rem;
  margin-top: 4px;
  color: var(--white-30);
  min-height: 1em;
}

/* Password toggle */
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-30);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  line-height: 0;
}

.pwd-toggle:hover {
  color: var(--white-60);
}

.pwd-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Forgot link */
.forgot {
  margin-top: 6px;
  text-align: right;
}

.forgot a {
  font-size: 0.78rem;
  color: var(--white-30);
  transition: color 0.2s;
}

.forgot a:hover {
  color: var(--pink);
}

/* Checkboxes */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--pink);
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-row label {
  font-size: 0.82rem;
  color: var(--white-60);
  letter-spacing: 0;
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox-row label a {
  color: var(--pink);
  text-decoration: underline;
}

.checkbox-row.chk-error label {
  color: var(--pink);
}

/* Trial note */
.trial-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--white-30);
  margin-top: 12px;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--pink);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  background: var(--pink-dark);
  box-shadow: 0 0 40px var(--pink-glow);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Login / signup link */
.login-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--white-60);
  margin-top: 20px;
}

.login-link a {
  color: var(--pink);
  font-weight: 600;
  margin-left: 4px;
}

.login-link a:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.88rem;
  color: var(--white);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
#footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-30);
  margin-top: 12px;
  letter-spacing: 0.06em;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--white-30);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-link {
  display: block;
  font-size: 0.88rem;
  color: var(--white-60);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--white);
}

.footer-logo img {
  width: clamp(300px, 10vw, 180px);
  height: auto;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-60);
  transition: all 0.2s;
}

.social-icon svg {
  width: 16px;
  height: 16px;
}

.social-icon:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
  box-shadow: 0 0 20px var(--pink-glow);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--white-30);
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 8px;
    padding: 24px 20px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.35s;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 36px 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}