/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  height: 72px;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: height 500ms ease, background 500ms ease, border-color 500ms ease, box-shadow 500ms ease;
}

.site-header.is-scrolled {
  height: 56px;
  background: rgba(7, 30, 50, 0.9);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-progress {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #5FA85D, #0E9F8E, #1FB6D6);
  box-shadow: 0 0 8px rgba(14, 159, 142, 0.5);
  opacity: 0;
  transition: opacity 300ms ease;
}

.site-header.is-scrolled .header-progress { opacity: 1; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) { .header-inner { padding: 0 40px; } }
@media (min-width: 1024px) { .header-inner { padding: 0 80px; } }

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: height 500ms ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.site-header.is-scrolled .brand img {
  height: 28px;
  filter: none;
}

.brand-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
  white-space: nowrap;
}

.brand-tag {
  display: none;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 500ms ease, height 500ms ease;
}

@media (min-width: 640px) { .brand-tag { display: block; } }

.site-header.is-scrolled .brand-tag {
  opacity: 0;
  height: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 32px;
}

@media (min-width: 1024px) { .nav-desktop { display: flex; } }

.nav-desktop a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 0;
  white-space: nowrap;
  transition: color 300ms ease, font-size 500ms ease;
}

.site-header.is-scrolled .nav-desktop a { font-size: 13px; }

.nav-desktop a:hover,
.nav-desktop a.is-active { color: var(--teal); }

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--teal);
  transform: translateX(-50%);
  opacity: 0;
  transition: width 300ms ease, opacity 300ms ease;
}

.nav-desktop a.is-active::after,
.nav-desktop a:hover::after {
  width: 100%;
  opacity: 1;
}

.nav-desktop a:hover::after { opacity: 0.5; }
.nav-desktop a.is-active::after { opacity: 1; }

.header-actions {
  display: none;
  align-items: center;
  gap: 16px;
}

@media (min-width: 1024px) { .header-actions { display: flex; } }

.lang-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 500ms ease, width 500ms ease;
}

.lang-pair .is-on { color: var(--teal); }
.lang-pair a { color: rgba(255, 255, 255, 0.55); }
.lang-pair a:hover { color: #fff; }
.lang-sep { color: rgba(255, 255, 255, 0.25); }

.site-header.is-scrolled .lang-pair {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.mobile-drawer-foot .is-on { color: var(--teal); }
.mobile-drawer-foot a { color: rgba(255, 255, 255, 0.4); }
.mobile-drawer-foot .lang-sep { color: rgba(255, 255, 255, 0.12); }

html[dir="ltr"] .back-btn i { transform: scaleX(-1); }

.header-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
}

.site-header.is-scrolled .header-divider {
  opacity: 0;
  width: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 42px;
  box-sizing: border-box;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  transition: 300ms ease;
  white-space: nowrap;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.site-header.is-scrolled .btn-ghost {
  padding: 6px 14px;
  min-height: 36px;
  font-size: 12px;
  background: transparent;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  min-height: 42px;
  box-sizing: border-box;
  line-height: 1;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 16px rgba(14, 159, 142, 0.28);
  transition: 300ms ease;
  white-space: nowrap;
  cursor: pointer;
}

.header-journey-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-journey {
  padding-inline: 22px;
}

.header-user-menu {
  position: relative;
}

.header-user-trigger {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0E9F8E;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(14, 159, 142, 0.35);
  font-family: inherit;
}

.header-user-trigger:hover {
  transform: scale(1.05);
}

.header-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: 0;
  width: min(288px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(14, 159, 142, 0.15);
  background: #0A1E33;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  z-index: 120;
}

.header-user-dropdown[hidden] {
  display: none !important;
}

.header-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.header-user-dropdown-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #0E9F8E;
  background: linear-gradient(135deg, rgba(95, 190, 70, 0.25), rgba(14, 159, 142, 0.25));
}

.header-user-dropdown-id {
  min-width: 0;
}

.header-user-dropdown-id strong {
  display: block;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-dropdown-id span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-dropdown-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.header-user-stat {
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.header-user-stat strong {
  display: block;
  font-size: 16px;
  font-family: var(--mono, "IBM Plex Mono", monospace);
  margin-bottom: 4px;
}

.header-user-stat--green { color: #5FBE46; }
.header-user-stat--cyan { color: #1FB6D6; }

.header-user-stat span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.header-user-dropdown-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-user-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  text-align: inherit;
  transition: background 0.2s ease;
}

.header-user-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.header-user-link i {
  font-size: 16px;
  color: #0E9F8E;
}

.header-user-link--btn i {
  color: rgba(255, 255, 255, 0.35);
}

.header-user-logout-form {
  margin: 0;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 24px rgba(14, 159, 142, 0.45);
  filter: brightness(1.1);
}

.site-header.is-scrolled .btn-primary {
  padding: 8px 18px;
  min-height: 36px;
  font-size: 12px;
}

.site-header.is-scrolled .header-user-trigger {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
}

@media (min-width: 1024px) { .menu-toggle { display: none; } }

.menu-toggle.is-open { background: rgba(255, 255, 255, 0.08); }

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 51;
  width: min(320px, 85vw);
  display: flex;
  flex-direction: column;
  background: #0B1F33;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
  visibility: hidden;
  pointer-events: none;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1), visibility 400ms ease;
}

html[dir="rtl"] .mobile-drawer,
[dir="rtl"] .mobile-drawer { transform: translateX(-100%); }

html[dir="ltr"] .mobile-drawer,
[dir="ltr"] .mobile-drawer { transform: translateX(100%); }

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: -16px 0 64px rgba(0, 0, 0, 0.6);
}

@media (min-width: 1024px) {
  .mobile-drawer,
  .mobile-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

.mobile-drawer-head,
.mobile-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-drawer-foot {
  border-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: center;
  gap: 12px;
  font-size: 12px;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.mobile-drawer-body nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-body nav a {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.mobile-drawer-body nav a.is-active {
  color: var(--teal);
  background: rgba(14, 159, 142, 0.1);
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  background: var(--navy);
  border-top: 1px solid var(--line);
  overflow-x: clip;
}

.footer-glow {
  position: absolute;
  top: 0;
  inset-inline-end: 33%;
  width: min(500px, 100vw);
  max-width: 100%;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.03;
  background: radial-gradient(circle, #0E9F8E 0%, transparent 70%);
  transform: translateY(-50%);
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 64px 0;
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 64px;
    padding: 72px 0;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.footer-brand img { height: 36px; width: auto; }

.footer-brand span {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.footer-about {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 320px;
  margin: 0 0 32px;
}

.footer-start-lead {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 24px;
}

.footer-col h4 {
  color: #fff;
}

.socials { display: flex; gap: 12px; }

.socials a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  transition: 300ms ease;
}

.socials a:hover {
  border-color: rgba(95, 190, 70, 0.4);
  color: var(--green);
  background: rgba(95, 190, 70, 0.08);
  box-shadow: 0 0 20px rgba(95, 190, 70, 0.15);
  transform: scale(1.05);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 24px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col a {
  font-size: 14px;
  color: var(--muted);
  transition: color 200ms ease;
}

.footer-col a:hover { color: var(--green); }

.footer-cta-box {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(14, 159, 142, 0.15);
  background: rgba(14, 159, 142, 0.04);
  backdrop-filter: blur(20px);
}

.footer-cta-glow {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.06;
  background: radial-gradient(circle, #5FBE46 0%, transparent 70%);
  transform: translate(30%, -30%);
}

.footer-cta-btn {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 14px 20px;
  border-radius: 16px;
  background: #0E9F8E;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 25px rgba(14, 159, 142, 0.25);
  transition: transform 300ms ease;
}

.footer-cta-btn:hover {
  color: #fff;
  transform: scale(1.02);
}

.footer-cta-box .btn-primary {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 16px;
  color: #fff;
}

.footer-cta-box .btn-primary:hover {
  color: #fff;
}

.footer-cta-box .ghost-link {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.footer-cta-box .ghost-link:hover { color: var(--green); }

.footer-bottom {
  position: relative;
  z-index: 1;
  padding: 24px 0 32px;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 640px) {
  .footer-bottom-inner { flex-direction: row; }
}

.footer-bottom p,
.footer-vision {
  font-size: 12px;
  color: var(--muted-3);
  margin: 0;
}

.footer-vision {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.6s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.auth-layout .site-header,
.auth-layout .site-footer { display: none; }
