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

:root {
  --green-deep: #0F3D2E;
  --green-mid: #1A5C42;
  --green-vivid: #2A8B5E;
  --green-light: #3DB87A;
  --white: #FFFFFF;
  --white-soft: rgba(255, 255, 255, 0.72);
  --white-line: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.62);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--white);
  overflow-x: hidden;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    linear-gradient(180deg, rgba(3, 31, 0, 0.2) 0%, rgba(7, 69, 0, 0.25) 100%),
    url('../medias/images/loggin-bg-image.png') center center / cover no-repeat;
}

body.menu-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 5vw;
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 28px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 30, 20, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.25);
  transition: background .4s, box-shadow .4s, border-color .4s, backdrop-filter .4s;
}

nav.scrolled {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 30, 20, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.25);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--white);
}

.nav-logo img {
  display: block;
  height: 42px;
  width: auto;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.nav-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  list-style: none;
  min-width: 0;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: color .25s;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green-light);
  transition: width .3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border: 1px solid rgba(61, 184, 122, 0.5);
  background: transparent !important;
  color: var(--green-light) !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600 !important;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: background .25s, border-color .25s, color .25s, transform .2s !important;
}

.nav-cta:hover {
  background: rgba(61, 184, 122, 0.1) !important;
  border-color: rgba(61, 184, 122, 0.8);
  color: #7be0a1 !important;
  transform: translateY(-1px);
}

.nav-cta::after {
  display: none !important;
}

.lang-toggle,
.mobile-lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(17, 17, 25, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lang-toggle-btn,
.mobile-lang-toggle-btn {
  border: 0;
  min-width: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s, transform .2s, box-shadow .25s;
}

.lang-toggle-btn:hover,
.mobile-lang-toggle-btn:hover {
  color: var(--white);
}

.lang-toggle-btn.active,
.mobile-lang-toggle-btn.active {
  background: var(--green-vivid);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(42, 139, 94, 0.24);
}

.lang-toggle-btn:focus-visible,
.mobile-lang-toggle-btn:focus-visible {
  outline: 2px solid rgba(61, 184, 122, 0.8);
  outline-offset: 2px;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 12px;
  margin-left: auto;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
  transform-origin: center;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  z-index: 999;
  background: rgba(8, 8, 14, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: right .4s var(--ease-out);
  overflow: hidden;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 112px 8vw 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--white);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 8px 0;
  transition: color .2s;
}

.mobile-menu a:hover {
  color: var(--green-light);
}

.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  min-width: 220px;
  min-height: 50px;
  padding: 16px 44px;
  font-size: 17px;
  line-height: 1;
}

.mobile-nav-tools {
  display: none;
  margin: 16px 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
}

.portal-shell {
  position: relative;
  min-height: 100svh;
}

.portal-overlay {
  display: none;
}

.portal-auth {
  position: relative;
  min-height: 100svh;
  z-index: 1;
}

.portal-copy {
  position: absolute;
  left: 5vw;
  bottom: 220px;
  width: 35%;
  max-width: 560px;
  display: grid;
  gap: 18px;
  isolation: isolate;
  z-index: 1;
}

.portal-copy::before {
  content: '';
  position: absolute;
  inset: -44px -54px -48px -42px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 24% 28%, rgba(6, 18, 10, 0.6) 0%, rgba(6, 18, 10, 0.46) 34%, rgba(6, 18, 10, 0.14) 62%, rgba(6, 18, 10, 0) 84%),
    linear-gradient(180deg, rgba(6, 18, 10, 0.18), rgba(6, 18, 10, 0.02));
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.portal-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--green-light);
}

.portal-eyebrow span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-light);
}

.portal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(64px, 6vw, 92px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--white);
}

.portal-title em {
  font-style: italic;
  color: var(--green-light);
}

.portal-desc {
  max-width: 34ch;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white);
}

.portal-form {
  position: absolute;
  right: 220px;
  bottom: 220px;
  width: 320px;
  max-width: 320px;
  display: grid;
  gap: 34px;
  isolation: isolate;
  z-index: 1;
}

.portal-form::before {
  content: '';
  position: absolute;
  inset: -38px -42px -54px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(6, 18, 10, 0.16) 0%, rgba(6, 18, 10, 0.42) 45%, rgba(6, 18, 10, 0.58) 100%),
    radial-gradient(circle at 50% 16%, rgba(6, 18, 10, 0.2), rgba(6, 18, 10, 0) 72%);
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}

.portal-field {
  width: 100%;
}

.portal-field input {
  width: 100%;
  padding: 0 0 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--white-line);
  background: none !important;
  background-color: transparent !important;
  color: var(--white);
  text-align: center;
  font: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
}

.portal-field input::placeholder {
  color: var(--white);
  opacity: 1;
}

.portal-field input:focus {
  border-bottom-color: var(--white);
}

.portal-field input:-webkit-autofill,
.portal-field input:-webkit-autofill:hover,
.portal-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-out 0s;
}

.portal-submit {
  width: 100%;
  min-height: 65px;
  margin-top: 12px;
  border: 1px solid rgba(61, 184, 122, 0.24);
  border-radius: 999px;
  background: rgba(42, 139, 94, 0.75);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  color: var(--white);
  font: inherit;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .24s var(--ease-out), background .24s ease, border-color .24s ease;
}

.portal-submit:hover {
  transform: translateY(-1px);
  background: rgba(61, 184, 122, 0.78);
  border-color: rgba(61, 184, 122, 0.42);
}

.portal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white-soft);
  font-size: 16px;
  line-height: 1.2;
}

.portal-links a {
  color: var(--white-soft);
  text-decoration: none;
  transition: color .2s ease;
}

.portal-links a:hover {
  color: var(--white);
}

@supports not ((backdrop-filter: blur(15px)) or (-webkit-backdrop-filter: blur(15px))) {
  .portal-submit {
    background: rgba(42, 139, 94, 0.9);
  }
}

@media (max-width: 1180px) {
  .nav-center {
    gap: 18px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .portal-copy {
    width: 35%;
    max-width: 460px;
  }
}

@media (max-width: 960px) {
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
    min-height: 72px;
    padding: 14px 5vw;
  }

  .nav-center,
  .nav-tools {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .nav-logo img {
    height: 36px;
  }

  .mobile-nav-tools {
    display: flex;
  }

  .portal-auth {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 108px 20px calc(52px + env(safe-area-inset-bottom, 0px));
  }

  .portal-copy {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 90px;
    gap: 12px;
  }

  .portal-title {
    font-size: clamp(48px, 10vw, 66px);
    line-height: 0.9;
  }

  .portal-desc {
    max-width: 29ch;
    font-size: 15px;
    line-height: 1.58;
  }

  .portal-copy::before {
    inset: -22px -16px -22px -16px;
    border-radius: 26px;
    background:
      linear-gradient(180deg, rgba(6, 18, 10, 0.34) 0%, rgba(6, 18, 10, 0.18) 100%),
      radial-gradient(circle at 32% 24%, rgba(6, 18, 10, 0.52), rgba(6, 18, 10, 0) 78%);
    filter: blur(14px);
  }

  .portal-form {
    position: static;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    gap: 28px;
  }

  .portal-form::before {
    inset: -18px -14px -28px;
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(6, 18, 10, 0.16) 0%, rgba(6, 18, 10, 0.48) 60%, rgba(6, 18, 10, 0.62) 100%);
    filter: blur(14px);
  }

  .portal-field input {
    font-size: 18px;
    padding-bottom: 12px;
  }

  .portal-submit {
    min-height: 65px;
    font-size: 18px;
    margin-top: 6px;
  }

  .portal-links {
    font-size: 13px;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .portal-auth {
    padding: 118px 22px calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .portal-copy {
    max-width: 340px;
    margin: 0 auto 86px;
    gap: 10px;
  }

  .portal-eyebrow {
    gap: 10px;
  }

  .portal-eyebrow::before {
    width: 28px;
  }

  .portal-eyebrow span {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .portal-title {
    font-size: clamp(46px, 12vw, 54px);
    line-height: 0.88;
  }

  .portal-desc {
    max-width: 26ch;
    font-size: 14px;
    line-height: 1.55;
  }

  .portal-copy::before {
    inset: -18px -12px -18px;
    border-radius: 22px;
    filter: blur(12px);
  }

  .portal-form {
    max-width: 340px;
    gap: 22px;
    padding-bottom: 0;
  }

  .portal-form::before {
    inset: -14px -12px -20px;
    border-radius: 24px;
    filter: blur(12px);
  }

  .portal-field input {
    font-size: 18px;
    padding-bottom: 10px;
  }

  .portal-submit {
    min-height: 65px;
    font-size: 18px;
    margin-top: 4px;
  }

  .portal-links {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
  }
}
