/* Slayd public homepage — phone-first integration layer.
 *
 * This file is intentionally scoped to #slayd-gate. The signed-in portal,
 * Foundry, and admin surfaces continue to use the shared system untouched.
 */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

html {
  scroll-padding-top: 82px;
}

/* Marketing labels stay in sentence case at every size. The product mockups
 * keep their own UI typography; this only addresses the public-page chrome. */
html body #slayd-gate :is(.sx-eyebrow, .sx-struct, .sx-led-h, .sx-field-lab, .sx-mon-col h3, .sx-tag) {
  text-transform: none;
}

@media (max-width: 820px) {
  html body #slayd-gate {
    --gutter: clamp(18px, 5vw, 22px);
    --band-y: clamp(62px, 17vw, 78px);
    --band-y-lg: clamp(72px, 19vw, 92px);
    --band-y-sm: clamp(28px, 8vw, 38px);
    width: 100%;
    max-width: 100%;
  }

  /* iOS has had several content-visibility and view-timeline paint bugs.
   * Phone visitors get the same content in a stable document flow. */
  html body #slayd-gate .sx-b-defer {
    content-visibility: visible;
    contain-intrinsic-size: none;
  }

  html body #slayd-gate :is(.sx-rise, .sx-rise-g > *, .sx-drift-col, .sx-stage-dev) {
    animation: none !important;
    opacity: 1 !important;
    translate: none !important;
    transform: none !important;
  }

  html body #slayd-gate .sx-head-block :is(.sx-d2, .sx-d3) {
    animation: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    opacity: 1 !important;
  }

  /* Reduce desktop tracking so sentence-case labels stay crisp on phones. */
  html body #slayd-gate :is(.sx-eyebrow, .sx-struct, .sx-led-h, .sx-field-lab, .sx-mon-col h3) {
    text-transform: none;
    letter-spacing: .055em;
  }

  html body #slayd-gate .sx-eyebrow {
    font-size: 11px;
  }

  html body #slayd-gate .sx-struct {
    font-size: 12px;
    letter-spacing: .035em;
  }

  html body #slayd-gate .sx-d1 {
    font-size: clamp(44px, 14vw, 60px);
    line-height: .98;
  }

  html body #slayd-gate .sx-d2 {
    font-size: clamp(36px, 11.5vw, 48px);
    line-height: 1.02;
  }

  html body #slayd-gate .sx-d4 {
    font-size: clamp(24px, 7.2vw, 30px);
  }

  html body #slayd-gate .sx-lede {
    font-size: 17px;
    line-height: 1.52;
  }

  html body #slayd-gate .sx-body-s {
    font-size: 15px;
    line-height: 1.58;
  }

  /* Product diptych: both sides belong in the page, not one viewport away. */
  html body #slayd-gate .sx-diptych {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  html body #slayd-gate .sx-dip {
    width: 100%;
    min-width: 0;
    padding: var(--band-y) var(--gutter);
    scroll-snap-align: none;
  }

  html body #slayd-gate .sx-dip + .sx-dip {
    border-top: 1px solid var(--hairline-2);
  }

  html body #slayd-gate .sx-dip-client :is(.sx-dip-lab, .sx-dip-foot) {
    align-self: flex-start;
    text-align: start;
  }

  html body #slayd-gate .sx-dip-body,
  html body #slayd-gate .gt-feed-stage {
    width: 100%;
    overflow: clip;
  }

  /* The gallery is a real single column on phones; scroll transforms are
   * disabled above so Safari cannot reserve the translated desktop gaps. */
  html body #slayd-gate .sx-drift {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  html body #slayd-gate .sx-drift-col {
    gap: 14px;
    margin-block: 0;
    padding-block: 0;
  }

  html body #slayd-gate .gt-feed-grid {
    gap: 40px;
  }

  html body #slayd-gate .gt-feed-float {
    inset-inline: auto 0;
    inset-block-end: 2%;
    max-width: calc(100% - 10px);
  }

  /* Keep every comparison row intact: label, usual approach, Slayd. */
  html body #slayd-gate .sx-ledger {
    grid-template-columns: minmax(88px, .92fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  html body #slayd-gate .sx-led-h:first-child {
    display: flex;
  }

  html body #slayd-gate .sx-led-lab {
    grid-column: auto;
    padding-block: 15px;
    border-bottom: 1px solid var(--hairline);
    font-size: 13px;
    line-height: 1.35;
  }

  html body #slayd-gate :is(.sx-led-h, .sx-led-c) {
    padding-inline: 10px;
  }

  html body #slayd-gate :is(.sx-led-usual, .sx-led-slayd) {
    font-size: 12.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  html body #slayd-gate .sx-led-foot {
    padding-inline: 0;
    padding-top: 18px;
    font-size: 13px;
    line-height: 1.55;
  }

  html body #slayd-gate .gt-led-close {
    align-items: flex-start;
    flex-direction: column;
  }

  html body #slayd-gate .gt-led-close .sx-btn {
    width: 100%;
  }

  html body #slayd-gate .sx-ribbon {
    padding-block: 26px;
  }

  html body #slayd-gate .sx-ribbon-item {
    font-size: clamp(24px, 8vw, 31px);
  }

  /* Scroll story: the heading holds its place while each step becomes the
   * active, fully weighted part of the process. JS only chooses the index. */
  html body #slayd-gate .gt-steps-band {
    padding-top: 54px;
  }

  html body #slayd-gate .gt-steps-intro {
    position: sticky;
    top: 78px;
    z-index: var(--z-sticky);
    max-width: none;
    margin-bottom: 0 !important;
    padding-block: 12px 22px;
    background: linear-gradient(180deg, var(--paper) 0 78%, rgba(255,255,255,0));
  }

  html body #slayd-gate #gt-steps-heading {
    display: flex;
    flex-wrap: wrap;
    column-gap: .19em;
    color: rgba(58,31,48,.42);
  }

  html body #slayd-gate .gt-step-word {
    color: rgba(58,31,48,.42);
    font-weight: 400;
    transition: color 320ms var(--ease), font-weight 320ms var(--ease);
  }

  html body #slayd-gate .gt-step-word.is-active {
    color: var(--plum);
    font-weight: 650;
  }

  html body #slayd-gate .gt-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  html body #slayd-gate .gt-step {
    min-height: clamp(220px, 34svh, 320px);
    justify-content: center;
    padding: 28px 2px;
    opacity: .58 !important;
    transition: opacity 320ms var(--ease), transform 320ms var(--ease), border-color 320ms var(--ease);
  }

  html body #slayd-gate .gt-step.is-active {
    opacity: 1 !important;
    transform: translateX(6px) !important;
    border-top-color: var(--pink);
  }

  html body #slayd-gate .gt-step.is-active::before {
    width: 28px;
    background: var(--gradient-h);
  }

  html body #slayd-gate .gt-step::before {
    transition: width 320ms var(--ease), background 320ms var(--ease);
  }

  html body #slayd-gate .gt-steps-band > .sx-in > .gt-ctas {
    margin-top: 22px !important;
  }

  html body #slayd-gate .gt-steps-band > .sx-in > .gt-ctas .sx-btn,
  html body #slayd-gate .gt-closer .sx-btn {
    width: 100%;
  }

  html body #slayd-gate .gt-closer {
    margin-bottom: 48px;
  }

  html body #slayd-gate .sx-mon-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  html body #slayd-gate .sx-mon-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  html body #slayd-gate .gt-mon-logo {
    width: min(88%, 360px);
  }
}

@media (max-width: 620px) {
  html body #slayd-gate .sx-head,
  html body #slayd-gate .sx-head-in {
    height: 68px;
  }

  html body #slayd-gate .sx-head {
    background: rgba(255, 252, 254, .96);
    box-shadow: 0 6px 24px rgba(58,31,48,.07);
  }

  html body #slayd-gate .sx-head-in {
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  html body #slayd-gate .sx-head-in > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  html body #slayd-gate .gt-logo-head {
    flex: 0 0 auto;
    height: 22px;
  }

  html body #slayd-gate .gt-head-tag {
    min-width: 0;
    margin-inline-start: 8px;
    padding: 5px 8px;
    overflow: hidden;
    font-size: 9px;
    letter-spacing: .07em;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
  }

  html body #slayd-gate #gt-head-join {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 15px;
  }

  html body #slayd-gate .sx-b-masthead {
    padding-block: 42px 68px;
  }

  html body #slayd-gate .sx-b-masthead :is(.sx-in, .sx-masthead-copy, .gt-cta-row) {
    width: 100%;
    min-width: 0;
  }

  html body #slayd-gate .gt-mast-top {
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    text-align: center;
  }

  html body #slayd-gate .gt-mast-logo {
    width: clamp(224px, 68vw, 300px);
    margin-block-end: 4px;
  }

  html body #slayd-gate .gt-hero {
    width: 100%;
    max-width: 8.7ch;
    font-size: clamp(48px, 14.5vw, 64px);
    line-height: .92;
    letter-spacing: -.036em;
    text-align: center;
  }

  html body #slayd-gate .sx-masthead {
    gap: 40px;
  }

  html body #slayd-gate .sx-masthead-copy {
    align-items: center;
    gap: 18px;
    text-align: center;
  }

  html body #slayd-gate .sx-masthead-copy .sx-lede {
    max-width: 34ch;
  }

  html body #slayd-gate .gt-fine {
    max-width: 42ch;
  }

  html body #slayd-gate .gt-cta-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  html body #slayd-gate .gt-cta-row .sx-btn-primary {
    display: flex;
    width: 100%;
  }

  html body #slayd-gate .gt-fine {
    font-size: 13px;
    line-height: 1.58;
  }

  html body #slayd-gate .gt-email {
    flex-direction: column;
    align-items: stretch;
  }

  html body #slayd-gate .gt-email .sx-field {
    flex: 0 0 auto;
  }

  html body #slayd-gate .gt-email .sx-btn {
    display: flex;
    width: 100%;
  }
}

@media (max-width: 360px) {
  html body #slayd-gate .gt-head-tag {
    display: none;
  }

  html body #slayd-gate #gt-head-join {
    padding-inline: 13px;
  }

  html body #slayd-gate .sx-ledger {
    grid-template-columns: minmax(78px, .85fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  html body #slayd-gate :is(.sx-led-h, .sx-led-c) {
    padding-inline: 8px;
  }

  html body #slayd-gate :is(.sx-led-usual, .sx-led-slayd) {
    font-size: 11.75px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body #slayd-gate :is(.gt-step, .gt-step::before, .gt-step-word) {
    transition: none;
  }
}
