/* Studio sign-in page: hero panel on the left, sign-in form in a glass card on the right.
   It shares its frame with the Social Influence sign-in (layout, glass card, two-line headline, four step bars)
   so the two products read as one network. The picture is Studio's own: film-strip rows of landscape production
   frames drifting sideways, viewfinder corner marks, a clapper-slate card and scrubber-style step bars.
   Scoped to .auth-shell.sq-signin, so no other page changes.
   ONE design for light and dark: every size, spacing and motion rule below applies to both themes, and the two
   theme blocks only set colour variables. Older theme-specific sign-in layout rules in styles.css and theme.css
   are overridden here (hence the specific selectors and the few !important flags that answer theirs). */

/* ---------- Colour variables: the only place the themes differ ---------- */
html:root .auth-shell.sq-signin {
  --sih-canvas: #101012;
  --sih-panel: #141416;
  --sih-panel-rgb: 20, 20, 22;
  --sih-ink: #f5f2ef;
  --sih-soft: #cfc8c2;
  --sih-quiet: #a39b94;
  --sih-line: #ffffff24;
  --sih-track: #ffffff2e;
  --sih-accent: #f0763a;
  --sih-fill: var(--accent, #e96824);
  --sih-mark-ink: #1a1310;
  --sih-focus: var(--accent-light, #ffad77);
  --sih-panel-drop: 0 40px 90px -50px #000000b3;
  /* Studio's shared glass material (same values as the creation tools' glass buttons). */
  --sih-glass-top: #ffffff1f;
  --sih-glass-bottom: #ffffff05;
  --sih-glass-base: linear-gradient(#1d1f23eb, #17191deb);
  --sih-glass-rim: linear-gradient(155deg, #ffffffad 0%, #ffffff30 28%, #ffffff12 55%, #ffffff45 100%);
  --sih-glass-ink: #f2efeb;
  --sih-glass-glint: #ffffff38;
  --sih-glass-sheen: #ffffff29;
  --sih-glass-floor: #0000005c;
  --sih-glass-shadow: #00000028;
  --sih-glass-drop: #000000a6;
}
html:root[data-theme='light'] .auth-shell.sq-signin {
  --sih-canvas: #fafaf9;
  --sih-panel: #f4f2ef;
  --sih-panel-rgb: 244, 242, 239;
  --sih-ink: #1a1613;
  --sih-soft: #4c453f;
  --sih-quiet: #5d554f;
  --sih-line: #1a13101f;
  --sih-track: #1a131029;
  --sih-accent: var(--accent, #b84817);
  --sih-fill: var(--accent, #b84817);
  --sih-mark-ink: #fff;
  --sih-focus: var(--accent-light, #9d3c11);
  --sih-panel-drop: 0 40px 80px -55px #3a2a2080;
  --sih-glass-top: #fffffff2;
  --sih-glass-bottom: #f2f3f6bd;
  --sih-glass-base: linear-gradient(#f8f8faf7, #eef0f3f7);
  --sih-glass-rim: linear-gradient(160deg, #ffffff 0%, #ffffffd9 24%, #6c748f3d 60%, #6c748f66 100%);
  --sih-glass-ink: #242b38;
  --sih-glass-glint: #fff;
  --sih-glass-sheen: #ffffffd9;
  --sih-glass-floor: #24314b17;
  --sih-glass-shadow: #24314b12;
  --sih-glass-drop: #24314b4d;
}

/* ---------- Page shell ---------- */
html:root .auth-shell.sq-signin {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 22px clamp(16px, 3vw, 48px) 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 18% 0%, #ff6a3d14, transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, #ff795e0d, transparent 70%),
    var(--sih-canvas) !important;
}
html:root .auth-shell.sq-signin .auth-ink {
  display: none;
}
html:root .auth-shell.sq-signin .auth-header {
  gap: 12px;
}
html:root .auth-shell.sq-signin .auth-header > a:first-of-type {
  margin-right: auto;
}
/* One logo size per breakpoint for both themes (theme.css sized it differently per theme). */
html:root .auth-shell.sq-signin .auth-header .logo {
  width: 150px !important;
}
html:root .auth-shell.sq-signin .auth-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 80px);
  max-width: none;
  width: 100%;
  margin: 20px 0 22px;
}
html:root .auth-shell.sq-signin .auth-footer {
  line-height: 1.8;
}
/* Keyboard focus ring uses the theme's readable accent everywhere on this page (the pale ring was hard to see
   on the light canvas). */
html:root .auth-shell.sq-signin :is(a, button, input):focus-visible {
  outline-color: var(--sih-focus) !important;
}

/* ---------- Glass form card ---------- */
html:root .auth-shell.sq-signin .auth-card {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  padding: clamp(24px, 3.2vw, 44px);
  border: 1px solid transparent !important;
  border-radius: 20px;
  background:
    linear-gradient(160deg, var(--sih-glass-top), var(--sih-glass-bottom)) padding-box,
    var(--sih-glass-base) padding-box,
    var(--sih-glass-rim) border-box !important;
  box-shadow:
    inset 0 1px 0 var(--sih-glass-glint),
    inset 0 22px 26px -24px var(--sih-glass-sheen),
    inset 0 -14px 20px -18px var(--sih-glass-floor),
    0 4px 10px var(--sih-glass-shadow),
    0 34px 70px -40px var(--sih-glass-drop) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
}
html:root .auth-shell.sq-signin .auth-card h2 {
  margin: 14px 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}
html:root .auth-shell.sq-signin .auth-card label {
  font-size: 13px;
  font-weight: 600;
}
html:root .auth-shell.sq-signin .auth-card input:not([type='checkbox']):not([type='radio']) {
  min-height: 50px;
  border-radius: 11px;
  font-size: 16px;
}
html:root .auth-shell.sq-signin .auth-card .primary {
  min-height: 50px;
  border-radius: 11px;
}
html:root .auth-shell.sq-signin .auth-card .auth-support {
  margin-top: 18px;
  line-height: 1.7;
}

/* ---------- Hero panel ---------- */
html:root .auth-shell.sq-signin .sih-hero {
  --sih-row: clamp(150px, 15vw, 230px);
  --sih-gap: clamp(10px, 1.2vw, 18px);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 680px;
  height: 100%;
  margin: 0;
  padding: clamp(22px, 2.8vw, 44px);
  overflow: hidden;
  border: 1px solid var(--sih-line);
  border-radius: 20px;
  background: var(--sih-panel);
  color: var(--sih-ink);
  box-shadow: var(--sih-panel-drop);
}
/* Film strips: rows of landscape frames, tilted, bleeding past the panel edges and rolling sideways. */
.sq-signin .sih-wall {
  position: absolute;
  inset: -10% -14% auto -14%;
  z-index: -2;
  display: grid;
  gap: var(--sih-gap);
  transform: rotate(-7deg);
  transform-origin: 50% 30%;
  pointer-events: none;
}
.sq-signin .sih-strip {
  height: var(--sih-row);
}
.sq-signin .sih-track {
  display: flex;
  gap: var(--sih-gap);
  width: max-content;
  height: 100%;
  animation: sih-roll 44s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}
.sq-signin .sih-strip:nth-child(2) .sih-track {
  animation-duration: 56s;
  animation-direction: reverse;
}
.sq-signin .sih-strip:nth-child(3) .sih-track {
  animation-duration: 50s;
}
.sq-signin .sih-strip:nth-child(4) .sih-track {
  animation-duration: 60s;
  animation-direction: reverse;
}
.sq-signin .sih-hero[data-motion='on'] .sih-track {
  animation-play-state: running;
}
.sq-signin .sih-frame {
  position: relative;
  flex: none;
  height: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #1c1919;
  box-shadow: 0 18px 40px -22px #000000cc;
}
.sq-signin .sih-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sq-signin .sih-frame figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  background: #0000008c;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
/* Tally light on each frame's label. */
.sq-signin .sih-frame figcaption i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7a45;
}
/* Fades the strips into the panel where the words sit: the bottom and the left edge. */
.sq-signin .sih-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(var(--sih-panel-rgb), 1) 0%, rgba(var(--sih-panel-rgb), 1) 36%, rgba(var(--sih-panel-rgb), 0.9) 52%, rgba(var(--sih-panel-rgb), 0) 76%),
    linear-gradient(90deg, rgba(var(--sih-panel-rgb), 0.9) 0%, rgba(var(--sih-panel-rgb), 0) 55%),
    radial-gradient(ellipse 60% 40% at 0% 0%, #ff6a3d38, transparent 70%);
  pointer-events: none;
}
/* Viewfinder corner marks frame the whole panel like a camera monitor. */
.sq-signin .sih-finder {
  position: absolute;
  inset: clamp(9px, 1.1vw, 15px);
  pointer-events: none;
}
.sq-signin .sih-finder i {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid #ffffffb3;
}
.sq-signin .sih-finder i:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 1.5px 0 0 1.5px;
  border-top-left-radius: 5px;
}
.sq-signin .sih-finder i:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 1.5px 1.5px 0 0;
  border-top-right-radius: 5px;
}
.sq-signin .sih-finder i:nth-child(3) {
  left: 0;
  bottom: 0;
  border-width: 0 0 1.5px 1.5px;
  border-bottom-left-radius: 5px;
  border-color: var(--sih-quiet);
}
.sq-signin .sih-finder i:nth-child(4) {
  right: 0;
  bottom: 0;
  border-width: 0 1.5px 1.5px 0;
  border-bottom-right-radius: 5px;
  border-color: var(--sih-quiet);
}

html:root .auth-shell.sq-signin .sih-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sih-ink);
}
.sq-signin .sih-topline span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* The brand label sits on a pill so it reads over any photo. */
.sq-signin .sih-brand {
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(var(--sih-panel-rgb), 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sq-signin .sih-brand i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sih-fill);
  box-shadow: 0 0 0 4px #ff795e33;
}
.sq-signin .sih-hero[data-motion='on'] .sih-brand i {
  animation: sih-pulse 2.4s ease-in-out infinite;
}
html:root .auth-shell.sq-signin .sih-illustrative {
  padding: 5px 10px;
  border-radius: 999px;
  background: #000000a6;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 500;
}

/* Clapper slate: a glass card over the strips that changes with each step. */
html:root .auth-shell.sq-signin .sih-slate {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  top: 26%;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(330px, 74%);
  padding: 21px 18px 12px 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background:
    linear-gradient(160deg, var(--sih-glass-top), var(--sih-glass-bottom)) padding-box,
    var(--sih-glass-base) padding-box,
    var(--sih-glass-rim) border-box;
  box-shadow:
    inset 0 1px 0 var(--sih-glass-glint),
    0 22px 44px -20px #000000bf;
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  color: var(--sih-glass-ink);
  animation: sih-clap 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sq-signin .sih-slate:empty {
  visibility: hidden;
}
/* The slate's striped clapper sticks. */
.sq-signin .sih-sticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: repeating-linear-gradient(115deg, var(--sih-glass-ink) 0 11px, transparent 11px 22px);
  opacity: 0.86;
}
.sq-signin .sih-slate-text {
  display: grid;
  min-width: 0;
}
html:root .auth-shell.sq-signin .sih-slate em {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sih-glass-ink);
  opacity: 0.72;
}
html:root .auth-shell.sq-signin .sih-slate strong {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sih-glass-ink);
}
html:root .auth-shell.sq-signin .sih-slate small {
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--sih-glass-ink);
  opacity: 0.78;
}
.sq-signin .sih-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--sih-fill);
  color: var(--sih-mark-ink);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.sq-signin .sih-foot {
  display: grid;
  gap: 14px;
}
html:root .auth-shell.sq-signin .sih-title {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 84px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--sih-ink);
}
html:root .auth-shell.sq-signin .sih-title em {
  display: block;
  padding-bottom: 0.08em;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--sih-accent);
}
html:root .auth-shell.sq-signin .sih-lead {
  margin: 0;
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--sih-soft) !important;
}

/* Steps: story-style progress bars with a label underneath, each with a scrubber playhead. Real buttons. */
.sq-signin .sih-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
html:root .auth-shell.sq-signin .sih-step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 0 0 4px;
  border: 0 !important;
  border-radius: 6px;
  background: none !important;
  box-shadow: none !important;
  transform: none;
  color: var(--sih-quiet) !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition: color 250ms ease;
}
html:root .auth-shell.sq-signin .sih-step::before,
html:root .auth-shell.sq-signin .sih-step::after {
  content: none;
}
.sq-signin .sih-count {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
}
html:root .auth-shell.sq-signin .sih-step[data-active],
html:root .auth-shell.sq-signin .sih-step:hover {
  color: var(--sih-ink) !important;
}
html:root .auth-shell.sq-signin .sih-step:focus-visible {
  outline: 2px solid var(--sih-focus);
  outline-offset: 5px;
}
.sq-signin .sih-bar {
  position: relative;
  display: block;
  height: 3px;
  margin: 4px 0 8px;
  border-radius: 999px;
  background: var(--sih-track);
}
.sq-signin .sih-bar b {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--sih-fill);
}
.sq-signin .sih-step[data-done] .sih-bar b,
.sq-signin .sih-step[data-active] .sih-bar b {
  width: 100%;
}
/* Playhead on the step that is playing. */
.sq-signin .sih-step[data-active] .sih-bar b::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--sih-fill);
  box-shadow: 0 0 0 3px rgba(var(--sih-panel-rgb), 1);
}
.sq-signin .sih-hero[data-motion='on'] .sih-step[data-active]:not([aria-pressed='true']) .sih-bar b {
  animation: sih-fill 6s linear both;
}
.sq-signin .sih-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html:root .auth-shell.sq-signin .sih-caption {
  margin: 0;
  max-width: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sih-soft) !important;
}
html:root .auth-shell.sq-signin .sih-caption strong {
  color: var(--sih-ink);
  font-weight: 650;
}
.sq-signin .sih-caption span::before {
  content: '· ';
}
html:root .auth-shell.sq-signin .sih-detail {
  margin: 0;
  min-height: 1.5em;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sih-quiet) !important;
}

@keyframes sih-roll {
  to {
    transform: translate3d(calc(-50% - var(--sih-gap) / 2), 0, 0);
  }
}
@keyframes sih-fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes sih-clap {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(-3deg) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sih-pulse {
  50% {
    box-shadow: 0 0 0 8px #ff795e00;
  }
}

/* ---------- Tablet and phone: the strips become a band across the top; the words sit below. ---------- */
@media (max-width: 1023px) {
  html:root .auth-shell.sq-signin {
    padding: 14px 16px 16px;
  }
  html:root .auth-shell.sq-signin .auth-header .logo {
    width: 128px !important;
  }
  html:root .auth-shell.sq-signin .auth-body {
    flex: initial;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 14px 0 16px;
  }
  html:root .auth-shell.sq-signin .auth-card {
    padding: 22px 18px;
  }
  html:root .auth-shell.sq-signin .auth-card h2 {
    margin: 8px 0;
    font-size: 28px;
  }
  html:root .auth-shell.sq-signin .auth-footer {
    margin-top: auto;
  }
  html:root .auth-shell.sq-signin .sih-hero {
    --sih-row: clamp(76px, 20vw, 156px);
    min-height: 0;
    height: auto;
    gap: clamp(84px, 22vw, 150px);
    padding: 18px;
  }
  .sq-signin .sih-wall {
    inset: -6% -14% auto -14%;
  }
  .sq-signin .sih-veil {
    background:
      linear-gradient(0deg, rgba(var(--sih-panel-rgb), 1) 0%, rgba(var(--sih-panel-rgb), 1) 46%, rgba(var(--sih-panel-rgb), 0) 74%),
      radial-gradient(ellipse 70% 40% at 0% 0%, #ff6a3d38, transparent 70%);
  }
  .sq-signin .sih-finder {
    inset: 7px;
  }
  .sq-signin .sih-finder i {
    width: 12px;
    height: 12px;
  }
  html:root .auth-shell.sq-signin .sih-slate {
    top: 58px;
    right: 16px;
    gap: 10px;
    padding: 15px 14px 8px 9px;
    border-radius: 12px;
  }
  .sq-signin .sih-sticks {
    height: 6px;
    background: repeating-linear-gradient(115deg, var(--sih-glass-ink) 0 8px, transparent 8px 16px);
  }
  html:root .auth-shell.sq-signin .sih-slate em {
    font-size: 9px;
  }
  html:root .auth-shell.sq-signin .sih-slate strong {
    font-size: 13px;
  }
  html:root .auth-shell.sq-signin .sih-slate small {
    font-size: 11px;
  }
  .sq-signin .sih-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 11px;
  }
  html:root .auth-shell.sq-signin .sih-title {
    font-size: clamp(36px, 10vw, 56px);
  }
  html:root .auth-shell.sq-signin .sih-lead,
  html:root .auth-shell.sq-signin .sih-detail {
    display: none;
  }
  .sq-signin .sih-foot {
    gap: 10px;
  }
  .sq-signin .sih-steps {
    gap: 10px;
    margin-top: 4px;
  }
  html:root .auth-shell.sq-signin .sih-step {
    min-height: 44px;
    font-size: 12px;
  }
  .sq-signin .sih-count {
    display: none;
  }
  html:root .auth-shell.sq-signin .sih-caption {
    font-size: 12px;
  }
  .sq-signin .sih-frame figcaption {
    display: none;
  }
}
@media (max-width: 600px) {
  html:root .auth-shell.sq-signin {
    padding-top: 10px;
  }
  html:root .auth-shell.sq-signin .auth-header .logo {
    width: 100px !important;
  }
  html:root .auth-shell.sq-signin .auth-body {
    gap: 12px;
    margin-top: 10px;
  }
  html:root .auth-shell.sq-signin .auth-card {
    padding: 18px 18px 22px;
  }
  html:root .auth-shell.sq-signin .sih-hero {
    padding: 14px 16px 16px;
  }
  html:root .auth-shell.sq-signin .sih-topline {
    gap: 8px;
    font-size: 9px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
  html:root .auth-shell.sq-signin .sih-illustrative {
    letter-spacing: 0.02em;
  }
  html:root .auth-shell.sq-signin .sih-slate {
    top: 48px;
  }
}
@media (max-width: 360px) {
  html:root .auth-shell.sq-signin .auth-header .logo {
    width: 88px !important;
  }
  .sq-signin .sih-brand {
    padding: 4px 9px 4px 8px;
  }
  html:root .auth-shell.sq-signin .sih-illustrative {
    padding: 4px 8px;
  }
  html:root .auth-shell.sq-signin .sih-step {
    font-size: 11px;
    letter-spacing: -0.02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sq-signin .sih-track,
  html:root .auth-shell.sq-signin .sih-slate,
  .sq-signin .sih-bar b,
  .sq-signin .sih-brand i {
    animation: none !important;
  }
}
