/* =========================================================
   Ibex Post — sign in / create account
   Black stage (where video lives) + white panel (where you act).
   ========================================================= */
:root {
  --white: #FFFFFF;
  --black: #0A0A0A;
  --grey-1: #F4F4F5;
  --grey-2: #E4E4E7;
  --grey-3: #A1A1AA;
  --grey-4: #71717A;
  --bad: #B91C1C;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--white); color: var(--black); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------- stage ---------- */
.stage { position: relative; background: var(--black); color: var(--white); padding: 40px 48px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.06), transparent 60%); }
.stage__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.stage__brand span { opacity: 0; animation: rise .8s var(--ease-out) .9s forwards; }
.mark { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 1.1s var(--ease-out) .2s forwards; }
.mark path + path { animation-delay: .45s; }
.mark--dark { width: 22px; height: 22px; }

.stage__mid { align-self: center; display: grid; gap: 28px; }
.stage__line { margin: 0; font-size: clamp(36px, 4.4vw, 64px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; }
.rot { position: relative; display: block; height: 1.1em; overflow: hidden; }
.rot__w { position: absolute; left: 0; top: 0; white-space: nowrap; transform: translateY(105%); transition: transform .7s var(--ease-out), opacity .7s; opacity: 0; }
.rot__w.is-on { transform: none; opacity: 1; }
.rot__w.is-out { transform: translateY(-105%); opacity: 0; }

/* scenes: edit timeline (video) and a page building itself (web) */
.scenes { position: relative; display: grid; opacity: 0; animation: rise 1s var(--ease-out) 1.1s forwards; }
.scene { grid-area: 1 / 1; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); opacity: 0; transform: translateY(8px); pointer-events: none; }
.scene.is-on { opacity: 1; transform: none; }

.tl { position: relative; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 0 0 12px; background: rgba(255,255,255,.02); overflow: hidden; }
.tl__ruler { height: 26px; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: flex-end; padding: 0 12px;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 12px); background-size: 12px 6px; background-repeat: repeat-x; background-position: 0 100%; }
.tl__tc { font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .04em; color: rgba(255,255,255,.7); background: var(--black); padding: 0 4px; }
.tl__tracks { display: grid; gap: 5px; padding: 10px 12px 0; }
.tl__track { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; transition: opacity .5s var(--ease-out); }
.tl__label { font-size: 10px; color: rgba(255,255,255,.45); letter-spacing: .04em; text-transform: uppercase; transition: color .4s; white-space: nowrap; }
.tl__lane { position: relative; height: 16px; overflow: hidden; border-radius: 3px; transition: height .6s var(--ease-out); }
.tl__reel { position: absolute; inset: 0 auto 0 0; width: 200%; animation: roll 30s linear infinite; }
/* one layer "zooms in"; the others step back */
.tl.has-focus .tl__track { opacity: .4; }
.tl.has-focus .tl__track.is-focus { opacity: 1; }
.tl__track.is-focus .tl__lane { height: 46px; }
.tl__track.is-focus .tl__label { color: var(--white); }

/* clips are gradients that repeat every 50%, so each reel loops seamlessly */
.tl__reel--footage { background:
  linear-gradient(90deg, transparent 0 1%, #3F3F46 1% 13%, transparent 13% 14%, #52525B 14% 22%, transparent 22% 23%, #3F3F46 23% 37%, transparent 37% 38%, #71717A 38% 43%, transparent 43% 44%, #52525B 44% 50%,
                         transparent 50% 51%, #3F3F46 51% 63%, transparent 63% 64%, #52525B 64% 72%, transparent 72% 73%, #3F3F46 73% 87%, transparent 87% 88%, #71717A 88% 93%, transparent 93% 94%, #52525B 94% 100%); }
.tl__reel--titles { background:
  linear-gradient(90deg, transparent 0 6%, rgba(255,255,255,.75) 6% 11%, transparent 11% 24%, rgba(255,255,255,.75) 24% 27%, transparent 27% 40%, rgba(255,255,255,.75) 40% 45%, transparent 45% 50%,
                         transparent 50% 56%, rgba(255,255,255,.75) 56% 61%, transparent 61% 74%, rgba(255,255,255,.75) 74% 77%, transparent 77% 90%, rgba(255,255,255,.75) 90% 95%, transparent 95% 100%); }
.tl__reel--3d { background: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 3px, transparent 3px 7px);
  -webkit-mask: linear-gradient(90deg, transparent 0 14%, #000 14% 30%, transparent 30% 50%, transparent 50% 64%, #000 64% 80%, transparent 80% 100%);
          mask: linear-gradient(90deg, transparent 0 14%, #000 14% 30%, transparent 30% 50%, transparent 50% 64%, #000 64% 80%, transparent 80% 100%); }
.tl__reel--grade { background: linear-gradient(90deg, #27272A 0%, #A1A1AA 25%, #27272A 50%, #A1A1AA 75%, #27272A 100%); opacity: .7; }
.tl__reel--voice, .tl__reel--music, .tl__reel--sfx { background-repeat: no-repeat; background-position: 0 50%; background-size: 100% 70%; }
.tl__reel--voice { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.6) 0 2px, transparent 2px 4px, rgba(255,255,255,.35) 4px 6px, transparent 6px 9px);
  -webkit-mask: linear-gradient(90deg, #000 0 9%, transparent 9% 12%, #000 12% 26%, transparent 26% 31%, #000 31% 45%, transparent 45% 50%, #000 50% 59%, transparent 59% 62%, #000 62% 76%, transparent 76% 81%, #000 81% 95%, transparent 95%);
          mask: linear-gradient(90deg, #000 0 9%, transparent 9% 12%, #000 12% 26%, transparent 26% 31%, #000 31% 45%, transparent 45% 50%, #000 50% 59%, transparent 59% 62%, #000 62% 76%, transparent 76% 81%, #000 81% 95%, transparent 95%); }
.tl__reel--music { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.4) 0 1px, transparent 1px 3px); }
.tl__reel--sfx { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.65) 0 2px, transparent 2px 4px);
  -webkit-mask: linear-gradient(90deg, transparent 0 7%, #000 7% 9%, transparent 9% 21%, #000 21% 22%, transparent 22% 33%, #000 33% 36%, transparent 36% 57%, #000 57% 59%, transparent 59% 71%, #000 71% 72%, transparent 72% 83%, #000 83% 86%, transparent 86%);
          mask: linear-gradient(90deg, transparent 0 7%, #000 7% 9%, transparent 9% 21%, #000 21% 22%, transparent 22% 33%, #000 33% 36%, transparent 36% 57%, #000 57% 59%, transparent 59% 71%, #000 71% 72%, transparent 72% 83%, #000 83% 86%, transparent 86%); }
.tl__head { position: absolute; top: 0; bottom: 0; left: calc(12px + 64px + 10px + 38%); width: 1px; background: var(--white); z-index: 1; }
.tl__head::before { content: ''; position: absolute; top: 0; left: -5px; border: 5px solid transparent; border-top: 7px solid var(--white); }

/* website scene */
.scene--web { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-right: 8px; }
.web { border: 1px solid rgba(255,255,255,.14); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.02); }
.web__bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.web__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); }
.web__bar span { margin: 0 auto; font-size: 10px; color: rgba(255,255,255,.45); padding: 2px 24px; border-radius: 6px; background: rgba(255,255,255,.06); }
.web__page { display: grid; gap: 10px; padding: 16px 20px 20px; }
.web__nav { display: flex; align-items: center; gap: 10px; }
.web__nav b { width: 46px; height: 8px; border-radius: 4px; background: var(--white); margin-right: auto; }
.web__nav em { width: 28px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.web__h1 { height: 14px; width: 72%; border-radius: 4px; background: var(--white); margin-top: 6px; }
.web__h1--short { width: 48%; margin-top: 0; }
.web__btn { width: 74px; height: 18px; border-radius: 9px; border: 1px solid var(--white); }
.web__img { height: 54px; border-radius: 8px; background: linear-gradient(120deg, #3F3F46, #18181B); }
.web__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.web__cards i { height: 34px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.phone { width: 104px; height: 188px; overflow: hidden; align-self: end; margin: 0 0 -8px -40px; padding: 16px 9px 12px; display: grid; align-content: start; gap: 7px; border: 1px solid rgba(255,255,255,.3); border-radius: 16px; background: var(--black); box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.phone .web__nav b { width: 26px; height: 5px; }
.phone .web__nav em { width: 10px; height: 4px; }
.phone .web__h1 { height: 8px; width: 90%; margin-top: 2px; }
.phone .web__btn { width: 40px; height: 11px; }
.phone .web__img { height: 30px; }
.web__card { height: 18px; border-radius: 4px; background: rgba(255,255,255,.08); }
/* when the scene shows, its parts arrive one after another, like a page being built */
.scene--web .web__page > *, .scene--web .phone { opacity: 0; }
.scene--web.is-on .web__page > *, .scene--web.is-on .phone { animation: rise .6s var(--ease-out) forwards; }
.scene--web.is-on .web__page > :nth-child(2) { animation-delay: .15s; } .scene--web.is-on .web__page > :nth-child(3) { animation-delay: .25s; }
.scene--web.is-on .web__page > :nth-child(4) { animation-delay: .4s; } .scene--web.is-on .web__page > :nth-child(5) { animation-delay: .55s; }
.scene--web.is-on .web__page > :nth-child(6) { animation-delay: .7s; } .scene--web.is-on .phone { animation-delay: 1.1s; }

/* caption under the scene: what the zoomed layer gives you */
.cap { margin: 0; min-height: 48px; display: grid; gap: 2px; opacity: 0; animation: rise .8s var(--ease-out) 1.3s forwards; }
.cap b, .cap span { transition: opacity .35s, transform .35s var(--ease-out); }
.cap b { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.cap span { font-size: 13px; color: rgba(255,255,255,.55); }
.cap.is-swap b, .cap.is-swap span { opacity: 0; transform: translateY(6px); }

.stage__facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; }
.stage__facts li { display: grid; gap: 2px; opacity: 0; animation: rise .8s var(--ease-out) forwards; }
.stage__facts li:nth-child(1) { animation-delay: 1.3s; } .stage__facts li:nth-child(2) { animation-delay: 1.4s; } .stage__facts li:nth-child(3) { animation-delay: 1.5s; }
.stage__facts b { font-weight: 500; font-size: 14px; }
.stage__facts span { font-size: 12px; color: rgba(255,255,255,.55); }

/* ---------- panel ---------- */
.panel { display: grid; grid-template-rows: auto 1fr auto; padding: 32px 48px; min-width: 0; }
.panel__top { display: flex; justify-content: space-between; align-items: center; }
.panel__brand { display: none; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; }
.panel__back { margin-left: auto; font-size: 13px; color: var(--grey-4); text-decoration: none; }
.panel__back:hover { color: var(--black); }
.panel__body { display: grid; place-items: center; padding: 32px 0; }
.panel__foot { font-size: 12px; color: var(--grey-3); text-align: center; }

.box { width: min(400px, 100%); }
.box > * { animation: rise .55s var(--ease-out) both; }
.box > *:nth-child(2) { animation-delay: .04s; } .box > *:nth-child(3) { animation-delay: .08s; } .box > *:nth-child(4) { animation-delay: .12s; }
.box > *:nth-child(5) { animation-delay: .16s; } .box > *:nth-child(6) { animation-delay: .2s; } .box > *:nth-child(n+7) { animation-delay: .24s; }
.box h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; }
.box .sub { margin: 6px 0 24px; color: var(--grey-4); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--grey-1); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.tabs button { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--grey-4); font-weight: 500; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.tabs button.is-on { background: var(--white); color: var(--black); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.btn { text-decoration: none; width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--black); background: var(--black); color: var(--white); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .1s; }
.btn:hover { background: #27272A; }
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn--line { background: var(--white); color: var(--black); border-color: var(--grey-2); }
.btn--line:hover { background: var(--grey-1); }
.btn svg { width: 18px; height: 18px; }

.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; color: var(--grey-3); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--grey-2); }

.method { display: flex; gap: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--grey-2); }
.method button { position: relative; background: none; border: 0; padding: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--grey-4); cursor: pointer; }
.method button.is-on { color: var(--black); }
.method button.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--black); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--grey-4); display: flex; justify-content: space-between; }
.field a, .linkbtn { font-size: 12px; color: var(--grey-4); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.field a:hover, .linkbtn:hover { color: var(--black); }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--grey-2); border-radius: 10px; background: var(--white); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(10,10,10,.06); }
.field.has-error .input { border-color: var(--bad); }
.pw { position: relative; }
.pw .input { padding-right: 64px; }
.pw__eye { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 6px; font-size: 12px; color: var(--grey-4); cursor: pointer; }
.pw__eye:hover { color: var(--black); background: var(--grey-1); }
.phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.phone select { height: 44px; border: 1px solid var(--grey-2); border-radius: 10px; padding: 0 8px; background: var(--white); }
.via { display: flex; gap: 8px; margin: -4px 0 16px; }
.via button { flex: 1; height: 36px; border-radius: 9999px; border: 1px solid var(--grey-2); background: var(--white); font-size: 13px; color: var(--grey-4); cursor: pointer; }
.via button.is-on { border-color: var(--black); color: var(--black); }

.meter { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 4px; align-items: center; margin-top: 2px; }
.meter i { height: 3px; border-radius: 2px; background: var(--grey-2); transition: background .25s; }
.meter em { font-style: normal; font-size: 11px; color: var(--grey-3); margin-left: 6px; }
.meter[data-s="1"] i:nth-child(-n+1), .meter[data-s="2"] i:nth-child(-n+2), .meter[data-s="3"] i { background: var(--black); }

.err { min-height: 18px; margin: -4px 0 10px; font-size: 13px; color: var(--bad); }
.fine { margin: 14px 0 0; font-size: 12px; color: var(--grey-3); text-align: center; }
.fine a { color: var(--grey-4); }

.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 16px; }
.otp input { height: 52px; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; border: 1px solid var(--grey-2); border-radius: 10px; }
.otp input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(10,10,10,.06); }
.demo-code { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--grey-1); font-size: 12px; color: var(--grey-4); margin-bottom: 16px; }
.demo-code b { color: var(--black); font-variant-numeric: tabular-nums; letter-spacing: .12em; font-size: 13px; }

.guest { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 14px 16px; border: 1px solid var(--grey-2); border-radius: 12px; text-decoration: none; transition: border-color .2s, background .2s; }
.guest:hover { border-color: var(--black); }
.guest b { display: block; font-weight: 500; }
.guest span { font-size: 12px; color: var(--grey-4); }
.guest i { font-style: normal; font-size: 18px; transition: transform .2s; }
.guest:hover i { transform: translateX(3px); }

.demo { margin-top: 18px; font-size: 12px; color: var(--grey-4); }
.demo summary { cursor: pointer; list-style: none; text-align: center; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary:hover { color: var(--black); }
.demo__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.demo__list button { height: 30px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--grey-2); background: var(--white); font-size: 12px; cursor: pointer; }
.demo__list button:hover { border-color: var(--black); }
.demo p { text-align: center; margin: 8px 0 0; color: var(--grey-3); }

.who { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--grey-2); border-radius: 12px; margin-bottom: 16px; }
.who__av { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.who b { display: block; font-weight: 500; }
.who span { font-size: 12px; color: var(--grey-4); }
.stack { display: grid; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; font-size: 13px; color: var(--grey-4); background: none; border: 0; padding: 0; cursor: pointer; }
.back:hover { color: var(--black); }
.ok-mark { width: 48px; height: 48px; border-radius: 50%; background: var(--black); color: var(--white); display: grid; place-items: center; margin-bottom: 16px; }
.ok-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ok-mark path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw .6s var(--ease-out) .15s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes roll { to { transform: translateX(-50%); } }

/* ---------- small screens: the stage becomes a short band ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .stage { padding: 20px 16px 24px; grid-template-rows: auto auto; gap: 24px; }
  .stage__line { font-size: 32px; }
  .stage__mid { gap: 0; }
  .scenes, .cap, .stage__facts { display: none; }
  .panel { padding: 20px 16px; }
  .panel__body { place-items: start center; padding: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .tl__reel { animation: none; }
}
.field em { font-style: normal; font-weight: 400; color: var(--grey-3); }
.note { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; background: var(--grey-1); font-size: 13px; }
.note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--black); flex: none; }
