:root {
  --navy: #0f2442;
  --navy-input: #2a3b4e;
  --white: #ffffff;
  --muted: #f1f3f7;
  --red: #e64136;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.site-header {
  width: calc(100% - 180px);
  max-width: 1560px;
  height: 136px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 42px;
}

.logo-link {
  display: inline-flex;
  line-height: 0;
}

.logo-link img {
  display: block;
  width: 162px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 37px;
  padding-top: 38px;
  padding-right: 20px;
}

.site-nav a,
.site-nav button {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: #f7f8fb;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}

.site-nav .active::before {
  content: "•";
  position: absolute;
  left: -10px;
  top: -1px;
  font-size: 12px;
}

.hero-shell {
  width: calc(100% - 280px);
  max-width: 1456px;
  margin: 0 auto;
  min-height: calc(100vh - 136px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(520px, 0.95fr);
  gap: 72px;
  align-items: start;
  padding-top: 102px;
}

.hero-copy {
  padding-top: 0;
}

.hero-copy h1 {
  margin: 0;
  max-width: 690px;
  font-size: clamp(48px, 3.4vw, 59px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -1.6px;
}

.hero-description {
  max-width: 715px;
  margin: 28px 0 0;
  color: #f4f5f8;
  font-size: 16.7px;
  font-weight: 400;
  line-height: 1.86;
  letter-spacing: 0.02px;
}

.notify-block {
  margin-top: 74px;
}

.notify-title {
  margin: 0 0 34px;
  font-size: 16.5px;
  line-height: 1.4;
}

.notify-title strong {
  font-weight: 600;
}

.notify-title span {
  color: var(--red);
  font-weight: 600;
}

.signup-form {
  width: 504px;
  height: 50px;
  display: grid;
  grid-template-columns: 1fr 138px;
  gap: 10px;
}

.signup-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: var(--navy-input);
  color: var(--white);
  padding: 0 24px;
  font-size: 12px;
  border-radius: 28px;
}

.signup-form input::placeholder {
  color: #78859a;
  opacity: 1;
}

.signup-form button {
  border: 0;
  border-radius: 28px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.signup-form button:hover {
  filter: brightness(1.05);
}

.signup-form button:active {
  transform: scale(0.985);
}

.form-message {
  min-height: 18px;
  margin: 11px 0 0 22px;
  font-size: 11px;
  color: #c7ceda;
}

.form-message.error {
  color: #ff8e86;
}

.hero-art {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12px;
}

.hero-art img {
  display: block;
  width: min(100%, 585px);
  height: auto;
  object-fit: contain;
}

.site-footer {
  width: calc(100% - 280px);
  max-width: 1456px;
  margin: 0 auto;
  padding: 15px 0 28px;
  color: #9ca6b7;
  font-size: 11px;
}

.site-footer p {
  margin: 0;
}

.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;
}

.legal-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: 82vh;
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #182239;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.legal-dialog::backdrop {
  background: rgba(6, 13, 25, .72);
  backdrop-filter: blur(3px);
}

.legal-content {
  padding: 42px 44px;
  max-width: 800px;
  margin: 0 auto;
}

.legal-page {
  width: calc(100% - 280px);
  max-width: 1456px;
  margin: 0 auto;
  min-height: calc(100vh - 136px);
  padding-top: 102px;
}

.legal-content h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.legal-content h3 {
  margin: 25px 0 8px;
  font-size: 16px;
}

.legal-content p {
  color: #536078;
  line-height: 1.75;
  font-size: 14px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf0f5;
  color: #23304b;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.hamburger-menu {
  display: none;
  position: relative;
  width: 30px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--white);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
  top: 0px;
}

.hamburger-menu span:nth-child(2) {
  top: 8px;
}

.hamburger-menu span:nth-child(3) {
  top: 16px;
}

.hamburger-menu.is-active span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

.hamburger-menu.is-active span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger-menu.is-active span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

@media (min-width: 1500px) and (max-height: 900px) {
  .hero-shell {
    padding-top: 72px;
    min-height: 650px;
  }

  .notify-block {
    margin-top: 54px;
  }
}

@media (max-width: 1180px) {
  .site-header {
    width: calc(100% - 80px);
  }

  .hero-shell,
  .site-footer {
    width: calc(100% - 100px);
  }

  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr);
    gap: 35px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 5.2vw, 58px);
  }

  .legal-page {
    width: calc(100% - 100px);
  }
}

@media (max-width: 900px) {
  .site-header {
    width: calc(100% - 48px);
    height: auto;
    padding: 24px 0 0;
    align-items: center;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block;
  }

  .site-nav {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--navy);
    padding: 20px;
    z-index: 100;
    transition: right 0.3s ease-in-out;
  }

  .site-nav.is-active {
    right: 0;
  }

  .close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
  }

  .site-nav a {
    display: block;
    padding: 15px 0;
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
  }

  .logo-link img {
    width: 155px;
  }

  .site-nav {
    padding: 0;
    gap: 18px;
  }

  .site-nav a,
  .site-nav button {
    font-size: 12px;
  }

  .hero-shell {
    width: calc(100% - 48px);
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 86px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-art {
    justify-content: flex-start;
  }

  .hero-art img {
    width: min(100%, 600px);
  }

  .site-footer {
    width: calc(100% - 48px);
    margin-top: 32px;
  }

  .legal-page {
    width: calc(100% - 48px);
    padding-top: 86px;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: calc(100% - 32px);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .site-nav {
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-shell,
  .site-footer {
    width: calc(100% - 32px);
  }

  .hero-shell {
    padding-top: 62px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 12vw, 52px);
    line-height: 1.16;
    letter-spacing: -1.2px;
  }

  .hero-description {
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.75;
  }

  .notify-block {
    margin-top: 50px;
  }

  .notify-title {
    margin-bottom: 22px;
    font-size: 15px;
  }

  .signup-form {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .signup-form input,
  .signup-form button {
    height: 52px;
    border-radius: 28px;
  }

  .signup-form input {
    background: var(--navy-input);
  }

  .form-message {
    margin-left: 18px;
  }

  .hero-art {
    padding-top: 0;
  }

  .legal-page {
    width: calc(100% - 32px);
    padding-top: 62px;
  }

  .legal-content {
    padding: 24px;
  }
}

.no-scroll {
  overflow: hidden;
}

/* =========================================================
   Mobile slide-out navigation
   Final consolidated version
   ========================================================= */

.close-menu,
.menu-backdrop {
  display: none;
}

.no-scroll {
  overflow: hidden;
}

@media (max-width: 900px) {
  /* Header */
  .site-header {
    position: relative !important;
    z-index: auto !important;
    width: calc(100% - 70px) !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 38px 0 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }

  .logo-link {
    position: relative;
    z-index: 51;
  }

  .logo-link img {
    width: 162px;
    height: auto;
  }

  /* Hamburger */
  .hamburger-menu {
    display: block !important;
    position: relative !important;
    z-index: 51;
    flex: 0 0 auto;
    width: 44px !important;
    height: 44px !important;
    margin: 0 -8px 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger-menu span {
    position: absolute !important;
    left: 10px !important;
    width: 24px !important;
    height: 1.5px !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hamburger-menu span:nth-child(1) {
    top: 15px !important;
  }

  .hamburger-menu span:nth-child(2) {
    top: 21px !important;
  }

  .hamburger-menu span:nth-child(3) {
    top: 27px !important;
  }

  /* Keep hamburger unchanged while drawer is open */
  .hamburger-menu.is-active span:nth-child(1),
  .hamburger-menu.is-active span:nth-child(2),
  .hamburger-menu.is-active span:nth-child(3) {
    left: 10px !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Backdrop */
  .menu-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(0, 12, 28, 0.62) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: default;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .menu-backdrop.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Slide-in drawer */
  .site-nav {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 9999 !important;

    width: min(250px, 52vw) !important;
    height: 100dvh !important;
    min-height: 100vh !important;

    margin: 0 !important;
    padding: 115px 34px 40px 24px !important;

    background: #17365d !important;
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.16);

    overflow-x: hidden !important;
    overflow-y: auto !important;

    transform: translateX(100%) !important;
    visibility: hidden;
    pointer-events: none;

    transition:
      transform 0.32s cubic-bezier(.22, .61, .36, 1),
      visibility 0.32s ease !important;
  }

  .site-nav.is-active {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Menu links */
  .site-nav a {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    color: #f7f9fc !important;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;

    text-align: right !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    opacity: 1 !important;
    text-shadow: none !important;
    transition: color 0.18s ease, opacity 0.18s ease;
  }

  .site-nav a + a {
    margin-top: 34px !important;
  }

  .site-nav a.active {
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  .site-nav .active::before {
    content: "•" !important;
    position: static !important;
    display: inline-block !important;
    margin-right: 6px !important;
    color: #ef4136 !important;
    font-size: 15px !important;
    line-height: 1;
    vertical-align: 1px;
  }

  .site-nav a:hover,
  .site-nav a:focus {
    color: #ffffff !important;
    opacity: 1 !important;
  }

  /* Close button */
  .close-menu {
    display: flex !important;
    position: absolute !important;
    top: 30px !important;
    right: 16px !important;
    z-index: 10000 !important;

    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 0 2px !important;

    align-items: center !important;
    justify-content: center !important;

    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 0 !important;

    background: #ffffff !important;
    color: #17365d !important;

    font-family: Arial, sans-serif !important;
    font-size: 27px !important;
    font-weight: 300 !important;
    line-height: 1 !important;

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .close-menu:focus-visible,
  .hamburger-menu:focus-visible,
  .site-nav a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
  }

  body.no-scroll {
    overflow: hidden !important;
    touch-action: none;
  }
}

@media (max-width: 620px) {
  /* Prevent old small-screen rules from turning the drawer full-width */
  .site-header {
    width: calc(100% - 70px) !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .site-nav {
    width: min(250px, 52vw) !important;
    padding: 115px 34px 40px 24px !important;
    gap: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .site-nav a {
    padding: 0 !important;
    font-size: 17px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .menu-backdrop {
    transition: none !important;
  }
}
