/* Shared web-app ocean parallax for every internal marketing page. */
body:not(#dmRoot):not(.access-page)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 7, 25, 0.18) 0%, rgba(21, 8, 42, 0.7) 38%, #10071d 88%),
    url('/assets/site/Boat_port_storm_coast3-1920w.png') center top / cover no-repeat;
  transform: translateZ(0) scale(1.015);
  transform-origin: center top;
  will-change: transform;
}

/* Keep the whitelist back control and page copy on one deliberate mobile
   gutter. This must live after the shared mobile rail rules above. */
@media (max-width: 560px) {
  body .join-shell,
  body .whitelist-back-wrap {
    width: calc(100% - 48px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

body:not(#dmRoot):not(.access-page) .contact-background,
body:not(#dmRoot):not(.access-page) .terms-background,
body:not(#dmRoot):not(.access-page) .ocean-bg,
body:not(#dmRoot):not(.access-page) .page-shade {
  display: none !important;
}

body:not(#dmRoot):not(.access-page) {
  isolation: isolate;
  background-color: transparent !important;
  background-image: linear-gradient(180deg, transparent 0 310px, rgba(16, 7, 29, 0.26) 540px, #10071d 1080px) !important;
}

html {
  background-color: #10071d;
}

@media (max-width: 760px) {
  body:not(#dmRoot):not(.access-page)::after {
    background-position: 58% top;
    background-size: auto 46vh;
    background-color: #10071d;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(#dmRoot):not(.access-page)::after {
    transform: none;
    will-change: auto;
  }
}

/* Shared mobile hardening for the Salvage marketing site. */
@media (max-width: 1024px) {
  html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip !important;
  }

  img,
  video,
  canvas,
  iframe,
  svg {
    max-width: 100%;
  }

  img,
  video {
    height: auto;
  }

  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  .site-header,
  #slv-logo,
  #slv-hamburger,
  #slv-mobile-menu,
  .mobile-menu,
  .menu-button {
    -webkit-tap-highlight-color: transparent;
  }

  .landing-footer {
    width: 100%;
    overflow: hidden;
  }

  /* Landing page: neutralize legacy minimum widths and keep widgets in viewport. */
  body#dmRoot .dmInner,
  body#dmRoot .dmDesktopBody,
  body#dmRoot .dmLayoutWrapper,
  body#dmRoot .dmRespRowsWrapper,
  body#dmRoot .dmRespRow,
  body#dmRoot .dmRespColsWrapper,
  body#dmRoot .dmRespCol,
  body#dmRoot .dmCustomHtml,
  body#dmRoot #site_content {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body#dmRoot .dmRespRow,
  body#dmRoot .dmRespColsWrapper {
    width: 100% !important;
  }

  body#dmRoot .dmCustomHtml,
  body#dmRoot .dmCustomHtml > section,
  body#dmRoot .dmCustomHtml > div {
    max-width: 100% !important;
  }

  body#dmRoot iframe,
  body#dmRoot video,
  body#dmRoot canvas {
    max-width: 100vw !important;
  }

  body#dmRoot #phase-progress-wrap,
  body#dmRoot #phase-progress-card,
  body#dmRoot #phase-app-grid {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* How it works and team pages. */
  #sl-wrap,
  .team-wrap,
  .cta-wrap {
    width: 100%;
    max-width: 100vw;
  }

  #sl-wrap .sl-step-row,
  #sl-wrap .sl-token-cards,
  #sl-wrap .sl-cta-inner,
  .team-grid,
  .executive-grid {
    min-width: 0;
  }

  #sl-wrap .sl-step-text,
  #sl-wrap .jth-card,
  .team-card,
  .executive-card {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  :root {
    --salvage-mobile-gutter: 20px;
    --salvage-mobile-radius: 18px;
  }

  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  h1,
  h2,
  h3,
  p {
    overflow-wrap: break-word;
  }

  .landing-footer {
    padding-left: var(--salvage-mobile-gutter) !important;
    padding-right: var(--salvage-mobile-gutter) !important;
  }

  .landing-footer-logo img {
    max-width: 190px !important;
  }

  .landing-footer-links {
    align-items: flex-start !important;
    gap: 7px !important;
  }

  .landing-footer-tagline,
  .landing-footer-links,
  .landing-footer-company {
    max-width: 100% !important;
    text-align: left !important;
  }

  /* The exported landing footer uses Duda's legacy center-alignment helpers.
     Keep the mobile footer copy flush with the shared page gutter instead. */
  body#dmRoot .dmFooterContainer .imageWidget.align-center,
  body#dmRoot .dmFooterContainer .dmNewParagraph,
  body#dmRoot .dmFooterContainer .dmNewParagraph h4,
  body#dmRoot .dmFooterContainer .dmNewParagraph p,
  body#dmRoot .dmFooterContainer .m-text-align-center {
    text-align: left !important;
  }

  #slv-footer-back-to-top {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    margin: 28px 0 24px !important;
    padding: 9px 14px !important;
    border: 1px solid rgba(183, 135, 245, .38) !important;
    border-radius: 999px !important;
    background: rgba(120, 65, 194, .12) !important;
    color: #e9dcff !important;
    font: 700 11px/1 'Open Sans', Arial, sans-serif !important;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
  }

  #slv-footer-back-to-top span { font-size: 17px; line-height: .8; }

  #slv-footer-back-to-top:active {
    transform: translateY(-2px);
    background: rgba(151, 87, 235, .25) !important;
    border-color: rgba(204, 169, 255, .7) !important;
  }

  /* Landing page gutters and compact cards. */
  body#dmRoot .dmRespRow:not(.fullBleedMode),
  body#dmRoot .dmRespColsWrapper,
  body#dmRoot .dmRespCol {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body#dmRoot .dmCustomHtml > section,
  body#dmRoot .dmCustomHtml > main,
  body#dmRoot .dmCustomHtml > div:not(#dw-widget):not(#slv-menu-backdrop):not(#slv-mobile-menu) {
    max-width: 100% !important;
  }

  body#dmRoot #phase-progress-heading {
    margin-bottom: 22px !important;
  }

  body#dmRoot #phase-progress-wrap #phase-progress-title {
    font-size: clamp(1.8rem, 10vw, 2.45rem) !important;
    line-height: 1.08 !important;
  }

  body#dmRoot .phase-app-card {
    border-radius: var(--salvage-mobile-radius) !important;
  }

  body#dmRoot .phase-app-summary {
    align-items: center;
  }

  body#dmRoot .phase-app-title {
    font-size: .84rem;
  }

  body#dmRoot .phase-app-percent {
    font-size: .72rem;
  }

  body#dmRoot #hiw-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 14px !important;
  }

  body#dmRoot #jth-grid,
  body#dmRoot .sl-faq-container,
  body#dmRoot .partner-grid {
    max-width: 100% !important;
  }

  body#dmRoot .calc-widget,
  body#dmRoot .ggp-root,
  body#dmRoot .limova-widget,
  body#dmRoot .th-widget,
  body#dmRoot .disclaimer-widget,
  body#dmRoot .abodex-video-card,
  body#dmRoot .vp-map-frame {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--salvage-mobile-radius) !important;
  }

  /* How it works. */
  #sl-wrap {
    padding-left: var(--salvage-mobile-gutter) !important;
    padding-right: var(--salvage-mobile-gutter) !important;
  }

  #sl-wrap > .landing-back-wrap {
    width: calc(100vw - 28px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #sl-wrap .sl-step-row {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    column-gap: 12px !important;
  }

  #sl-wrap .sl-step-row .sl-step-num {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    font-size: .9rem !important;
  }

  #sl-wrap .sl-step-img-wrap,
  #sl-wrap .sl-step-img-wrap img,
  #sl-wrap .sl-step-img-wrap video {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--salvage-mobile-radius) !important;
  }

  #sl-wrap .jth-card,
  #sl-wrap .sl-wf-step,
  #sl-wrap .sl-cta-inner {
    border-radius: var(--salvage-mobile-radius) !important;
  }

  /* Team page. */
  .team-wrap,
  .cta-wrap {
    padding-left: var(--salvage-mobile-gutter) !important;
    padding-right: var(--salvage-mobile-gutter) !important;
  }

  .team-grid,
  .executive-grid {
    gap: 18px !important;
  }

  .team-card,
  .executive-card,
  .cta-inner,
  .partner-section {
    border-radius: var(--salvage-mobile-radius) !important;
  }

  .team-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .cta-actions a,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-height: 50px;
    justify-content: center;
  }

  /* Contact and whitelist forms. */
  .contact-layout,
  .join-grid {
    width: 100%;
    min-width: 0;
  }

  .contact-form,
  .form-card,
  .mission-card {
    width: 100%;
    max-width: 100%;
    border-radius: var(--salvage-mobile-radius) !important;
  }

  .contact-form,
  .form-card {
    padding: 20px 16px !important;
  }

  .contact-intro h1,
  .intro h1 {
    font-size: clamp(2rem, 10vw, 2.65rem) !important;
  }

  textarea {
    min-height: 130px;
  }

  .submit-button {
    min-height: 54px;
  }

  /* Private access. */
  .access-shell {
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top)) var(--salvage-mobile-gutter) max(18px, env(safe-area-inset-bottom)) !important;
  }

  .access-back {
    top: max(68px, calc(env(safe-area-inset-top) + 58px));
    left: var(--salvage-mobile-gutter);
    min-width: 88px;
    min-height: 44px;
    justify-content: center;
    padding: 9px 14px 9px 10px;
  }

  .access-center {
    width: 100% !important;
    max-width: 430px;
    position: relative;
    top: 26px;
    padding: 22px 15px !important;
    border-radius: var(--salvage-mobile-radius) !important;
  }

  .countdown {
    width: 100%;
    justify-content: center;
    gap: 4px !important;
  }

  .countdown div {
    min-width: 0 !important;
    flex: 1 1 0;
  }

  .countdown strong {
    font-size: clamp(1.5rem, 8.4vw, 2.45rem) !important;
  }

  .countdown b {
    font-size: clamp(1.2rem, 6vw, 2rem) !important;
  }

  .access-center h1 {
    font-size: clamp(1.65rem, 8vw, 2.45rem) !important;
  }

  .password-row {
    grid-template-columns: 1fr !important;
  }

  .password-row > button {
    width: 100%;
    min-height: 52px;
  }
}

@media (max-width: 390px) {
  :root { --salvage-mobile-gutter: 18px; }

  #sl-wrap .sl-step-row {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }

  #sl-wrap .sl-step-row .sl-step-num {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  body#dmRoot .phase-app-summary {
    align-items: flex-start;
  }

  body#dmRoot .phase-app-meta {
    gap: 5px;
  }
}

/*
 * One mobile content rail across the whole marketing site.
 * Full-bleed hero video, navigation and footer backgrounds stay untouched;
 * cards and content sections share the same left and right edges.
 */
@media (max-width: 600px) {
  body#dmRoot .dmCustomHtml > :is(
    #jth-wrap,
    #jtu-wrap,
    #phase-progress-wrap,
    #vp-root,
    #tok-wrap,
    #elm-wrap,
    #dev-wrap,
    #hiw-wrap,
    #inv-wrap
  ) {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--salvage-mobile-gutter) !important;
    padding-right: var(--salvage-mobile-gutter) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  body#dmRoot .dmCustomHtml > :is(
    .calc-widget,
    .ggp-root,
    .limova-widget,
    .th-widget,
    .disclaimer-widget,
    .abodex-video-card,
    .partner-widget,
    .sl-faq-wrap
  ) {
    width: calc(100% - (2 * var(--salvage-mobile-gutter))) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  #sl-wrap,
  .team-wrap,
  .cta-wrap {
    padding-left: var(--salvage-mobile-gutter) !important;
    padding-right: var(--salvage-mobile-gutter) !important;
    box-sizing: border-box !important;
  }

  .contact-main,
  .join-shell,
  .terms-main,
  .greg-main {
    width: calc(100% - (2 * var(--salvage-mobile-gutter))) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  .landing-back-wrap,
  .back-btn-wrap {
    max-width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
}

/* One shared SALVAGE logo anchor across every marketing page. */
@media (min-width: 1025px) {
  #slv-logo,
  .site-header > .site-logo,
  .site-header > .brand {
    position: fixed !important;
    top: 40px !important;
    left: 140px !important;
    right: auto !important;
    margin: 0 !important;
    width: 175.08px !important;
    height: 26.29px !important;
    z-index: 10021 !important;
  }

  #slv-logo img,
  .site-header > .site-logo img,
  .site-header > .brand img {
    display: block !important;
    width: 175.08px !important;
    height: 26.29px !important;
    object-fit: contain !important;
  }

  .site-header {
    justify-content: flex-end !important;
  }
}

@media (max-width: 1024px) {
  #slv-logo,
  .site-header > .site-logo,
  .site-header > .brand {
    position: fixed !important;
    top: 48px !important;
    left: 24px !important;
    right: auto !important;
    margin: 0 !important;
    z-index: 10003 !important;
  }

  #slv-logo img,
  .site-header > .site-logo img,
  .site-header > .brand img {
    display: block !important;
    width: 140px !important;
    height: auto !important;
  }
}

@media (max-width: 560px) {
  #slv-logo,
  .site-header > .site-logo,
  .site-header > .brand {
    top: 48px !important;
    left: 20px !important;
  }

  #slv-logo img,
  .site-header > .site-logo img,
  .site-header > .brand img {
    width: 120px !important;
  }
}

/* Keep the mobile navigation control above every page section while scrolling. */
@media (max-width: 1024px) {
  #slv-hamburger,
  .menu-button {
    position: fixed !important;
    top: 48px !important;
    z-index: 10002 !important;
    isolation: isolate;
    transform: translateZ(0);
  }

  #slv-mobile-menu,
  .mobile-menu {
    position: fixed !important;
    z-index: 10001 !important;
  }

  #slv-menu-backdrop,
  .menu-backdrop {
    position: fixed !important;
    z-index: 10000 !important;
  }
}
