:root {
  --navy: #0b1d4a;
  --deep: #0f2c75;
  --blue: #1e7adf;
  --cyan: #6ed6ff;
  --mint: #7fe2b0;
  --white: #ffffff;
  --text: #0f1b2d;
  --soft: #f6f7fb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--soft);
  color: var(--text);
  overflow-x: hidden;
}

.hero {
  position: relative;
  min-height: 72vh;
  color: var(--white);
  background: radial-gradient(circle at top left, #234b9f 0%, #0b1d4a 55%, #091537 100%);
  overflow: hidden;
}

.glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(110, 214, 255, 0.35), transparent 55%);
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 8vw;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3ad1ff, #2c7bff);
  display: grid;
  place-items: center;
  position: relative;
}

.logo span {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  transform: rotate(45deg);
}

.logo span:nth-child(2) {
  width: 14px;
  height: 14px;
}

.logo span:nth-child(3) {
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
}

.links {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}

.links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
}

.links a:hover {
  opacity: 1;
}

.cta {
  background: linear-gradient(135deg, #2b8cff, #3ac7ff);
  color: var(--white);
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(23, 116, 255, 0.35);
  cursor: pointer;
}

.cta.large {
  margin-top: 26px;
  font-size: 1rem;
  padding: 12px 28px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 40px;
  padding: 40px 8vw 90px;
}

.copy h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.4rem, 3.8vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 18px;
}

.copy p {
  font-size: 1.05rem;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.85);
}

.visual {
  position: relative;
  min-height: 320px;
}

.platform {
  position: absolute;
  right: 0;
  top: 40px;
  width: 280px;
  height: 220px;
  background: linear-gradient(160deg, rgba(44, 125, 255, 0.9), rgba(25, 70, 180, 0.9));
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(6, 30, 88, 0.6);
  display: grid;
  place-items: center;
}

.shield {
  position: relative;
  width: 140px;
  height: 140px;
  background: linear-gradient(180deg, #2bd3ff, #2568ff);
  border-radius: 28px;
  transform: rotate(45deg);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.45);
}

.shield .ring {
  position: absolute;
  inset: 12px;
  border: 4px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
}

.shield .inner {
  position: absolute;
  inset: 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
}

.shield .check {
  position: absolute;
  width: 36px;
  height: 18px;
  border-left: 6px solid #1dbf7b;
  border-bottom: 6px solid #1dbf7b;
  transform: rotate(-45deg);
  left: 52px;
  top: 58px;
}

.nodes span {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #a3f3ff;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(163, 243, 255, 0.7);
}

.nodes span:nth-child(1) {
  top: 40px;
  left: -12px;
}

.nodes span:nth-child(2) {
  bottom: 50px;
  left: 20px;
}

.nodes span:nth-child(3) {
  top: 30px;
  right: -12px;
}

.nodes span:nth-child(4) {
  bottom: 40px;
  right: 20px;
}

.device {
  position: absolute;
  width: 140px;
  height: 90px;
  background: linear-gradient(160deg, rgba(62, 191, 255, 0.8), rgba(30, 90, 200, 0.8));
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(10, 44, 110, 0.5);
}

.device-left {
  left: 10px;
  bottom: 10px;
}

.device-right {
  right: 20px;
  bottom: -10px;
}

.wave {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  height: 120px;
  background: radial-gradient(circle at 50% 0%, #f6f7fb 10%, rgba(255, 255, 255, 0.95) 60%);
  border-top-left-radius: 50% 70px;
  border-top-right-radius: 50% 70px;
}

.trust {
  padding: 100px 10vw 120px;
  text-align: center;
}

.trust h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 18px;
}

.trust p {
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
  color: #485266;
}

.services {
  padding: 80px 8vw 100px;
  background: var(--white);
}

.services h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  text-align: center;
  margin-bottom: 50px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--soft);
  border-radius: 20px;
  padding: 36px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(11, 29, 74, 0.12);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

.service-card h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-card p {
  color: #485266;
  line-height: 1.6;
  font-size: 0.95rem;
}

.contact {
  padding: 80px 8vw 100px;
  background: var(--soft);
  text-align: center;
}

.contact h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 18px;
}

.contact > p {
  max-width: 560px;
  margin: 0 auto 40px;
  color: #485266;
  line-height: 1.7;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #dde2eb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.contact-form textarea {
  resize: vertical;
  margin-bottom: 8px;
}

.footer {
  background: var(--navy);
  color: var(--white);
  padding: 50px 8vw;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ── Language switcher ──────────────────────────────────────────────── */

.lang-switcher {
  position: relative;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  min-width: 140px;
  z-index: 200;
  overflow: hidden;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s;
}

.lang-dropdown a:hover {
  background: #f3f4f6;
}

.lang-dropdown a.active {
  font-weight: 600;
  color: #1e7adf;
  background: #eff6ff;
}

/* ── Profile dropdown ──────────────────────────────────────────────── */

.profile-menu {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 14px 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e7adf, #3ac7ff);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}

.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.profile-dropdown.open {
  display: block;
}

.profile-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.profile-dropdown-header .pd-name {
  font-weight: 600;
  color: #0f1b2d;
  font-size: 0.9rem;
}

.profile-dropdown-header .pd-email {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 2px;
}

.profile-dropdown a,
.profile-dropdown-lang a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s;
}

.profile-dropdown a:hover,
.profile-dropdown-lang a:hover {
  background: #f3f4f6;
}

.profile-dropdown a svg {
  width: 16px;
  height: 16px;
  color: #6b7280;
  flex-shrink: 0;
}

.profile-dropdown-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 0;
}

.profile-dropdown-lang {
  padding: 6px 0;
  border-top: 1px solid #f3f4f6;
}

.profile-dropdown-lang .pd-lang-label {
  padding: 6px 16px 4px;
  font-size: 0.72rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.profile-dropdown-lang a.active {
  color: #1e7adf;
  font-weight: 600;
  background: #eff6ff;
}

.profile-dropdown-lang a .lang-check {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #1e7adf;
  display: none;
}

.profile-dropdown-lang a.active .lang-check {
  display: block;
}

.profile-dropdown .pd-signout {
  color: #dc2626;
  border-top: 1px solid #f3f4f6;
}

.profile-dropdown .pd-signout svg {
  color: #dc2626;
}

.profile-dropdown .pd-signout:hover {
  background: #fef2f2;
}

/* ── Password toggle eye ───────────────────────────────────────────── */

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 44px;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
}

.pw-toggle:hover {
  color: #6b7280;
}

.pw-toggle svg {
  width: 20px;
  height: 20px;
}

.pw-toggle .icon-hide { display: none; }
.pw-toggle.visible .icon-show { display: none; }
.pw-toggle.visible .icon-hide { display: block; }

/* ── Mobile hamburger menu (shared across all pages) ───────────────── */

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: white;
  z-index: 101;
}

.hamburger svg {
  width: 26px;
  height: 26px;
  display: block;
}

.hamburger .icon-close { display: none; }
.hamburger.open .icon-menu { display: none; }
.hamburger.open .icon-close { display: block; }

@media (max-width: 780px) {
  .links {
    display: none;
  }

  .platform {
    position: relative;
    width: 100%;
    right: auto;
  }

  .device {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Hamburger visible on mobile */
  .hamburger {
    display: block;
  }

  /* Prevent horizontal overflow everywhere */
  .hero-content,
  .services,
  .trust,
  .contact,
  .footer {
    overflow-x: hidden;
  }

  /* Dashboard nav (authenticated pages) */
  .dashboard-nav {
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .dashboard-nav .user-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 12px;
  }

  .dashboard-nav .user-menu.open {
    display: flex;
  }

  .dashboard-nav .user-menu .nav-link,
  .dashboard-nav .user-menu .logout-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    box-sizing: border-box;
  }

  .dashboard-nav .user-menu .nav-link:hover,
  .dashboard-nav .user-menu .logout-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .dashboard-nav .user-menu .profile-menu {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 8px;
    margin-top: 4px;
  }

  .dashboard-nav .user-menu .profile-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
  }

  .dashboard-nav .user-menu .profile-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 8px;
    margin-top: 4px;
  }

  .dashboard-nav .user-menu .profile-dropdown a {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
  }

  .dashboard-nav .user-menu .profile-dropdown a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .dashboard-nav .user-menu .profile-dropdown-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .dashboard-nav .user-menu .profile-dropdown-header .pd-name { color: white; }
  .dashboard-nav .user-menu .profile-dropdown-header .pd-email { color: rgba(255,255,255,0.6); }

  .dashboard-nav .user-menu .profile-dropdown-divider,
  .dashboard-nav .user-menu .profile-dropdown-lang {
    border-color: rgba(255, 255, 255, 0.1);
  }

  .dashboard-nav .user-menu .profile-dropdown-lang .pd-lang-label { color: rgba(255,255,255,0.5); }
  .dashboard-nav .user-menu .profile-dropdown-lang a { color: rgba(255,255,255,0.9); }
  .dashboard-nav .user-menu .profile-dropdown-lang a.active { color: #3ac7ff; background: rgba(255,255,255,0.08); }
  .dashboard-nav .user-menu .profile-dropdown .pd-signout { color: #fca5a5; border-color: rgba(255,255,255,0.1); }
  .dashboard-nav .user-menu .profile-dropdown .pd-signout svg { color: #fca5a5; }

  /* Public top-nav (legal, contact, index) */
  .top-nav .nav-links,
  .nav .nav-links,
  .nav-inner .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 12px;
  }

  .top-nav .nav-links.open,
  .nav .nav-links.open,
  .nav-inner .nav-links.open {
    display: flex;
  }

  .top-nav {
    flex-wrap: wrap;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0b1d4a, #1e3a7a);
  }

  .top-nav .nav-links a,
  .nav .nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav-inner {
    flex-wrap: wrap;
  }
}
